How do I get rid of the “Release 1” in the Page Header of the Sphinx Latex Output?

后端 未结 4 1399
我在风中等你
我在风中等你 2020-12-21 07:08

I\'m using the \"manual\" document class of Sphinx and I\'m quite happy with how the Latex Output looks like, except for the page header. It contains the title of my paper,

相关标签:
4条回答
  • 2020-12-21 07:43

    You can use stopwords - Stopwords are the words that will not be indexed.

    http://sphinxsearch.com/docs/current.html#conf-stopwords

    0 讨论(0)
  • To suppress the release info at the top of your Latex output, you need to set the release and latex_elements['releasename'] to empty strings in your conf.py. So you might add or modify something like this in conf.py:

    release = ''
    latex_elements = { 'releasename': '' }
    

    Then the release info will be hidden.

    0 讨论(0)
  • 2020-12-21 07:55

    As of Sphinx 1.5 something, the workaround of setting an empty string stopped working - at least in my case (I had used it to suppress printing "Release " on the title page) . However, setting release to a blank space does work for me. There's more discussion of it here in the Sphinx-Users group: https://groups.google.com/forum/#!topic/sphinx-users/L5PUfwVu8f0 and there was a related bug report filed: https://github.com/sphinx-doc/sphinx/pull/4411

    0 讨论(0)
  • 2020-12-21 07:58

    The bellow lines eliminate also the comma in the header. Add them in your conf.py file:

    latex_custom = r'''
    \makeatletter
    
        \fancypagestyle{normal}{
            \fancyhf{}
            \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
            \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}}
            \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
            \fancyhead[LE,RO]{{\py@HeaderFamily \@title}}
            \renewcommand{\headrulewidth}{0.4pt}
            \renewcommand{\footrulewidth}{0.4pt}
    
    \makeatother
    '''
    
    latex_elements = {'preamble': latex_custom}
    

    Such a solution affects only the header. If you want to remove the release sign also from the front page use the solution provided by ddbeck.

    0 讨论(0)
提交回复
热议问题