【问题标题】:Doxygen generated latex failing with pdflatexDoxygen 生成的乳胶使用 pdflatex 失败
【发布时间】:2015-10-25 21:43:57
【问题描述】:

我已经用 doxygen 生成了乳胶,然后我运行 make pdf 命令。

这是我第一次尝试。

[mysite.lan] (liberz) latex> make pdf
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf
pdflatex refman
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.

kpathsea: Running mktexfmt pdflatex.fmt
/usr/bin/mktexfmt: line 395: /usr/share/texlive/texmf/texconfig/tcfmgr: No such file or directory
fmtutil: config file `fmtutil.cnf' not found.
I can't find the format file `pdflatex.fmt'!
make: *** [refman.pdf] Error 1

我查看了mkexfmt 命令,它正在尝试将tcfmgr 作为命令调用。

/usr/share/texlive/texmf/texconfig 文件夹存在,但里面没有tcfmgr 命令。

之前我得到pdflatex 命令找不到,所以这是最近安装的。

[编辑回答版本信息问题]我确定我需要安装更多工具,但不清楚我需要安装哪些软件包。我正在使用 CentOS 7.1。

> pdflatex -version
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.13; using libpng 1.5.13
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with poppler version 0.22.5

【问题讨论】:

  • 你安装了哪个乳胶发行版?也许您应该确保已安装所有必要的工具。这包括一个乳胶发行版(如 MikTex)、一个 TCL 解释器(如 ActiveTCL)和 Ghostscript。
  • 在命令行中输入 doxygen -w latex headerFile footerFile styleSheetFile 让 doxygen 创建一个 Latex 头文件和样式表文件。然后你可以分析这些文件,找出doxygen创建的latex代码使用了哪些latex包。
  • 供以后参考:这个错误I can't find the format file pdflatex.fmt表示TeX发行版坏了,最好重新安装。它不应该发生(但显然它可以)。

标签: doxygen pdflatex


【解决方案1】:

Doxygen PDF 输出依赖于pdflatex 命令,该命令在 CentOS 7 中由 texlive-latex-bin-bin 包提供,但 runnig make pdf 调用另一个命令 tcfmgr,它由 texlive-texconfig 提供,因此,运行以下命令安装这些依赖项:

yum install -y texlive-latex-bin-bin texlive-texconfig

您可以检查哪些软件包提供了任何必要的文件:

$ yum --quiet provides "*bin/pdflatex"

...
2:texlive-latex-bin-bin-svn14050.0-38.20130427_r30134.el7.noarch :
Binaries for latex-bin
Repo        : base
Matched from:
Filename    : /usr/bin/pdflatex

$ yum --quiet provides /usr/share/texlive/texmf/texconfig/tcfmgr

...
2:texlive-texconfig-svn29349.0-38.el7.noarch : texconfig package
Repo        : base
Matched from:
Filename    : /usr/share/texlive/texmf/texconfig/tcfmgr

但即使满足了这 2 个基本要求,我发现还有许多其他消息,而减少警告的整个列表是:

xargs <<_EOF_ yum -y install
texlive-latex-bin-bin
texlive-texconfig
texlive-metafont-bin
texlive-iftex
texlive-cm
texlive-xtab
texlive-multirow
texlive-ec
texlive-sectsty
texlive-fancyhdr
texlive-natbib
texlive-tocloft
texlive-tex4ht
texlive-helvetic
texlive-pslatex
texlive-courier
texlive-times
texlive-metapost
texlive-symbol
texlive-rsfs
texlive-dvips
texlive-base
texlive-makeindex-bin
_EOF_

...
Transaction Summary
==============================================================================================================================
Install  23 Packages (+132 Dependent packages)

Total download size: 43 M
Installed size: 134 M
...

虽然 Tex2PDF 转换会产生很多警告,但生成的文档还是很令人满意的。

[11 月 8 日编辑] 如果你想要一个“推荐”包安装,你可以选择这些“虚拟”包中的一个需要其他包集,以组成一个更“完整的包" Latex 环境,综合性高的顺序:

  • texlive-collection-latex:LaTeX 基础包
  • texlive-collection-latexrecommended : LaTeX 推荐包
  • texlive

【讨论】:

  • @MichaelPotter,如果我的问题对您的 CentOS 问题有任何帮助,或者对此有任何疑问,请告诉我。
猜你喜欢
  • 2015-01-20
  • 1970-01-01
  • 2011-01-09
  • 1970-01-01
  • 2014-04-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多