I can't share my exact coverpage, but here are some references I used when learning how to do it:
- https://github.com/mapserver/docs - https://github.com/i6/ibg I generate a variety of documents, but they all have the "same" title page format, but the title, document number, etc differ. I store my preamble in a file that is a string.Template and then load it. PREAMBLE = string.Template(open( os.path.join(os.path.abspath('.'), 'latex_templates/preamble.tex') ).read()) Then I define the following for the front matter (note that some of these are commands defined in the preamble or other included .tex/.sty file): latex_contents = r''' \setupHeadFootForFrontMatter \formattoc \maketitle \signaturepage \revisionhistory \tableofcontents \clearpage \listoffigures \clearpage \listoftables \clearpage \setupHeadFootForText \pagenumbering{arabic} \pagestyle{plain} ''' Now apply them in latex_elements: latex_elements = { # ... put your stuff here # Customize below for your template 'preamble': PREAMBLE.substitute(docrevision=document_rev, documentnumber=documentnumber, ), # Redefine tableofcontents to be the commands you want to run 'tableofcontents': latex_contents, # Make this not look like a book 'classoptions': ',openany,oneside', # .. Anything else you want to do } If you have additional latex files that are required (eg your own style file) add them below that: latex_additional_files = ['latex_templates/my_style.sty', ] Now here is what my title pages looks like: \renewcommand{\maketitle}{% \begin{titlepage}% \pagenumbering{roman} \thispagestyle{titlepage} \let\footnotesize\small \let\footnoterule\relax %\rule{\textwidth}{1pt}% \ifsphinxpdfoutput \begingroup % These \defs are required to deal with multi-line authors; it % changes \\ to ', ' (comma-space), making it pass muster for % generating document info in the PDF file. \def\\{, } \def\and{and } \pdfinfo{ /Author (\@author) /Title (\@title) } \endgroup \fi \begin{center}% {\rm\Huge\py@HeaderFamily \@title \par}% {\em\LARGE\py@HeaderFamily \py@release\releaseinfo \par} \vfill {\LARGE\py@HeaderFamily \begin{tabular}[t]{c} \@author \end{tabular} \par} \py@authoraddress \par \vfill\vfill {\large \vfill %\@date \par \vfill }% \end{center}%\par \@thanks \end{titlepage}% \cleardoublepage% \setcounter{footnote}{0}% \let\thanks\relax\let\maketitle\relax %\@ifundefined{fancyhf}{}{\pagestyle{normal}}% } The preamble has sections that look like this to make it work like a template: \def\documentnumber{${documentnumber}} \def\docrevision{${docrevision}} It really is only a slightly modified version, but I broke out the table of contents into latex_contents. Then added table of tables, table of figures, modified the headers/footer, etc there as well. If you look around, you can find other open sourced projects that are good examples. Latex is its own language and with most languages, there are about 15 ways of doing thing. I spent a lot of time googling how things work before I was able to get something working that looked nice. On Thursday, December 15, 2016 at 8:04:46 AM UTC-8, Warren Block wrote: > > Is there an actual, complete example that shows the magical mix of files > and latex commands to produce a modified cover sheet? A trivial example > would be fine. > > It appears that \maketitle needs to be redefined, but my attempts at > that fail with TeX errors. Or I could define my own and set 'maketitle' > in latex_elements in conf.py. Maybe. So far, none of the examples I > have found show an actual, complete, working example. > > Given that this is the only way to create a custom cover page with the > default Sphinx configuration, such an example should be part of the > Sphinx docs. > > I am using Sphinx 1.4.8. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.
