0

I've a text inserted into a quoting section, set as flushright.

I'm trying to add a figure under the text, but it seems not to be able to stay aligned to the right part of the text.

Here it is an example of my code, I'm using the \usepackage[export]{adjustbox} package.

\begin{quotation} \begin{flushright} \textit{ When the men on the chessboard\\ get up and tell you where to go\\ } \par \begin{figure}[h] \includegraphics[width=3cm, keepaspectratio, right]{img/alice.jpg} \end{figure} \par\end{flushright} \end{quotation} 

Here it is a screenshot of what is the result, but I'd like to have the figure's right side aligned with the text on the right. Some help?

re

Thanks in advance! Dario

5
  • that figure is part of the document, not a floating insert so you should just have \includegraphics remove the \begin{figure}..\end{figure} and the image will then be flush right Commented Dec 18, 2018 at 20:41
  • you have not provided a usable example but does that right key do anything? the standard \includegraphics command does not have a key of that name (so it would generate an error) Commented Dec 18, 2018 at 20:48
  • @DavidCarlisle it worked! it was so easy! Thanks!!! Commented Dec 18, 2018 at 20:48
  • @DavidCarlisle the right option comes from the adjustbox package. Commented Dec 18, 2018 at 20:49
  • questions should almost always come with a complete example. Commented Dec 18, 2018 at 20:59

1 Answer 1

2

the image should be part of the quotation, not a floating figure.

\begin{quotation} \raggedleft \textit{% When the men on the chessboard\\ get up and tell you where to go} \includegraphics[width=3cm, keepaspectratio]{img/alice.jpg} \end{quotation} 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.