Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.
\def\sphinxdocclass{scrbook}
\documentclass[,]{sphinxmanual}

Here's the code from my conf.py:

latex_elements = {
     'papersize': '',
     'fontpkg': '',
     'fncychap': '',
     'maketitle': '',
     'pointsize': '',
     'preamble': '',
     'releasename': "",
     'babel': '',
     'printindex': '',
     'fontenc': '',
     'docclass':'scrbook',
     '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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.