lkml.org 
[lkml]   [2016]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: rst2pdf (was [PATCH 00/10] Documentation/Sphinx)
Date
On Tue, 07 Jun 2016, Markus Heiser <markus.heiser@darmarit.de> 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.

> .. 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

\
 
 \ /
  Last update: 2016-06-07 09:01    [W:0.255 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site