Graphics, Figures & Tables ⇒ Placing Figures and Text Side-by-Side
Placing Figures and Text Side-by-Side
can please help me out here, didn't find any info on my specific problem.
On the last page of a document I want to place a picture (right-aligned) with some text next to it. I do not want to wrap the text around the picture. Rather, I want the picture to be right-aligned with the (justified) text appearing left to it. The height of the pic should be the same as the text, so I also want to scale the picture to e.g. be the same height as 10 lines of text. How can I do that easily?
Many thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Placing Figures and Text Side-by-Side
you could use \parbox (or a minipage environment) for both the text and the picture. \parbox (minipage too) understands options for vertical alignment.
For the picture, you could specify the height, such as
Code: Select all
\includegraphics[height=10\baselineskip]{filename}
Stefan
Re: Placing Figures and Text Side-by-Side
Thanks for your tip, but it didn't work the way I expected it to. If I use the following command, the picture will be beneath the text, although there would be enough space on the right of the text! If I use 0.5\linewidth in both minipages it works properly, however, then there is a huge wide space between either sides of the picture! So I get the impression that the horizontal alignment is not working properly. Are there any alternative commands?
Thanks a lot, here's the code I am using:
\begin{minipage}{0.65\linewidth}
some text
\end{minipage}
\hfill
\begin{minipage}{0.35\linewidth}
\includegraphics[height=8\baselineskip]{grafics}
\end{minipage}
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Placing Figures and Text Side-by-Side
The line breaks are whitespace, and \hfill is stretchable white space. Either comment them out, such as
Code: Select all
...
\end{minipage}%
\begin{minipage}[b]{0.35\linewidth}
...
Stefan
Re: Placing Figures and Text Side-by-Side
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Placing Figures and Text Side-by-Side
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10