使用doxygen生成具有自定义结构的PDF 在讨论细节之前,先简要介绍一下:

使用doxygen生成具有自定义结构的PDF 在讨论细节之前,先简要介绍一下:,pdf,doxygen,Pdf,Doxygen,我正在尝试自定义doxygen生成的pdf文档结构。我已经在为html和chm输出做这项工作,但对于pdf它不起作用。 我的主要问题是,这是设计上的限制还是我遗漏了什么? 如果这是出于设计,那么从doxygen开始,是否还有其他方法可以生成定制的pdf文档 详情如下: 我们使用doXEGEN为C API生成源代码文档,它也用C++、C语言和java包。 我们希望在一个文档中记录所有这些语言,但要按语言进行结构。为了实现这一点,我们通过以下方式使用DoxygenLayout.xml文件定制了文档结

我正在尝试自定义doxygen生成的pdf文档结构。我已经在为html和chm输出做这项工作,但对于pdf它不起作用。
我的主要问题是,这是设计上的限制还是我遗漏了什么?
如果这是出于设计,那么从doxygen开始,是否还有其他方法可以生成定制的pdf文档

详情如下:

我们使用doXEGEN为C API生成源代码文档,它也用C++、C语言和java包。 我们希望在一个文档中记录所有这些语言,但要按语言进行结构。为了实现这一点,我们通过以下方式使用DoxygenLayout.xml文件定制了文档结构:

  • 首先是几页描述性文本,适用于所有人 语言,我们称这部分为“用户手册”
  • 其次是API文档,它被组织成不同的语言
换句话说,我们完全禁用了标准结构并定义了我们自己的结构。 布局定义与此简化示例非常相似:

  <navindex>
    <tab type="mainpage" visible="yes" title="My Project"/>
    <tab type="pages" visible="no" title="" intro=""/>
    <tab type="modules" visible="no" title="" intro=""/>
    <tab type="namespaces" visible="no" title="">
      <tab type="namespacelist" visible="no" title="" intro=""/>
      <tab type="namespacemembers" visible="no" title="" intro=""/>
    </tab>
    <tab type="classes" visible="no" title="">
      <tab type="classlist" visible="no" title="" intro=""/>
      <tab type="classindex" visible="no" title=""/> 
      <tab type="hierarchy" visible="no" title="" intro=""/>
      <tab type="classmembers" visible="no" title="" intro=""/>
    </tab>
    <tab type="files" visible="no" title="">
      <tab type="filelist" visible="no" title="" intro=""/>
      <tab type="globals" visible="no" title="" intro=""/>
    </tab>
    <tab type="examples" visible="no" title="" intro=""/>  

    <tab type="usergroup" title="User Manual">
        <tab type="user" title="Page 1" url="@ref page1"/>
    </tab>

    <tab type="usergroup" title="API documentation">
        <tab type="usergoup" title="C">
            <tab type="user" title="SomeFunction" url="@ref SomeFunction" />
            <tab type="user" title="AnotherFunction" url="@ref AnotherFunction" />
        </tab>
        <tab type="usergoup" title="C#">
            <tab type="usergroup" title="A.Class1">
                <tab type="user" title="SomeFunction" url="@ref A.Class1.SomeFunction" />
            </tab>
            <tab type="usergroup" title="B.Class2">
                <tab type="user" title="AnotherFunction" url="@ref B.Class2.AnotherFunction" />
            </tab>
        </tab>
        <tab type="usergoup" title="Java">
            <tab type="usergroup" title="com.xyz.A.Class1">
                <tab type="user" title="SomeFunction" url="@ref com.xyz.A.Class1.SomeFunction" />
            </tab>
            <tab type="usergroup" title="com.xyz.B.Class2">
                <tab type="user" title="AnotherFunction" url="@ref com.xyz.B.Class2.AnotherFunction" />
            </tab>
        </tab>
    </tab>
</navindex>

Doxygen在latex目录中生成许多文件,在这种情况下,最值得注意的是:

  • refman.tex具有许多设置和不同章节的内容,可能最适合您想要的东西
  • 带有doxygen使用的设置的doxygen.sty。可以修改此文件(不是真正的建议),也可以通过配置标记LATEX_extra_STYLESHEET添加额外的样式表,其中可以否决(例如,通过续订命令)默认命令
值得注意的还有LATEX_页眉、LATEX_页脚、额外的_包等设置,请参阅文档(中的“配置”一章)了解这些以及更多的可能性

对于docbook输出,当前版本1.8.15可能会更好一些,但docbook没有特殊的“样式表”

# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
# output files in an output format independent way. To create the layout file
# that represents doxygen's defaults, run doxygen with the -l option. You can
# optionally specify a file name after the option, if omitted DoxygenLayout.xml
# will be used as the name of the layout file.
#
# Note that if you run doxygen from a directory containing a file called
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
LAYOUT_FILE            = "DoxygenLayout.xml"