patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] doc: remove PDF requirements
@ 2021-05-11 21:25 Thomas Monjalon
  2021-05-12  7:50 ` Ruifeng Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2021-05-11 21:25 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, david.marchand, stable, Ruifeng Wang, Ciara Power

The documentation is generated in HTML only.
The PDF format is abandoned since DPDK 20.11
while dropping support of the make-based build.

This decision has been mentioned by the Technical Board:
https://mails.dpdk.org/archives/dev/2021-January/195549.html

Fixes: 3cc6ecfdfe85 ("build: remove makefiles")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/checkpatches.sh                  |  3 +-
 doc/guides/conf.py                        | 43 -------------
 doc/guides/contributing/documentation.rst | 74 +++--------------------
 3 files changed, 11 insertions(+), 109 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 78a408ef98..db4c7d8301 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -118,8 +118,7 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
-	# svg figures must be included with wildcard extension
-	# because of png conversion for pdf docs
+	# SVG must be included with wildcard extension to allow conversion
 	awk -v FOLDERS='doc' \
 		-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
 		-v RET_ON_FAIL=1 \
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index c22caaa247..894d81ca75 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -5,8 +5,6 @@
 from docutils import nodes
 from distutils.version import LooseVersion
 from sphinx import __version__ as sphinx_version
-from sphinx.highlighting import PygmentsBridge
-from pygments.formatters.latex import LatexFormatter
 from os import listdir
 from os import environ
 from os.path import basename
@@ -30,7 +28,6 @@
 
 project = 'Data Plane Development Kit'
 html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
-latex_logo = '../logo/DPDK_logo_horizontal_tag.png'
 if LooseVersion(sphinx_version) >= LooseVersion('3.5'):
     html_permalinks = False
 else:
@@ -49,46 +46,6 @@
 # Figures, tables and code-blocks automatically numbered if they have caption
 numfig = True
 
-latex_documents = [
-    ('index',
-     'doc.tex',
-     '',
-     '',
-     'manual')
-]
-
-# Latex directives to be included directly in the latex/pdf docs.
-custom_latex_preamble = r"""
-\usepackage{textalpha}
-\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{xleftmargin=5mm}
-\usepackage{etoolbox}
-\robustify\(
-\robustify\)
-"""
-
-# Configuration for the latex/pdf docs.
-latex_elements = {
-    'papersize': 'a4paper',
-    'pointsize': '11pt',
-    # remove blank pages
-    'classoptions': ',openany,oneside',
-    'babel': '\\usepackage[english]{babel}',
-    # customize Latex formatting
-    'preamble': custom_latex_preamble
-}
-
-
-# Override the default Latex formatter in order to modify the
-# code/verbatim blocks.
-class CustomLatexFormatter(LatexFormatter):
-    def __init__(self, **options):
-        super(CustomLatexFormatter, self).__init__(**options)
-        # Use the second smallest font size for code/verbatim blocks.
-        self.verboptions = r'formatcom=\footnotesize'
-
-# Replace the default latex formatter.
-PygmentsBridge.latex_formatter = CustomLatexFormatter
-
 # Configuration for man pages
 man_pages = [("testpmd_app_ug/run_app", "testpmd",
               "tests for dpdk pmds", "", 1),
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 842549a4c8..6098663896 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -8,7 +8,7 @@ DPDK Documentation Guidelines
 
 This document outlines the guidelines for writing the DPDK Guides and API documentation in RST and Doxygen format.
 
-It also explains the structure of the DPDK documentation and shows how to build the Html and PDF versions of the documents.
+It also explains the structure of the DPDK documentation and how to build it.
 
 
 Structure of the Documentation
@@ -136,17 +136,11 @@ Building the Documentation
 Dependencies
 ~~~~~~~~~~~~
 
-
 The following dependencies must be installed to build the documentation:
 
 * Doxygen.
-
 * Sphinx (also called python-sphinx).
 
-* TexLive (at least TexLive-core and the extra Latex support).
-
-* Inkscape.
-
 `Doxygen`_ generates documentation from commented source code.
 It can be installed as follows:
 
@@ -158,7 +152,7 @@ It can be installed as follows:
    # Red Hat/Fedora.
    sudo dnf     -y install doxygen
 
-`Sphinx`_ is a Python documentation tool for converting RST files to Html or to PDF (via LaTeX).
+`Sphinx`_ is a Python documentation tool for converting RST files to HTML.
 For full support with figure and table captioning the latest version of Sphinx can be installed as follows:
 
 .. code-block:: console
@@ -177,43 +171,6 @@ For further information on getting started with Sphinx see the
    To get full support for Figure and Table numbering it is best to install Sphinx 1.3.1 or later.
 
 
-`Inkscape`_ is a vector based graphics program which is used to create SVG images and also to convert SVG images to PDF images.
-It can be installed as follows:
-
-.. code-block:: console
-
-   # Ubuntu/Debian.
-   sudo apt-get -y install inkscape
-
-   # Red Hat/Fedora.
-   sudo dnf     -y install inkscape
-
-`TexLive <http://www.tug.org/texlive/>`_ is an installation package for Tex/LaTeX.
-It is used to generate the PDF versions of the documentation.
-The main required packages can be installed as follows:
-
-.. code-block:: console
-
-   # Ubuntu/Debian.
-   sudo apt-get -y install texlive-latex-extra texlive-lang-greek
-
-   # Red Hat/Fedora, selective install.
-   sudo dnf     -y install texlive-collection-latexextra texlive-greek-fontenc
-
-`Latexmk <http://personal.psu.edu/jcc8/software/latexmk-jcc/>`_ is a perl script
-for running LaTeX for resolving cross references,
-and it also runs auxiliary programs like bibtex, makeindex if necessary, and dvips.
-It has also a number of other useful capabilities (see man 1 latexmk).
-
-.. code-block:: console
-
-   # Ubuntu/Debian.
-   sudo apt-get -y install latexmk
-
-   # Red Hat/Fedora.
-   sudo dnf     -y install latexmk
-
-
 Build commands
 ~~~~~~~~~~~~~~
 
