Python-Sphinx:用自定义页面替换标准首页

时间:2019-04-18 12:45:16

标签: formatting latex python-sphinx

我很高兴地探索Sphinx的功能,到目前为止一切都还不错。我现在要做的是用我的自定义LaTeX-Documentclass中的几个命令替换首页的标准乳胶格式。在代码中:

    [...]
    \begin{document}

    \ifdefined\shorthandoff
      \ifnum\catcode`\=\string=\active\shorthandoff{=}\fi
      \ifnum\catcode`\"=\active\shorthandoff{"}\fi
    \fi

    %%%%%%%% I needed to comment out / suppress these standard commands %%%%
    %\pagestyle{empty}
    %\maketitle
    %\pagestyle{plain}
    %\sphinxtableofcontents
    %\pagestyle{normal}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%
    \phantomsection\label{\detokenize{SoftwareTools/DeviceScanner/indexDeviceScanner::doc}}

    %%%% These custom commands can be injected via .. raw:: latex %%%%
    \renewcommand\documentTitle{Title Text}
    \renewcommand\documentPurpose{Purpose Text}
    \renewcommand\documentOwnerUnit{Text}
    \renewcommand\documentValidFor{Text}
    \renewcommand\documentAuthors{Author}
    \begin{fcdFrontPage}
    \fcdVersionTableRow{###}{Text}{Text}{Text}{Text}
    \end{fcdFrontPage}

我已经发现指令 .. raw :: latex ,该指令用于注入自定义命令,效果很好。但是如何摆脱标准标题页格式?

1 个答案:

答案 0 :(得分:0)

我在tex.stackexchange中的重复帖子中回答了这个问题:

https://tex.stackexchange.com/q/485505/136433