Guillaume Vincent
Guillaume Vincent

Reputation: 14791

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

-----------

Upvotes: 9

Views: 4540

Answers (2)

Devan Williams
Devan Williams

Reputation: 1417

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
    # ...
}

Upvotes: 4

Cole
Cole

Reputation: 1779

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'),
]

Upvotes: 6

Related Questions