sphinx pdf style

279 views
Skip to first unread message

Minkai Li

unread,
Oct 14, 2016, 4:47:01 AM10/14/16
to sphinx-users
Sphinx generate pdf ,does this pdf has some  templates such as sphinx generate html use css files 

Peter Burdine

unread,
Oct 14, 2016, 7:41:39 PM10/14/16
to sphinx-users
The short answer is not in 1.4.x.  It looks like 1.5.x may have a little, but nothing as easy as CSS.  Start by reading through the sphinx.sty file (found in your latex build directory) to give you an idea of what you are dealing with.

It looks like you have made 6 threads all with basically the same (very open-ended)  question.  Customizing LaTeX content is not an easy task.  Please start by looking at other open source project examples.  Here are some example projects that I have used while learning.  Note that some of them will have addition prereqs (either Python or LaTeX libraries).

Jan Ulrich Hasecke

unread,
Oct 15, 2016, 8:00:25 AM10/15/16
to sphinx...@googlegroups.com
If you are able to handle xml files you can build a path from sphinx to
ConTeXt to produce very customized pdf files, which is a pain with the
LaTeX-implementation of Sphinx.

ConTeXt is a LaTeX alternative based on LuaTeX. You can customize your
layout with ConTeXt to a great extent.

http://wiki.contextgarden.net/Main_Page

The main advantage:
ConTeXt is able to read xml files, so you could create a singlehtml
output with Sphinx (which is afaik xml compliant) and feed it into ConTeXt.

In this repository you can see how this works generally and how to map
xml to ConTeXt commands.

https://github.com/ousia/from-pandoc-to-context

Of course, the solution does not work out of the box because the Sphinx
output differs to the Pandoc output. But it should be possible.

juh


--
Das ZEN von Pandoc
Bücher und E-Books einfach und professionell produzieren
http://www.amazon.de/Das-ZEN-von-Pandoc-professionell/dp/1505218799/
Paperback (232 Seiten) und E-Book

Brecht Machiels

unread,
Nov 2, 2016, 11:43:04 AM11/2/16
to sphinx...@googlegroups.com
On 2016-10-14 08:39:41 +0000, Minkai Li said:

> Sphinx generate pdf ,does this pdf has some  templates such as sphinx
> generate html use css files 

Customization of the document style is notoriously difficult in
(La)TeX. rinohtype offers an alternative PDF builder for Sphinx that
allows styling your document using style sheets similar to CSS.
rinohtype also generates a log of which styles have been applied to
which document elements, to help develop your style sheet. Please see
http://www.mos6581.org/rinohtype/ for details.

Beste regards,
Brecht


Reply all
Reply to author
Forward
0 new messages