TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Sphinx to generate multi-output documents (Epub, HTML, LaTeX). How can I change the use documentclass?

The following snippet should (in my opinion) override the used class but results in

% Generated by Sphinx.

Here's the code from my conf.py:

latex_elements = {
     'papersize': '',
     'fontpkg': '',
     'fncychap': '',
     'maketitle': '',
     'pointsize': '',
     'preamble': '',
     'releasename': "",
     'babel': '',
     'printindex': '',
     'fontenc': '',
     'inputenc': '',
     'classoptions': '',
     'utf8extra': '',

The manual says, it should not be overridden, since other macros are responsible to set it. Is there a workaround?

share|improve this question
up vote 2 down vote accepted

Looking at https://github.com/basespace/basespace-python-sdk/blob/master/doc/latex/sphinxmanual.cls it seems that class just loads the class specified by \sphinxdocclass so your generated code looks OK.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.