Help with Putting Figures Side-by-Side in LaTeX

  • Context: LaTeX 
  • Thread starter Thread starter Clausius2
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary

Discussion Overview

The discussion focuses on how to place figures side-by-side in LaTeX, addressing issues related to figure positioning and formatting. Participants explore different methods and share code snippets to achieve the desired layout.

Discussion Character

  • Technical explanation
  • Exploratory
  • Homework-related

Main Points Raised

  • One participant expresses uncertainty about how to position figures side-by-side in LaTeX.
  • Another participant suggests using the position argument [h] to indicate where the figure should be placed, noting that LaTeX may still move it unexpectedly.
  • A third participant shares a specific code snippet using minipage to successfully place two figures side-by-side, indicating that they found a solution through research.
  • Another participant recommends exploring various packages, such as placeins, to manage figure placement more effectively.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method, as multiple approaches are discussed, and some uncertainty remains regarding LaTeX's behavior with figures.

Contextual Notes

There are limitations related to LaTeX's handling of figures as floats, and participants mention the potential for automatic newlines between figures, which may affect layout.

Clausius2
Science Advisor
Gold Member
Messages
1,433
Reaction score
7
Hi,

I don't really know how to put a figure aside to another. I mean, If "X" is a figure, what can I do to make:

X X

in the same line.

Thanks.
 
Physics news on Phys.org
LaTeX is very picky about figures. Even if you specify where you'd like the figure on the page, sometimes, it'll move it just because it wants to. You can try setting the position to argument to [h], which means "here." LaTeX will then try to place the figure where you want it.

I'm not sure if figure automatically does newlines, in that case you'll be screwed. But, try it. Make sure you don't newline between the figures.
 
Thanks. I've been googling and finally I've found how to do about that.

Yes, LaTex has an automatic newline between figures.

Here it is what I found:

\begin{figure}
\begin{minipage}[t]{8cm}
\begin{center}
\includegraphics[width=8cm,clip]{figure1.eps}
\caption[Short caption for figure 1]{\label{labelFig1} Long caption figure 1}
\end{center}
\end{minipage}
\hfill
\begin{minipage}[t]{7.5cm}
\begin{center}
\includegraphics[width=7.5cm,clip]{figure2.eps}
\caption[Short caption for figure 2]{\label{labelFig2} Long caption figure 2.}
\end{center}
\end{minipage}
\end{figure}

And it works!
 
try checking into various packages such as placeins.

Figures are "floats" so you really have to force it to go somewhere using tables or whatever.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K