...
> Trying to use memoir gives me this error (offcourse!).
> ! LaTeX Error: Two \documentclass or \documentstyle commands.
You need to change the documentclass that is used by Sphinx to "memoir".
in the projects config file.
> A latex knowlegdeable guy helped me make a list with a sidebar,
> but i don't knowhow to make use of if via sphinx. (make a directive).
> here is his code:
> --------
These lines should not be needed in your custom preamble (configure
Sphinx to use the document class and packages instead).
> \documentclass{memoir}
> \usepackage[T1]{fontenc}
> \usepackage[utf8]{inputenc}
> \usepackage[english]{babel}
> \usepackage{lmodern,lipsum}
> \usepackage{framed,xcolor} % needed for the new environments
Insert as custom preamble code from here on,
> \definecolor{linecolor}{rgb}{.64,.79,.62}
> \newenvironment{fancyenv}{%
...
You might also need to re-define some commands to use your custom versions.
All untested, but it might get you started...
Günter
>> > Trying to use memoir gives me this error (offcourse!).
>> > ! LaTeX Error: Two \documentclass or \documentstyle commands.
>> You need to change the documentclass that is used by Sphinx to "memoir".
>> in the projects config file.
> You mean the conf.py?
Yes.
> It seems the string sphinx is prepended to what i put in latex
> documents.
Strange.
> ---
> latex_documents = [
> ('index', 'graphexplorertutor.tex', u'Graph explorer \\& tutor
> Documentation : IMM-B.Eng-2010-50',
> u'Michael Kell Jensen', 'manual'),
> ]
> ---
> so if i change 'manual' to 'memoir' it
> looks for sphinxmemoir(.cls)
> Easily solved, i copy the memoir class from my tex distribution to a
> file named sphinxmemoir.cls.
> But maybe i should move sphinxmemoir.cls to my static files under my
> sphinx root?
The documentation
(http://sphinx.pocoo.org/config.html#confval-latex_documents) says:
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.
I read this that you can change 'manal' to one of the common LaTeX
documentclasses (like 'memoir' or 'article') and it should use
memoir.cls or whatever.
But need to have a \usepackage{sphinx} in the LaTeX preamble ::
latex_elements['preamble'] = '\usepackage{sphinx}'
to load the sphinx package (file sphinx.sty) that defines Sphinx-specific
LaTeX commands.
Günter