首页 > 解决方案 > Doxygen LaTeX 输出段落缩进

问题描述

我有一个软件手册,我正在用 Doxygen+Markdown 记录,输出是 PDF 文件。默认的 Doxygen LaTeX 标头使用\setlength{\parindent}{0cm}. 我试图将其更改为\setlength{\parindent}{20pt},但输出 PDF 仍然没有缩进的段落。我想知道我是否需要改变doxyparagraph风格。

谢谢!

编辑:

我正在使用 Markdown 文件中的文本和其他内容。查看其中一个 MD 文件中的 TeX 文件,我看不到关于它们如何定义的任何特殊(环境等)。在 MD 文件中,我有:

### Boot Initialization {#prom_rom_boot_initialization}
The boot ROM performs basic system initialization required for booting the
system. The system initialization consists of the following:

这会产生:

\hypertarget{program_rom_chapter_prom_rom_boot_initialization}{}\doxysubsubsection{Boot Initialization}\label{program_rom_chapter_prom_rom_cfx_boot_initialization}
The boot R\+OM performs basic system initialization required for booting the system. The system initialization consists of the following\+:

doxysubsection在默认的 Doxygen LaTeX 样式中定义为:

\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\raggedright\normalfont\large\bfseries}}

所以我尝试在我的标题中执行以下操作:

\renewcommand{\paragraph}{%
    \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
        \setlength{\parindent}{20pt}%
        \normalfont\normalsize\bfseries\SS@parafont%
    }%
}
\renewcommand{\subparagraph}{%
    \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
        \setlength{\parindent}{20pt}%
        \normalfont\normalsize\bfseries\SS@subparafont%
    }%
}
\makeatother

那没有用。

所以我尝试parindent在我的文档中设置:

\documentclass[parindent=20pt,10pt,twoside,openany]{book}

并使用 ragged2e 包。我已经添加

\usepackage[document]{ragged2e}
\setlength{\RaggedRightParindent}{\parindent}

到我的头。并设置\parindent=20pt而不是\setlength{\parindent}{0cm}.

我仍然没有缩进的段落。

标签: latexdoxygen

解决方案


推荐阅读