>> I made some tweaks to the latex stylesheet sphinx.sty and I am trying
>> to determine the right way to handle these changes. Of course I can
>> keep the modified sphinx.sty in my installation, but it seems like
>> there should be a better way to do this.
> Much simpler. I put every style change into my own style file which I
> bind from conf.py using the 'latex_elements' option's 'preamble'.
> As example, you name your custom style file 'mycustomstyle.sty' and
> make this definition in conf.py:
> latex_elements = {
> 'preamble': '\\usepackage{mycustomstyle}'
> }
If it's just some small tweaks, you can load the standard style and put
them in the LaTeX preamble instead (this can include loading of other
packages, overwriting definitions or additional commands and settings).
> Just copy the desired parts of the default style file over to your
> custom style file and adjust it to your needs. The modificated
> definitions will overwrite the default definitions. Maybe you
> sometimes have to use \renewcommand{} instead of \newcommand{}, I
> guess you'll figure this out.
> Also, you need to add your style file to conf.py once more to
> automatically let sphinx copy it to the build directory:
> latex_additional_files = ['mycustomstyle.sty']
This is not even necessary if you put the custom style file in the LaTeX
path (e.g. ~/texmf/tex/latex) on the system where you run latex.
Günter