LaTeX Inserting a Figure into a Latex Document

  • Thread starter Thread starter EngWiPy
  • Start date Start date
  • Tags Tags
    Figure Latex
AI Thread Summary
To include two figures on the same page in a LaTeX document, users can utilize positioning specifiers such as [h] for "here," [t] for "top," [b] for "bottom," and [p] for a dedicated float page. The override specifier [!] can be used to bypass LaTeX's internal positioning rules. A sample code snippet demonstrates how to structure the figure environment, allowing for adjustments in size and positioning. However, users often encounter challenges with LaTeX's float placement, leading some to rely on the scale attribute to achieve desired results. The discussion emphasizes the complexity of managing figure placements in LaTeX and suggests experimenting with various positioning options for optimal outcomes.
EngWiPy
Messages
1,361
Reaction score
61
Hello,

I want to ask how to include 2 figures at the same page in a Latex document, because when I insert .eps figures from MATLAB, each occpies one page.

Regards
 
Physics news on Phys.org
You can try using not only [h] (here), but also the override [!] construct. Check a little bit more on includegraphics documentation.

I will agree though, sometimes getting figures exactly where you want them can be a pain.
 
minger said:
You can try using not only [h] (here), but also the override [!] construct. Check a little bit more on includegraphics documentation.

I will agree though, sometimes getting figures exactly where you want them can be a pain.

I didn't understand, what is the construct? and How to use it? Cab you show me a sample, please?

Regards
 
To insert a figure, you can do something like:
Code:
	\begin{figure}[positioning_specifiers]
	\centering
	\vspace{2mm}
	\scalebox{0.5}{\includegraphics{figures.eps}}
	\caption{here is a caption}
	\label{fig:label}
	\end{figure}
Everything here should be pretty straightforward. The positioning specifiers tell Latex how you want the picture positioned. However, it has internal controls, and usually ignores what you want because it thinks its better than you. Anyways, the controls are:
[h]---Place the float here, i.e., at the same point it occurs in the source text.
[t]---Position at the top of the page.
---Position at the bottom of the page.
[p]---Put on a special page for floats only.
[!]---Override internal parameters Latex uses for determining `good' float positions

So, if you really want a picture at a certain point in the text, you can try
Code:
	\begin{figure}[!h]
But with latex, who knows
 
Ok, I tried to use these things, but it places the figures in positions I don't want as you said. Anyway, I used the scale attribute in the figure enviroment which does what I want exactly.

Thank you.

Regards
 

Similar threads

Back
Top