Graphics, Figures & TablesPicture and Text Order

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm

Picture and Text Order

Post by minidiable »

Hi,

I have the following problem, I write this code:

Code: Select all

\begin{enumerate}
\item pxIMU : an IMU developed by PixHawk team \cite{pixhawk}
\item RF Laird Board Base Station (connected to the Real-Time PC) 
\item RF Laird Board Module (connected to the quadrotor)
\end{enumerate}

To the electronics listed above have to be added the frame of the AR Drone and his motors. The motors come with an Electronic Speed Controller (ESC) that accepts input between 0 and 512. There is a function that links the input given to the motor to the rpm of the propeller, it will be described in the \hlight{identification paragraph??}.

\begin{figure}
\begin{center}$
\begin{array}{cc}
\includegraphics[width=50mm]{pics/pixhawkimu.jpg}&
\includegraphics[width=50mm]{pics/lairdboard.jpg}
\includegraphics[width=30mm]{pics/PRM123.jpg}
\end{array}$
\caption{PixHawkIMU, RF Laird Board Base Station and RF Laird Board Module}
\label{pics:lairdboard}
\end{center}
\end{figure}

\begin{figure}
\begin{center}
\includegraphics[width=50mm]{pics/parrotmotornew.jpg}
\caption{Parrot Motor with ESC}
\label{fig:parrotmotor}
\end{center}
\end{figure}
I expect that the order is the following:
1) The enumerate list
2) The small paragraph that I wrote
3) 2 pictures

Instead I have:
1) Only the first and second item of the list
2) 2 pictures
3) third item of the list
4) Small paragraph that I wrote...

I want to know if is there a way to impose an order to the LaTex text.

Thank you in advance,
Fabrizio.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Picture and Text Order

Post by cgnieder »

I believe you'd be interested in the answer about float placement by Frank Mittelbach (just follow the link).

Regards
site moderator & package author
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Picture and Text Order

Post by Stefan Kottwitz »

Hi Fabrizio,

here are some possible improvements for this code.
  • figure environments are for floating figures. This means the images are placed by LaTeX for optimal page breaks. If you plan to place the images at fixed positions, don't use figure. Captions can still be done using the caption package. However, if you like the consistent figure syntax, you still could use the float package and the H option.
  • Use \centering within such environments instead of a center environment, to avoid additional vertical space.
  • Instead of array in math mode you could use tabular.
This may lead to:

Code: Select all

\begin{enumerate}
\item pxIMU : an IMU developed by PixHawk team \cite{pixhawk}
\item RF Laird Board Base Station (connected to the Real-Time PC)
\item RF Laird Board Module (connected to the quadrotor)
\end{enumerate}

To the electronics listed above have to be added the frame of the AR Drone and his motors. The motors come with an Electronic Speed Controller (ESC) that accepts input between 0 and 512. There is a function that links the input given to the motor to the rpm of the propeller, it will be described in the \hlight{identification paragraph??}.

\begin{figure}[H]
  \centering
  \begin{tabular}{cc}
    \includegraphics[width=50mm]{pics/pixhawkimu.jpg}&
    \includegraphics[width=50mm]{pics/lairdboard.jpg}
    \includegraphics[width=30mm]{pics/PRM123.jpg}
  \end{tabular}
  \caption{PixHawkIMU, RF Laird Board Base Station and RF Laird Board Module}
  \label{pics:lairdboard}
\end{figure}
Stefan
LaTeX.org admin
Post Reply