From: John McNamara <john.mcnamara@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 2/4] doc: Add Sphinx config to build pdf version of guides
Date: Fri, 30 Jan 2015 18:13:26 +0000 [thread overview]
Message-ID: <1422641608-8514-3-git-send-email-john.mcnamara@intel.com> (raw)
In-Reply-To: <1422641608-8514-1-git-send-email-john.mcnamara@intel.com>
Add Python Sphinx config to allow conversion of guides
to PDF format.
Signed-off-by: John McNamara <john.mcnamara@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
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 385af03..71253c5 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -28,12 +28,55 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import subprocess
+from subprocess import check_output
+from sphinx.highlighting import PygmentsBridge
+from pygments.formatters.latex import LatexFormatter
project = 'DPDK'
-
copyright = '2014, Intel'
+master_doc = 'index'
-version = subprocess.check_output(["make","-sRrC","../../", "showversion"])
-master_doc = 'index'
+# Configuration for latex/pdf files.
+latex_preamble = r"""
+\usepackage[utf8]{inputenc}
+\usepackage{DejaVuSansMono}
+\usepackage[T1]{fontenc}
+\usepackage{helvet}
+\renewcommand{\familydefault}{\sfdefault}
+
+\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{xleftmargin=5mm}
+"""
+
+latex_elements = {
+ 'papersize': 'a4paper',
+ 'pointsize': '11pt',
+ 'preamble': latex_preamble}
+
+latex_documents = [
+ ('index',
+ 'dpdk_docs.tex',
+ '',
+ '',
+ 'manual')]
+
+texinfo_documents = [
+ ('index',
+ '',
+ '',
+ '',
+ '',
+ '',
+ 'Miscellaneous')]
+
+
+# Override the dafault Latex formatter.
+class CustomLatexFormatter(LatexFormatter):
+
+ def __init__(self, **options):
+
+ super(CustomLatexFormatter, self).__init__(**options)
+
+ self.verboptions = r"formatcom=\footnotesize"
+
+PygmentsBridge.latex_formatter = CustomLatexFormatter
diff --git a/doc/guides/freebsd_gsg/conf.py b/doc/guides/freebsd_gsg/conf.py
new file mode 100644
index 0000000..fd97d69
--- /dev/null
+++ b/doc/guides/freebsd_gsg/conf.py
@@ -0,0 +1,41 @@
+# BSD LICENSE
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+execfile('../conf.py')
+
+release = check_output(['make', '-sRrC', '../../../', 'showversion'])
+
+# Overide the latex_documents to change the output name.
+latex_documents = [
+ ('index',
+ 'dpdk_freebsd_getting_started_guide.tex',
+ '',
+ '',
+ 'manual')]
diff --git a/doc/guides/linux_gsg/conf.py b/doc/guides/linux_gsg/conf.py
new file mode 100644
index 0000000..8086763
--- /dev/null
+++ b/doc/guides/linux_gsg/conf.py
@@ -0,0 +1,41 @@
+# BSD LICENSE
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+execfile('../conf.py')
+
+release = check_output(['make', '-sRrC', '../../../', 'showversion'])
+
+# Overide the latex_documents to change the output name.
+latex_documents = [
+ ('index',
+ 'dpdk_linux_getting_started_guide.tex',
+ '',
+ '',
+ 'manual')]
diff --git a/doc/guides/prog_guide/conf.py b/doc/guides/prog_guide/conf.py
new file mode 100644
index 0000000..6a9e74c
--- /dev/null
+++ b/doc/guides/prog_guide/conf.py
@@ -0,0 +1,41 @@
+# BSD LICENSE
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+execfile('../conf.py')
+
+release = check_output(['make', '-sRrC', '../../../', 'showversion'])
+
+# Overide the latex_documents to change the output name.
+latex_documents = [
+ ('index',
+ 'dpdk_programmers_guide.tex',
+ '',
+ '',
+ 'manual')]
diff --git a/doc/guides/rel_notes/conf.py b/doc/guides/rel_notes/conf.py
new file mode 100644
index 0000000..9ddf4c2
--- /dev/null
+++ b/doc/guides/rel_notes/conf.py
@@ -0,0 +1,41 @@
+# BSD LICENSE
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+execfile('../conf.py')
+
+release = check_output(['make', '-sRrC', '../../../', 'showversion'])
+
+# Overide the latex_documents to change the output name.
+latex_documents = [
+ ('index',
+ 'dpdk_release_notes.tex',
+ '',
+ '',
+ 'manual')]
diff --git a/doc/guides/sample_app_ug/conf.py b/doc/guides/sample_app_ug/conf.py
new file mode 100644
index 0000000..def3132
--- /dev/null
+++ b/doc/guides/sample_app_ug/conf.py
@@ -0,0 +1,41 @@
+# BSD LICENSE
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+execfile('../conf.py')
+
+release = check_output(['make', '-sRrC', '../../../', 'showversion'])
+
+# Overide the latex_documents to change the output name.
+latex_documents = [
+ ('index',
+ 'dpdk_sample_applications.tex',
+ '',
+ '',
+ 'manual')]
diff --git a/doc/guides/testpmd_app_ug/conf.py b/doc/guides/testpmd_app_ug/conf.py
new file mode 100644
index 0000000..66d5d80
--- /dev/null
+++ b/doc/guides/testpmd_app_ug/conf.py
@@ -0,0 +1,41 @@
+# BSD LICENSE
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+execfile('../conf.py')
+
+release = check_output(['make', '-sRrC', '../../../', 'showversion'])
+
+# Overide the latex_documents to change the output name.
+latex_documents = [
+ ('index',
+ 'dpdk_testpmd_guide.tex',
+ '',
+ '',
+ 'manual')]
--
1.7.4.1
next prev parent reply other threads:[~2015-01-30 18:13 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 17:14 [dpdk-dev] [PATCH RFC 0/1] Add 'make pdf' target to convert guide docs to pdf John McNamara
2015-01-14 17:14 ` [dpdk-dev] [PATCH 1/2] doc: " John McNamara
2015-01-30 18:13 ` [dpdk-dev] [PATCH v2 0/4] " John McNamara
2015-01-30 18:13 ` [dpdk-dev] [PATCH v2 1/4] mk: Add 'make doc-pdf' " John McNamara
2015-01-30 20:52 ` Thomas Monjalon
[not found] ` <B27915DBBA3421428155699D51E4CFE2EAC4D2@IRSMSX103.ger.corp.intel.com>
[not found] ` <2564393.TY2qeNvaqR@xps13>
2015-02-03 13:24 ` Mcnamara, John
2015-01-30 18:13 ` John McNamara [this message]
2015-01-30 21:03 ` [dpdk-dev] [PATCH v2 2/4] doc: Add Sphinx config to build pdf version of guides Thomas Monjalon
2015-01-30 18:13 ` [dpdk-dev] [PATCH v2 3/4] doc: Fix encoding of (r) character John McNamara
2015-01-30 18:13 ` [dpdk-dev] [PATCH v2 4/4] doc: Refactored split cell formatting in one table John McNamara
2015-01-30 21:05 ` Thomas Monjalon
2015-01-30 20:25 ` [dpdk-dev] [PATCH v2 0/4] doc: Add 'make pdf' target to convert guide docs to pdf Thomas Monjalon
[not found] ` <1422882967-27060-1-git-send-email-john.mcnamara@intel.com>
[not found] ` <1422882967-27060-3-git-send-email-john.mcnamara@intel.com>
2015-02-03 10:30 ` [dpdk-dev] [PATCH v3 2/4] doc: Add Sphinx config to build pdf version of guides Iremonger, Bernard
2015-02-03 14:11 ` [dpdk-dev] [PATCH v4 0/5] doc: Add 'make pdf' target to convert guide docs to pdf John McNamara
2015-02-03 14:11 ` [dpdk-dev] [PATCH v4 1/5] mk: Add 'make doc-pdf' " John McNamara
2015-02-16 12:19 ` Iremonger, Bernard
2015-02-16 12:55 ` Mcnamara, John
2015-02-16 14:16 ` Iremonger, Bernard
2015-02-03 14:11 ` [dpdk-dev] [PATCH v4 2/5] doc: Add Sphinx config to build pdf version of guides John McNamara
2015-02-16 14:20 ` Iremonger, Bernard
2015-02-03 14:11 ` [dpdk-dev] [PATCH v4 3/5] doc: Fix encoding of (r) character John McNamara
2015-02-13 14:29 ` Iremonger, Bernard
2015-02-13 15:59 ` Mcnamara, John
2015-02-13 16:42 ` Iremonger, Bernard
2015-02-16 14:22 ` Iremonger, Bernard
2015-02-03 14:11 ` [dpdk-dev] [PATCH v4 4/5] doc: Refactored split cell formatting in one table John McNamara
2015-02-16 14:23 ` Iremonger, Bernard
2015-02-03 14:11 ` [dpdk-dev] [PATCH v4 5/5] doc: Convert image extensions to wildcard John McNamara
2015-02-16 12:09 ` Iremonger, Bernard
2015-02-16 12:43 ` Mcnamara, John
2015-02-16 14:25 ` Iremonger, Bernard
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 0/7] add doc-guides-pdf target Thomas Monjalon
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 1/7] doc: fix encoding of (r) character Thomas Monjalon
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 2/7] doc: refactor split cell formatting in table Thomas Monjalon
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 3/7] doc: convert image extensions to wildcard Thomas Monjalon
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 4/7] doc: add pdf output Thomas Monjalon
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 5/7] doc: fix version for python 3 Thomas Monjalon
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 6/7] doc: tune pdf fonts Thomas Monjalon
2015-03-19 11:23 ` [dpdk-dev] [PATCH v5 7/7] doc: remove blank pages in pdf Thomas Monjalon
2015-03-19 13:47 ` [dpdk-dev] [PATCH v5 0/7] add doc-guides-pdf target Mcnamara, John
2015-03-19 17:04 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422641608-8514-3-git-send-email-john.mcnamara@intel.com \
--to=john.mcnamara@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).