Graphics, Figures & Tables ⇒ Yipes! pdflatex command placing graphs in wrong place
-
- Posts: 51
- Joined: Wed Aug 06, 2014 6:59 pm
Yipes! pdflatex command placing graphs in wrong place
Doxygen can be setup to produce HTML reports and LaTeX reports because Doxygen commands are embedded in computer source code. It creates documentation of computer progams. The two types of reports produced should be identical except being in different formats (HTML versus LaTeX).
I've been able to produce the HTML reports with graphs appearing in the right place. By right place, I mean graphs appear directly under the Doxygen text referencing them.
But, with the latex file version of the report, I run the "pdflatex" against them to produce a PDF report. The problem is the graphs in this PDF report usually appear much later in the report than the text referencing them. This is very sloppy!
I can't change the text referencing the graphs because Doxygen produces the text.
Question: Do you have any suggestions on how I can fix this problem. (I find that questions such as this are too difficult for the general Doxygen community.)
Thank you,
I've been able to produce the HTML reports with graphs appearing in the right place. By right place, I mean graphs appear directly under the Doxygen text referencing them.
But, with the latex file version of the report, I run the "pdflatex" against them to produce a PDF report. The problem is the graphs in this PDF report usually appear much later in the report than the text referencing them. This is very sloppy!
I can't change the text referencing the graphs because Doxygen produces the text.
Question: Do you have any suggestions on how I can fix this problem. (I find that questions such as this are too difficult for the general Doxygen community.)
Thank you,
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Yipes! pdflatex command placing graphs in wrong place
This behaviour isn't sloppy at all, this is bu design. It is called floating behaviour and makes texts more easy to read and more efficient.
You can prevent that by not using a figure environment and instead using a minipage to put the figure and the caption (using
As i recall from your previous thread DOXygen uses package float along with the
You can prevent that by not using a figure environment and instead using a minipage to put the figure and the caption (using
\captioof{figure}{Your caption}
).As i recall from your previous thread DOXygen uses package float along with the
H
option to prevent floating.The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 51
- Joined: Wed Aug 06, 2014 6:59 pm
Yipes! pdflatex command placing graphs in wrong place
How do I center "Your caption."Johannes_B wrote:You can prevent that by not using a figure environment and instead using a minipage to put the figure and the caption (using\captioof{figure}{Your caption}
).
Thank you,
-
- Posts: 51
- Joined: Wed Aug 06, 2014 6:59 pm
Yipes! pdflatex command placing graphs in wrong place
So, how do I incorporate your code:Johannes_B wrote:instead using a minipage to put the figure and the caption (using\captioof{figure}{Your caption}
).
\captioof{figure}{Your caption}
into the following:
using a pdf figure called xyz_453 and caption saying "this is my caption."
Thanks,
Last edited by Stefan Kottwitz on Wed Aug 13, 2014 10:43 am, edited 1 time in total.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Yipes! pdflatex command placing graphs in wrong place
I made a typing mistake above, please note that the command is named
captionof
.Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{caption}\begin{document}\listoffigures\bigbreak\begin{minipage}{\linewidth}\begin{center}\rule{5cm}{4cm}\captionof{figure}{this is my caption}\end{center}\end{minipage}\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 51
- Joined: Wed Aug 06, 2014 6:59 pm
Yipes! pdflatex command placing graphs in wrong place
When I put that into the file (a few times), I get:Johannes_B wrote:I made a typing mistake above, please note that the command is namedcaptionof
.
Code: Select all
Code, edit and compile here:\documentclass{article}\usepackage{caption}\begin{document}\listoffigures\bigbreak\begin{minipage}{\linewidth}\begin{center}\rule{5cm}{4cm}\captionof{figure}{this is my caption}\end{center}\end{minipage}\end{document}
!LaTeX Error: \begin{minipage} on input line ... ended by \end{document}.
!Emergency stop.
a Fatal error occured no output PDF File produced.
Last edited by Michael_590 on Wed Aug 13, 2014 2:50 pm, edited 1 time in total.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Yipes! pdflatex command placing graphs in wrong place
Might be; as you can see, my code is correct. So i guess somewhere in the conversion process something went crazy. Best way to find the cause is to prepare a minimal working example and share it with us.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Yipes! pdflatex command placing graphs in wrong place
This looks like you forgot to insertMichael_590 wrote: When I put that into the file (a few times), I get:
!LaTeX Error: \begin{minipage} on intput line ... ended by \end{document}.
\end{minipage}
at one place.Stefan
LaTeX.org admin
-
- Posts: 51
- Joined: Wed Aug 06, 2014 6:59 pm
Yipes! pdflatex command placing graphs in wrong place
All the "\begin{minipage}" had a corresponding "\end{minipage}".
With the Doxygen output, I went back and replaced only one figure from:
to the following:
The resulting PDF file had a completely black figure with a right adjusted caption something like "classone_0_0two_three_1_1graphMycaption", but with the underscores gone and the numbers converted to subscripts. The caption fell off the right side of the page. The figure should have had boxes and arrows.
Thank you,
With the Doxygen output, I went back and replaced only one figure from:
Code: Select all
My caption for the figure is this.\nopagebreak\begin{figure}[H]\leavevmode\includegraphics[width=200pt]{classone_0_0two_three_1_1graph}\end{center}\end{figure}
Code: Select all
Code, edit and compile here:
\begin{minipage}{\linewidth}\begin{center}\rule{5cm}{4cm}\captionof{classone_0_0two_three_1_1graph}{My caption for the figure is this.}\end{center}\end{minipage}
Thank you,
-
- Posts: 51
- Joined: Wed Aug 06, 2014 6:59 pm
_____________________
Last edited by Michael_590 on Wed Aug 13, 2014 6:51 pm, edited 1 time in total.