Graphics, Figures & TablesDoxyGen EXTRA_PACKAGES tag for Unknown figure float option H

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Michael_590
Posts: 51
Joined: Wed Aug 06, 2014 6:59 pm

DoxyGen EXTRA_PACKAGES tag for Unknown figure float option H

Post by Michael_590 »

When I run the pdflatex command on the output files from DoxyGen, I get the following error:

Code: Select all

!LaTeX Error: Unknown float option 'H'.
See the LaTeX manual or LaTeX Companion for explanation.
Type H (return) for immediate help
Question: What LaTeX commands do I put in the below DoxyGen add_this.sty file to automatically remove this error message.

Yea, I can manually fix this be removing "[H]" from all the various "\float[H]" instances, but that's too much work.

"[H]" is the LaTeX option to tell LaTeX add this figure here if possible.

But, DoxyGen has a configuration file where you can enter LaTeX commands into a file, and they will be put into all the LaTeX files that DoxyGen produces.

So, I tried putting the following into a file but it did not work. I still got the error.

Code: Select all

\usepackage{float}
\endinput
The name of the file that I put these statements in is called add_this.sty. To use this file in DoxyGen's configuration file, I entered the following: "EXTRA_PACKAGES = add_this.sty".

Note: Besides using the above "add_this.sty" file, I also tried "EXTRA_PACKAGES = float", but that did not work!

Background on the DoxyGen "EXTRA_PACKAGES" command:

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

DoxyGen EXTRA_PACKAGES tag for Unknown figure float option H

Post by Johannes_B »

Apart from the fact that it is bad style to prevent pictures from floating, that is not really a question about TeX.

Now it's the doxygen part that is failing. From what i can tell from the links you shared, you just have to add the following to your source. But as i never used doxygen, i cannot tell you where to put it precisely.

Code: Select all

EXTRA_PACKAGES = float
I am not aware of any other doxygen users within our little community. So posting your question at another site might help. But please link the questions against each other. This is common courtesy.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Michael_590
Posts: 51
Joined: Wed Aug 06, 2014 6:59 pm

Re: DoxyGen EXTRA_PACKAGES tag for Unknown figure float opti

Post by Michael_590 »

I've solved the problem by setting the Doxygen tag LATEX_BATCHMODE to "YES". This forces the pdflatex command to keep running if errors occur. The resulting PDF file is acceptable.

Thanks,
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: DoxyGen EXTRA_PACKAGES tag for Unknown figure float opti

Post by Johannes_B »

But be aware, that this also hides more serious errors, if present in your document.
A lot of users fall for this trap.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply