I haven't used the Jypyter notebook extension, but I would assume it is the
same process. You need to include a LaTeX preamble that overwrites various
macros predefined by Sphinx. I haven't updated to 1.5 yet (still on 1.4).
Update your conf.py to specify a preamble:
PREAMBLE = string.Template(open(
os.path.join(os.path.abspath('.'),'preamble.tex')
).read())
latex_elements = {
...
'preabmle': PREAMBLE,
...
}
Then the title page (and all the front matter) is made by the \maketitle
macro, so you will need to redefine it in your preamble, eg:
\renewcommand{\maketitle}{%
\begin{titlepage}%
\pagenumbering{roman}
\thispagestyle{titlepage}
....
\newpage % Make as many pages in the front matter as you want
% Second page contents go here....
}%
}
As for the custom logo, you can setup the headers with something like this::
\fancypagestyle{normal}{
\fancyhead[L]{\sphinxlogo
\vfill}
}
You set the path to the logo in your conf.py:
latex_logo = 'some_relative_path/image.png'
Its been a long time since I set this up, so I may be missing a few steps.
You need to become at least a beginner in LaTeX to make this work. It took
me quite a few days to make it work right the first time I did that, and
that was a year and a half ago, so my memory is a bit fuzzy.
Good luck!
--Peter
On Friday, December 29, 2017 at 6:04:06 AM UTC-8, Rene Dworschak wrote:
>
> Hello
>
> i need some help with the latex output from sphinx - my old conf files
> aren't working.
>
> First i am using Python3.6 / Sphinx v1.5.6 with Jupyter Notebook Tools for
> Sphinx to get html/pdf output from my notebooks. So far it works.
> Long time ago i have used http://jterrace.github.io/sphinxtr/ for my RST
> documentation. (Python 2 + old sphinx)
>
> The old sphinxtr template got a nice titlepage modification ..but now i
> did not get it to work.
>
> so my questions are for Sphinx v1.5.6. What i the best way to get....
>
> * custom titlepage (in a separate single file which can be included)
> * custom page behind the titlepage (in a separate single file which can
> be included)
> * image in the \fancyhead
> * copy additional files into tex build dir?
>
> Proposals welcome....
>
> regards René
>
>
>
>
>
>
>
>
--
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.