[dpdk-dev] [PATCH v2 2/4] doc: Add Sphinx config to build pdf version of guides

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Jan 30 22:03:28 CET 2015


2015-01-30 18:13, John McNamara:
> Add Python Sphinx config to allow conversion of guides
> to PDF format.
> 
> Signed-off-by: John McNamara <john.mcnamara at intel.com>
> ---
>  doc/guides/conf.py                |   51 ++++++++++++++++++++++++++++++++++---
>  doc/guides/freebsd_gsg/conf.py    |   41 +++++++++++++++++++++++++++++
>  doc/guides/linux_gsg/conf.py      |   41 +++++++++++++++++++++++++++++
>  doc/guides/prog_guide/conf.py     |   41 +++++++++++++++++++++++++++++
>  doc/guides/rel_notes/conf.py      |   41 +++++++++++++++++++++++++++++
>  doc/guides/sample_app_ug/conf.py  |   41 +++++++++++++++++++++++++++++
>  doc/guides/testpmd_app_ug/conf.py |   41 +++++++++++++++++++++++++++++
>  7 files changed, 293 insertions(+), 4 deletions(-)
>  create mode 100644 doc/guides/freebsd_gsg/conf.py
>  create mode 100644 doc/guides/linux_gsg/conf.py
>  create mode 100644 doc/guides/prog_guide/conf.py
>  create mode 100644 doc/guides/rel_notes/conf.py
>  create mode 100644 doc/guides/sample_app_ug/conf.py
>  create mode 100644 doc/guides/testpmd_app_ug/conf.py

I think it is possible to use the existing conf.py.
The only thing different in all these files is the generated filename
which could be computed from the title or extracted from an rst comment.

> --- a/doc/guides/conf.py
> +++ b/doc/guides/conf.py
> +texinfo_documents = [
> +    ('index',
> +     '',
> +     '',
> +     '',
> +     '',
> +     '',
> +     'Miscellaneous')]

Why texinfo?

> +
> +# Override the dafault Latex formatter.

Typo: default

> +class CustomLatexFormatter(LatexFormatter):
> +
> +    def __init__(self, **options):
> +
> +        super(CustomLatexFormatter, self).__init__(**options)
> +
> +        self.verboptions = r"formatcom=\footnotesize"

Please comment this line. I don't understand.

> +
> +PygmentsBridge.latex_formatter = CustomLatexFormatter

-- 
Thomas


More information about the dev mailing list