Hi all, I recently started to use sphinx and latex to create my documentation, but I need to update the default header and footer content. So I ended up here. The thing is that when I add your content to my 'preamble' key in the latex_elements dict of my conf.py file, it gives me the following error:
! LaTeX Error: Missing \begin{document}. In my conf.py: latex_elements = { 'papersize': 'a4paper', 'preamble': ''' \makeletter ... \makeatother ''' } Any idea what can be wrong here? I installed the default Sphinx 1.1.3 on an Ubuntu 13.04 64-bit. Any idea what I'm doing wrong? On Thursday, July 22, 2010 1:43:54 PM UTC+2, slafs wrote: > > Thanks it worked. > > To clarify > > i used this in my conf.py in latex_preamble variable: > > \makeatletter > \fancypagestyle{normal}{ > \fancyhf{} > \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}} > \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}} > \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}} > \fancyhead[LE,RO]{{\py@HeaderFamily \@title}} % here's the change > \renewcommand{\headrulewidth}{0.4pt} > \renewcommand{\footrulewidth}{0.4pt} > } > \makeatother > > Regards > > On 22 Lip, 01:57, Georg Brandl <ge...@python.org> wrote: > > Am 20.07.2010 16:57, schrieb slafs: > > > > > Hi there! > > > > > Currently sphinx generates me a pretty pdf through > > > > >> make latex > > > and > > >> make all-pdf > > > > > What I'm looking for is a way of customizing the header which now is a > > > concatenation of > > > project_name + ", " + release > > > > > Can I somehow declare my own header or footer in there? > > > > Yes; currently the header line is defined like this in sphinx.sty: > > > > \fancyhf{} > > \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}} > > \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}} > > \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}} > > \fancyhead[LE,RO]{{\py@HeaderFamily \@title, \py@release}} > > > > You can customize this is latex_elements['preamble'] by using > > these commands again (between \makeatletter and \makeatother). > > > > Georg -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To post to this group, send email to sphinx-users@googlegroups.com. Visit this group at http://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/groups/opt_out.