On 2009-12-08, akean wrote:
> On Dec 8, 11:56 am, Nahuel Defossé <
nahuel.defo...@gmail.com> wrote:
>> I've trying to hack the latex output, in manual document class so that page
>> numbers are printed always in the same side.
>> All I need is to print my document as a Single Sided document, but sphinx by
>> default outputs two sided docs.
>> Adding \fancyheader{} to latex_preamble in conf.py does nothing, and my
>> latex knowledge is too poor to solve this :'(
> The file manual.cls in your build/latex directory (after sphinx has
> built the tex file) has the line
>> \LoadClass[twoside, openright]{report}
> that's passing the twoside option to the report class -
> delete the twoside option and remake the pdf from the tex file, and
> the page numbers are all printed on one side.
>> \LoadClass[openright]{report}
The openright is not needed either.
>> \LoadClass[openright]{report}
> The file manual.cls is copied into the build/latex directory from the
> texinputs directory of your sphinx installation. You could change it
> there while you want one-sided printing.
> Hope that helps.
It is generally considered harmfull to modify LaTeX style or class files
without renaming: Different output from the same documentclass is hard to
debug.
Therefore I recommend to create a modified version under a different
name, place it alongside the standard manual.cls (on my system this
would be /usr/share/sphinx/texinputs/) or in the TEXPATH (on my system
e.g. ~/texmf/tex/latex/) and configure the latex-documentclass setting
accordingly.
I created a modification of the standard documentclass called
sphinx-manual.cls that can be loaded with the 'oneside' option overriding
the 'twoside' default and 'openany' overriding 'openright' a year
agon(2008/10/18). I think I also posted it to the sphinx list -- on
demand I can post it (again).
Günter