Wolfram, Thanks for the help. That's exactly what I was looking for. -Chip
Wolfram Riedel wrote: > > Hi. > > On Jun 26, 8:28 pm, chip <[email protected]> wrote: >> 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. >> >> I've noticed that the latex builder copies over the stylesheet and the >> other files in texinputs, so I am guessing that I should create and >> register a new builder following the guidelines on the Sphinx >> homepage. Can someone tell me if this is the right way to go about >> it, or is there a better way? > > 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}' > } > > 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'] > > Should be all there is to it. > > Cheers, > Wolfram > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
