So sorry to resurrect this thread, but I am trying to include graphics for admonitions and would *love* it if I could refer to a working one.
I know I am a little late, Chip, but if you still have the style sheet I would be really interested to see it. On Wednesday, 1 July 2009 01:24:42 UTC+10, chip wrote: > > Günter, > Thanks for the tips. > > Guenter Milde wrote: > > On 2009-06-26, Wolfram Riedel wrote: > >> 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. > > > >> 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). > > > > Actually I redefined the admonitions to include a graphic for > note/warning/caution in the box along with the text, so it is a bit more > than a couple tweaks. If anyone is interested in the changes let me know. > > >> 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. > > > > Actually I was trying to avoid this in order to make the build process > easily repeatable on another system. Admittedly this is much better > than modifying the style in the system install. > > Many thanks, > Chip > > > Günter > > > > > > > > > > -- 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.
