Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos ReadtheDocs:Latex宏在HTML和PDF版本之间更改 我有一些latex宏,它们在我的文档中都是相同的。 我在我的conf.py中使用以下代码使其在latex中工作: 我使用以下preamble.rst文件,并将其包含在其他rst文件中, 要使其适用于html构建,请执行以下操作:_Macos_Latex_Read The Docs - Fatal编程技术网

Macos ReadtheDocs:Latex宏在HTML和PDF版本之间更改 我有一些latex宏,它们在我的文档中都是相同的。 我在我的conf.py中使用以下代码使其在latex中工作: 我使用以下preamble.rst文件,并将其包含在其他rst文件中, 要使其适用于html构建,请执行以下操作:

Macos ReadtheDocs:Latex宏在HTML和PDF版本之间更改 我有一些latex宏,它们在我的文档中都是相同的。 我在我的conf.py中使用以下代码使其在latex中工作: 我使用以下preamble.rst文件,并将其包含在其他rst文件中, 要使其适用于html构建,请执行以下操作:,macos,latex,read-the-docs,Macos,Latex,Read The Docs,sphinx的一个问题是,需要为每个宏定义宏 页面用于html,仅用于latex/pdf一次 在构建html文件时,我不会对源代码进行任何更改 当我构建latex/pdf文件时,我会删除包含 在序言.rst文件中使用latex宏。否则我会得到很多 宏的定义 在构建latex/pdf时,如何让ReadtheDocs删除Premission.rst中的宏 latex_elements = { 'preamble' : r'\newcommand{\B}[1]{{\bf

sphinx的一个问题是,需要为每个宏定义宏 页面用于html,仅用于latex/pdf一次

  • 在构建html文件时,我不会对源代码进行任何更改

  • 当我构建latex/pdf文件时,我会删除包含 在
    序言.rst
    文件中使用latex宏。否则我会得到很多 宏的定义

  • 在构建latex/pdf时,如何让ReadtheDocs删除
    Premission.rst
    中的宏

    latex_elements = {
        'preamble' :
            r'\newcommand{\B}[1]{{\bf #1}} '  + '\n' +
            r'\newcommand{\R}[1]{{\rm #1}} '  + '\n'
        }
    
    .. |space| unicode:: 0xA0
    .. |tab| replace:: |space| |space| |space| |space|
    
    .. comment BEGIN_LATEX_MACROS
        These latex macros must also be defined in latex_elements in conf.py
    
    .. rst-class:: hidden
    
        :math:`\newcommand{\B}[1]{ {\bf #1} }`
        :math:`\newcommand{\R}[1]{ {\rm #1} }`
    
    .. comment END_LATEX_MACROS