Tarek Ziadé schrieb:
>
> I finally managed to do it without changing the code, thanks to the
> latex_preamble option.
>
> I am injecting in the latex file my latex options to be able to render a
> PDF that looks french
> and compiles well on my environment.
>
> latex_preamble = open('my-options.tex').read()
>
> I have attached an example for people that want to do the same kind of
> thing.
> It was a bit tricky because Sphinx defines the "at" command which is
> already defined by other packages
> needed, so I had to rename the command with some \expandafter.
I've renamed these commands now -- in Sphinx for the case no Pygments is
installed, and in Pygments in trunk, which will be in 0.12.
> Nevertheless, I think the header created for the latex file makes some
> assumptions, like:
>
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
>
> It would be nice if we could configure them through conf.py as well.
I guess you're all in favor of what I proposed in the other mail? If you
missed it, I proposed a setting like
latex_elements = {
'babel': '\\usepackage{polski}',
'fncychap': '\\usepackage[Lenny]{fncychap}',
'fontenc': '\\usepackage[OT1]{fontenc}',
'preamble': '...',
}
to configure every aspect of Sphinx' generated preamble.
Georg
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---