Re: rst2pdf (was [PATCH 00/10] Documentation/Sphinx)

From: Markus Heiser
Date: Fri Jun 10 2016 - 13:08:46 EST



Am 07.06.2016 um 08:44 schrieb Jani Nikula <jani.nikula@xxxxxxxxx>:

> On Tue, 07 Jun 2016, Markus Heiser <markus.heiser@xxxxxxxxxxx> wrote:
>> I looked closer to rst2pdf, it supports only the docutils reST, but
>> not the sphinx superset ...
>>
>> <SNIP rst2pdf>-------------
>> $ rst2pdf index.rst
>> index.rst:15: (ERROR/3) Unknown interpreted text role "ref".
>> index.rst:15: (ERROR/3) Unknown interpreted text role "ref".
>> index.rst:27: (ERROR/3) Unknown directive type "toctree".
>
> This doesn't actually happen if you run rst2pdf through Sphinx.
>

Aaah, thanks for hinting. With this in mind, I think rst2pdf
is a good choice and the minor bugs in could be handled. In the
long term a XeTeX builder as an alternative to produce layouts
with higher quality would be nice.

I (also) added rst2pdf:

https://github.com/return42/linux/commit/d88c4981f86fed85e54ee4d4955b35eb9eaac063

-- M --


>> .. toctree::
>> :maxdepth: 1
>>
>> kernel-doc-intro
>> kernel-doc-syntax
>> <SNAP>-------------
>>
>>
>> rules like ":ref:", domains like ":c:type:" and directives like ".. toctree:"
>> are a part of the (extended) reST syntax from sphinx, thats why
>> standard docutils (like rst2*) will not work ...
>
> You will get warnings like
>
> [WARNING] styles.py:548 Using undefined style 'function', aliased to style 'normal'.
> [WARNING] styles.py:548 Using undefined style 'type', aliased to style 'normal'.
>
> but it's a matter of defining a custom rst2pdf stylesheet. It's json
> with a sort of inheritance model, so it should be easy to just extend
> the existing stylesheet.
>
> BR,
> Jani.
>
> --
> Jani Nikula, Intel Open Source Technology Center