LaTeX writer

33 views
Skip to first unread message

Yves Chevallier

unread,
Mar 26, 2016, 6:43:13 AM3/26/16
to sphinx-dev
Hi,

I feel pretty uncomfortable with the LaTeX output and I did not find the answers to my question on the official documentation so I looked at the sources `sphinx/writers/latex.py`. 

I would like to get a basic LaTeX output while being able to choose my own class. Unfortunately if I set `myclass` instead of `howto` it implies `report` instead of `article` which generates `chapters` that does not exist on `article`. Moreover there are some options that I want to remove such as `fontpkg` (`\\usepackage{times}`). 

Actually I would like to get rid of most the header, but it is almost fully hard-coded in LaTeXTranslator, default_elements. 

Reworking the code to achieve my goals would involve lots of changes and I think this could be greatly simplified by using a templating engine such as `jinja2`. 

To maximize the compatibility I imagine two templates: `sphinxhowto.cls.jinja` and `sphinxmanual.cls.jinja`. In the case somebody wants to use its own template, he can either use a plain class or a jinja template where he is free to add `{{fontpkg}}`.

Should I go in this direction ? 

Bram Geron

unread,
Apr 9, 2016, 6:23:25 PM4/9/16
to sphin...@googlegroups.com
Making the LaTeX templatable sounds great to me. I'm using Sphinx to write scientific papers, and I've needed to patch Sphinx in a couple of places to make the LaTeX output work. 
 
If I understand correctly, you're thinking of an architecture very similar to the HTML themes setup, is that correct?
 
Cheers, Bram (I'll try to reply faster next time)
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
Reply all
Reply to author
Forward
0 new messages