I'm attempting to convert latex to pdf, using doxygen generated latex files. I am using Doxygen 1.8.7. However, I keep getting this error:
我正在尝试将latex转换为pdf,使用doxygen生成的latex文件。我用的是Doxygen 1.8.7。然而,我一直犯这个错误:
!LaTex Error: Unknown float option 'H'.
...
1.6 \begin<figure>[H]
I've narrowed it down to a .tex file, which contains the following:
我已经将它缩小到一个.tex文件,其中包含以下内容:
\hypertarget{group___a_m_s___common}{\section{A\+M\+S\+\_\+\+Common}
\label{group___a_m_s___common}\index{A\+M\+S\+\_\+\+Common@{A\+M\+S\+\_\+\+Common}}
}
Collaboration diagram for A\+M\+S\+\_\+\+Common\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=334pt]{group___a_m_s___common}
\end{center}
\end{figure}
\subsection*{Modules}
\begin{DoxyCompactItemize}
\item
\hyperlink{group___common___error___codes}{A\+M\+S Common Error Codes}
\end{DoxyCompactItemize}
\subsection{Detailed Description}
Where do I go from here? Am I right in saying that it's looking for an image that it can't find?
我从这里去哪里?我的意思是,它在寻找一个它找不到的图像?
2 个解决方案
#1
2
This does indeed seem to be an issue with the float
package. I had the same problem. However, just adding EXTRA_PACKAGES=float
didn't fix it for me. I finally found this page which describes a conflict between the fixltx2e
package and the float
package which generates this error about the unknown H
option. So, I commented out line 11 where it says \usepackage{fixltx2e}
in the doxygen generated tex file (called refman.tex
for me). Then it converted to pdf without any further problems.
这似乎确实是浮动汇率制的一个问题。我也有同样的问题。但是,仅仅添加EXTRA_PACKAGES=float并不能解决这个问题。我最终找到了这个页面,它描述了fixltx2e包和float包之间的冲突,该冲突产生了关于未知H选项的错误。因此,我注释掉了第11行,其中doxygen生成的tex文件(名为refman)中显示了\usepackage{fixltx2e}。对我来说特克斯)。然后它转换为pdf,没有任何进一步的问题。
#2
1
As the latex error says, it's not looping for an image it can't find, but rather encountered an option to a floating element it doesn't understand. The 'H' option for float placement forces a figure to appear exactly at the place it appears in the latex code and essentially not to float. It requires the "float" package.
正如latex错误所指出的,它并不是对无法找到的图像进行循环,而是遇到了一个它不理解的浮动元素的选项。浮动位置的“H”选项迫使一个图形恰好出现在乳胶代码中的位置,实际上不允许浮动。它需要“浮动”包。
Thus in order to get your code working, add the following to the preamble:
因此,为了使代码正常工作,在前言中添加以下内容:
\usepackage{float}
I'm not sure how to tell Doxygen that this package is required so as to not have to touch the automatically generated latex files..
In fact according to the doxygen documentation here adding the following to your configuration file should do the trick:
我不知道如何告诉Doxygen这个包是必需的,这样就不用去碰自动生成的乳胶文件了。实际上,根据doxygen文档,在您的配置文件中添加以下内容应该可以达到以下目的:
EXTRA_PACKAGES=float
There's a discussion on the 'H' option over here and a rather detailed discussion on latex float placement in general here.
这里有一个关于H选项的讨论还有一个关于乳胶浮动布局的详细讨论。
#1
2
This does indeed seem to be an issue with the float
package. I had the same problem. However, just adding EXTRA_PACKAGES=float
didn't fix it for me. I finally found this page which describes a conflict between the fixltx2e
package and the float
package which generates this error about the unknown H
option. So, I commented out line 11 where it says \usepackage{fixltx2e}
in the doxygen generated tex file (called refman.tex
for me). Then it converted to pdf without any further problems.
这似乎确实是浮动汇率制的一个问题。我也有同样的问题。但是,仅仅添加EXTRA_PACKAGES=float并不能解决这个问题。我最终找到了这个页面,它描述了fixltx2e包和float包之间的冲突,该冲突产生了关于未知H选项的错误。因此,我注释掉了第11行,其中doxygen生成的tex文件(名为refman)中显示了\usepackage{fixltx2e}。对我来说特克斯)。然后它转换为pdf,没有任何进一步的问题。
#2
1
As the latex error says, it's not looping for an image it can't find, but rather encountered an option to a floating element it doesn't understand. The 'H' option for float placement forces a figure to appear exactly at the place it appears in the latex code and essentially not to float. It requires the "float" package.
正如latex错误所指出的,它并不是对无法找到的图像进行循环,而是遇到了一个它不理解的浮动元素的选项。浮动位置的“H”选项迫使一个图形恰好出现在乳胶代码中的位置,实际上不允许浮动。它需要“浮动”包。
Thus in order to get your code working, add the following to the preamble:
因此,为了使代码正常工作,在前言中添加以下内容:
\usepackage{float}
I'm not sure how to tell Doxygen that this package is required so as to not have to touch the automatically generated latex files..
In fact according to the doxygen documentation here adding the following to your configuration file should do the trick:
我不知道如何告诉Doxygen这个包是必需的,这样就不用去碰自动生成的乳胶文件了。实际上,根据doxygen文档,在您的配置文件中添加以下内容应该可以达到以下目的:
EXTRA_PACKAGES=float
There's a discussion on the 'H' option over here and a rather detailed discussion on latex float placement in general here.
这里有一个关于H选项的讨论还有一个关于乳胶浮动布局的详细讨论。