@@ -225,16 +182,7 @@ To build the documentation::
 
 See :doc:`../linux_gsg/build_dpdk` for more detail on compiling DPDK with meson.
 
-The output is generated in the ``build`` directory::
-
-   build/doc
-         |-- html
-         |   |-- api
-         |   +-- guides
-         |
-         +-- pdf
-             +-- guides
-
+The output is generated in the directories ``build/doc/html/{api,guides}``.
 
 .. Note::
 
@@ -259,7 +207,8 @@ Here are some guidelines in relation to the style of the documentation:
 RST Guidelines
 --------------
 
-The RST (reStructuredText) format is a plain text markup format that can be converted to Html, PDF or other formats.
+The RST (reStructuredText) format is a plain text markup format
+that can be converted to HTML or other formats.
 It is most closely associated with Python but it can be used to document any language.
 It is used in DPDK to document everything apart from the API.
 
@@ -282,9 +231,8 @@ Line Length
   words. Multiple sentences which are not separated by a blank line are joined
   automatically into paragraphs.
 
-* Lines in literal blocks **must** be less than 80 characters since
-  they are not wrapped by the document formatters and can exceed the page width
-  in PDF documents.
+* Lines in literal blocks should be less than 80 characters
+  since they are not wrapped by the document formatters.
 
   Long literal command lines can be shown wrapped with backslashes. For
   example::
@@ -437,8 +385,8 @@ Code and Literal block sections
 * The default encoding for a literal block using the simplified ``::``
   directive is ``none``.
 
-* Lines in literal blocks must be less than 80 characters since they can exceed the page width when converted to PDF documentation.
-  For long literal lines that exceed that limit try to wrap the text at sensible locations.
+* Lines in literal blocks should be less than 80 characters.
+  For long literal lines, try to wrap the text at sensible locations.
   For example a long command line could be documented like this and still work if copied directly from the docs::
 
      ./<build_dir>/app/dpdk-testpmd -l 0-2 -n3 --vdev=net_pcap0,iface=eth0    \
@@ -503,7 +451,7 @@ Tables
 ~~~~~~
 
 * RST tables should be used sparingly.
-  They are hard to format and to edit, they are often rendered incorrectly in PDF format, and the same information
+  They are hard to format and to edit, and the same information
   can usually be shown just as clearly with a definition or bullet list.
 
 * Tables in the documentation should be formatted as follows:
@@ -533,8 +481,6 @@ Tables
 
      The QOS configuration is shown in :numref:`table_qos_pipes`.
 
-* Tables should not include merged cells since they are not supported by the PDF renderer.
-
 
 .. _links:
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-12 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 21:25 [dpdk-stable] [PATCH] doc: remove PDF requirements Thomas Monjalon
2021-05-12  7:50 ` Ruifeng Wang
2021-05-12 14:44   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

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