Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sphinx remove chapter title in my pdf with latexpdf?

I generate a documentation from rst to pdf with latexpdf and sphinx.

How can I remove chapter title before every chapter?

-----------

CHAPTER ONE

-----------
like image 335
Guillaume Vincent Avatar asked Sep 30 '14 12:09

Guillaume Vincent


Video Answer


2 Answers

As noted in the sphinx documentation you can change the latex_documents documentclass to a howto documentclass, which will get rid of the "Chaper" before your section. However, this will also change formatting slightly for the whole build.

documentclass: Normally, one of 'manual' or 'howto' (provided by Sphinx). Other document classes can be given, but they must include the “sphinx” package in order to define Sphinx’ custom LaTeX commands. “howto” documents will not get appendices. Also, howtos will have a simpler title page.

Just edit your conf.py and change manual to howto.

latex_documents = [
  ('index', 'foo.tex', u'foo Documentation',
   u'bar', 'howto'),
]
like image 110
Cole Avatar answered Oct 12 '22 15:10

Cole


As for the Chapter titles, from the Sphinx documentation and LaTeX customization:

Inclusion of the “fncychap” package (which makes fancy chapter titles), default '\usepackage[Bjarne]{fncychap}' for English documentation, '\usepackage[Sonny]{fncychap}' for internationalized docs (because the “Bjarne” style uses numbers spelled out in English). Other “fncychap” styles you can try include “Lenny”, “Glenn”, “Conny” and “Rejne”. You can also set this to '' to disable fncychap.

latex_elements = {
    'fncychap': '\\usepackage[Conny]{fncychap}',
    # ...
}

Also, I was trying to search for how to remove the Title page, and a search brought me here, so I thought I'd add my answer here.

To remove the title page, just set the following options:

latex_elements = {
    'maketitle': '',  # No Title Page
    # ...
}
like image 39
Devan Williams Avatar answered Oct 12 '22 15:10

Devan Williams