From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B53A8A0C49 for ; Tue, 11 May 2021 23:25:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3082406A3; Tue, 11 May 2021 23:25:21 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 6F1CA4003E; Tue, 11 May 2021 23:25:19 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 18A9B5C0181; Tue, 11 May 2021 17:25:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 11 May 2021 17:25:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=4BZm6/8VHUW3kORIwdJ/s0UJzk 9g5lsh9qxjK61GZ6U=; b=FelIEbAZ7Y5Fwlx4dodkWV8fuZSIeg4uzKR7YAzYOQ g7ijm+5gQFCPSCRrwlwwCrZ3wnA0gjasNIEBrUkUzOHrHuJXGzXliFb88hFW/p8T a7pPTxuls1vttvjJEJWEdcWyjJ+rRi+65DWBh4KoOgdj7fUOecr9agKoQY9wVWvI sS3FgyROx39fnNyr739MBfAV+8zaIsn5QoIXLJHr23FrIUWsffy/YUvi4oiR1LCW zEec2wcI4fP6qsz6a5T2krjnYjxQOGqOuRv9SVWcTM5uTehxFfx5zNUvyy4nDD9l +XMGEOCRt8AxvArK0gtg+ky/3k9t1WUmAfFduW4JwJNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=4BZm6/8VHUW3kORIw dJ/s0UJzk9g5lsh9qxjK61GZ6U=; b=EM3LNRc9KUFzkb/Ve7gr04ihbzvz9wdZn kNW/tBu++S5TjlrnMiU4YHWvkzskSAhZoQH9+MxPRXOlBay+CM0oIwbI/7ttvx5J j8tb0aZpf0mhpdegLoQemYUqazVeQn0d1p2/F26SZYgqIcujSHfsTGV8mnagufxl rYrwxYxVw12bJtizi9KY3s3pe7BUbidVMH7AMN0+vk1+ZU3Vkz5iQB6PTJijrdH9 PLmW8mGHgcZF70LxIGkgaM8VlS2RRcuyKGWkVEs+piyJtFaaa2OfP5dUNc/tXgDg CuMc4hl+5T15PO0hiJUJuGOTj/cJiDT6oQ15RoUNhsOVLBYzdNlYw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehtddgudeivdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpeduteeiheeugfefuedtleehgedtfefffeffudelgfeujeejleeftedv udekkeefffenucffohhmrghinhepughpughkrdhorhhgpdhtuhhgrdhorhhgpdhpshhurd gvughunecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrd hnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 May 2021 17:25:17 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: bruce.richardson@intel.com, david.marchand@redhat.com, stable@dpdk.org, Ruifeng Wang , Ciara Power Date: Tue, 11 May 2021 23:25:07 +0200 Message-Id: <20210511212508.2075789-1-thomas@monjalon.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] doc: remove PDF requirements X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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() { # -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 `_ 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 `_ 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:: .//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