!sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget$/translations/zh_CN/doc-guide/sphinxmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/doc-guide/sphinxmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/doc-guide/sphinxmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/doc-guide/sphinxmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/doc-guide/sphinxmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/doc-guide/sphinxmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhtarget)}(h.. _sphinxdoc:h]h}(h]h ]h"]h$]h&]refid sphinxdocuh1hhKhhhhh>/var/lib/git/docbuild/linux/Documentation/doc-guide/sphinx.rstubhsection)}(hhh](htitle)}(h%Using Sphinx for kernel documentationh]h%Using Sphinx for kernel documentation}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe Linux kernel uses `Sphinx`_ to generate pretty documentation from `reStructuredText`_ files under ``Documentation``. To build the documentation in HTML or PDF formats, use ``make htmldocs`` or ``make pdfdocs``. The generated documentation is placed in ``Documentation/output``.h](hThe Linux kernel uses }(hhhhhNhNubh reference)}(h `Sphinx`_h]hSphinx}(hhhhhNhNubah}(h]h ]h"]h$]h&]nameSphinxrefurihttp://www.sphinx-doc.org/uh1hhhnjresolvedKubh' to generate pretty documentation from }(hhhhhNhNubh)}(h`reStructuredText`_h]hreStructuredText}(hhhhhNhNubah}(h]h ]h"]h$]h&]namereStructuredTexth(http://docutils.sourceforge.net/rst.htmluh1hhhhKubh files under }(hhhhhNhNubhliteral)}(h``Documentation``h]h Documentation}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh9. To build the documentation in HTML or PDF formats, use }(hhhhhNhNubh)}(h``make htmldocs``h]h make htmldocs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh or }(hhhhhNhNubh)}(h``make pdfdocs``h]h make pdfdocs}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh+. The generated documentation is placed in }(hhhhhNhNubh)}(h``Documentation/output``h]hDocumentation/output}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h&.. _Sphinx: http://www.sphinx-doc.org/h]h}(h]sphinxah ]h"]sphinxah$]h&]hhuh1hhK hhhhhh referencedKubh)}(h>.. _reStructuredText: http://docutils.sourceforge.net/rst.htmlh]h}(h]restructuredtextah ]h"]restructuredtextah$]h&]hhuh1hhK hhhhhhjYKubh)}(hX\The reStructuredText files may contain directives to include structured documentation comments, or kernel-doc comments, from source files. Usually these are used to describe the functions and types and design of the code. The kernel-doc comments have some special structure and formatting, but beyond that they are also treated as reStructuredText.h]hX\The reStructuredText files may contain directives to include structured documentation comments, or kernel-doc comments, from source files. Usually these are used to describe the functions and types and design of the code. The kernel-doc comments have some special structure and formatting, but beyond that they are also treated as reStructuredText.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hFinally, there are thousands of plain text documentation files scattered around ``Documentation``. Some of these will likely be converted to reStructuredText over time, but the bulk of them will remain in plain text.h](hPFinally, there are thousands of plain text documentation files scattered around }(hjthhhNhNubh)}(h``Documentation``h]h Documentation}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjtubhw. Some of these will likely be converted to reStructuredText over time, but the bulk of them will remain in plain text.}(hjthhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h.. _sphinx_install:h]h}(h]h ]h"]h$]h&]hsphinx-installuh1hhKhhhhhhubh)}(hhh](h)}(hSphinx Installh]hSphinx Install}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hzThe ReST markups currently used by the Documentation/ files are meant to be built with ``Sphinx`` version 3.4.3 or higher.h](hWThe ReST markups currently used by the Documentation/ files are meant to be built with }(hjhhhNhNubh)}(h ``Sphinx``h]hSphinx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh version 3.4.3 or higher.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hsThere's a script that checks for the Sphinx requirements. Please see :ref:`sphinx-pre-install` for further details.h](hGThere’s a script that checks for the Sphinx requirements. Please see }(hjhhhNhNubh)}(h:ref:`sphinx-pre-install`h]hinline)}(hjh]hsphinx-pre-install}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdoc-guide/sphinx refdomainjreftyperef refexplicitrefwarn reftargetsphinx-pre-installuh1hhhhK!hjubh for further details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK!hjhhubh)}(hMost distributions are shipped with Sphinx, but its toolchain is fragile, and it is not uncommon that upgrading it or some other Python packages on your machine would cause the documentation build to break.h]hMost distributions are shipped with Sphinx, but its toolchain is fragile, and it is not uncommon that upgrading it or some other Python packages on your machine would cause the documentation build to break.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjhhubh)}(hXA way to avoid that is to use a different version than the one shipped with your distributions. In order to do so, it is recommended to install Sphinx inside a virtual environment, using ``virtualenv-3`` or ``virtualenv``, depending on how your distribution packaged Python 3.h](hA way to avoid that is to use a different version than the one shipped with your distributions. In order to do so, it is recommended to install Sphinx inside a virtual environment, using }(hjhhhNhNubh)}(h``virtualenv-3``h]h virtualenv-3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh or }(hjhhhNhNubh)}(h``virtualenv``h]h virtualenv}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh7, depending on how your distribution packaged Python 3.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK(hjhhubh)}(hPIn summary, if you want to install the latest version of Sphinx, you should do::h]hOIn summary, if you want to install the latest version of Sphinx, you should do:}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubh literal_block)}(h$ virtualenv sphinx_latest $ . sphinx_latest/bin/activate (sphinx_latest) $ pip install -r Documentation/sphinx/requirements.txth]h$ virtualenv sphinx_latest $ . sphinx_latest/bin/activate (sphinx_latest) $ pip install -r Documentation/sphinx/requirements.txt}hjWsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jUhhhK0hjhhubh)}(hXAfter running ``. sphinx_latest/bin/activate``, the prompt will change, in order to indicate that you're using the new environment. If you open a new shell, you need to rerun this command to enter again at the virtual environment before building the documentation.h](hAfter running }(hjghhhNhNubh)}(h ``. sphinx_latest/bin/activate``h]h. sphinx_latest/bin/activate}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgubh, the prompt will change, in order to indicate that you’re using the new environment. If you open a new shell, you need to rerun this command to enter again at the virtual environment before building the documentation.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK4hjhhubh)}(hhh](h)}(h Image outputh]h Image output}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK:ubh)}(hThe kernel documentation build system contains an extension that handles images in both GraphViz and SVG formats (see :ref:`sphinx_kfigure`).h](hvThe kernel documentation build system contains an extension that handles images in both GraphViz and SVG formats (see }(hjhhhNhNubh)}(h:ref:`sphinx_kfigure`h]j)}(hjh]hsphinx_kfigure}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjsphinx_kfigureuh1hhhhKhhhKhj;ubj?)}(hW``--no-virtualenv`` Use OS packaging for Sphinx instead of Python virtual environment. h](jE)}(h``--no-virtualenv``h]h)}(hjh]h--no-virtualenv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jDhhhKhj|ubj^)}(hhh]h)}(hBUse OS packaging for Sphinx instead of Python virtual environment.h]hBUse OS packaging for Sphinx instead of Python virtual environment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j]hj|ubeh}(h]h ]h"]h$]h&]uh1j>hhhKhj;hhubeh}(h]h ]h"]h$]h&]uh1j9hjhhhhhNubeh}(h]( checking-for-sphinx-dependenciesjeh ]h"]( checking for sphinx dependenciessphinx-pre-installeh$]h&]uh1hhjhhhhhKgexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh)}(hhh](h)}(h!Installing Sphinx Minimal Versionh]h!Installing Sphinx Minimal Version}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hWhen changing Sphinx build system, it is important to ensure that the minimal version will still be supported. Nowadays, it is becoming harder to do that on modern distributions, as it is not possible to install with Python 3.13 and above.h]hWhen changing Sphinx build system, it is important to ensure that the minimal version will still be supported. Nowadays, it is becoming harder to do that on modern distributions, as it is not possible to install with Python 3.13 and above.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hTesting with the lowest supported Python version as defined at Documentation/process/changes.rst can be done by creating a venv with it with, and install minimal requirements with::h]hTesting with the lowest supported Python version as defined at Documentation/process/changes.rst can be done by creating a venv with it with, and install minimal requirements with:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjV)}(hx/usr/bin/python3.9 -m venv sphinx_min . sphinx_min/bin/activate pip install -r Documentation/sphinx/min_requirements.txth]hx/usr/bin/python3.9 -m venv sphinx_min . sphinx_min/bin/activate pip install -r Documentation/sphinx/min_requirements.txt}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhKhjhhubh)}(h/A more comprehensive test can be done by using:h]h/A more comprehensive test can be done by using:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh block_quote)}(hscripts/test_doc_build.py h]h)}(hscripts/test_doc_build.pyh]hscripts/test_doc_build.py}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(h{Such script create one Python venv per supported version, optionally building documentation for a range of Sphinx versions.h]h{Such script create one Python venv per supported version, optionally building documentation for a range of Sphinx versions.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]!installing-sphinx-minimal-versionah ]h"]!installing sphinx minimal versionah$]h&]uh1hhjhhhhhKubeh}(h](jid1eh ]h"](sphinx installsphinx_installeh$]h&]uh1hhhhhhhhKj}jFjsj}jjsubh)}(hhh](h)}(h Sphinx Buildh]h Sphinx Build}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhKubh)}(hXThe usual way to generate the documentation is to run ``make htmldocs`` or ``make pdfdocs``. There are also other formats available: see the documentation section of ``make help``. The generated documentation is placed in format-specific subdirectories under ``Documentation/output``.h](h6The usual way to generate the documentation is to run }(hj\hhhNhNubh)}(h``make htmldocs``h]h make htmldocs}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ubh or }(hj\hhhNhNubh)}(h``make pdfdocs``h]h make pdfdocs}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ubhK. There are also other formats available: see the documentation section of }(hj\hhhNhNubh)}(h ``make help``h]h make help}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ubhP. The generated documentation is placed in format-specific subdirectories under }(hj\hhhNhNubh)}(h``Documentation/output``h]hDocumentation/output}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ubh.}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKhhubh)}(hX To generate documentation, Sphinx (``sphinx-build``) must obviously be installed. For PDF output you'll also need ``XeLaTeX`` and ``convert(1)`` from ImageMagick (https://www.imagemagick.org).\ [#ink]_ All of these are widely available and packaged in distributions.h](h#To generate documentation, Sphinx (}(hjhhhNhNubh)}(h``sphinx-build``h]h sphinx-build}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhB) must obviously be installed. For PDF output you’ll also need }(hjhhhNhNubh)}(h ``XeLaTeX``h]hXeLaTeX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h``convert(1)``h]h convert(1)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh from ImageMagick (}(hjhhhNhNubh)}(hhttps://www.imagemagick.orgh]hhttps://www.imagemagick.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubh). }(hjhhhNhNubhfootnote_reference)}(h[#ink]_h]h1}(hjhhhNhNubah}(h]id2ah ]h"]h$]h&]autoKhinkdocnamejuh1jhjhKubhA All of these are widely available and packaged in distributions.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKhhubh)}(hTo pass extra options to Sphinx, you can use the ``SPHINXOPTS`` make variable. For example, use ``make SPHINXOPTS=-v htmldocs`` to get more verbose output.h](h1To pass extra options to Sphinx, you can use the }(hj!hhhNhNubh)}(h``SPHINXOPTS``h]h SPHINXOPTS}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ubh! make variable. For example, use }(hj!hhhNhNubh)}(h``make SPHINXOPTS=-v htmldocs``h]hmake SPHINXOPTS=-v htmldocs}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ubh to get more verbose output.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKhhubh)}(hIt is also possible to pass an extra DOCS_CSS overlay file, in order to customize the html layout, by using the ``DOCS_CSS`` make variable.h](hpIt is also possible to pass an extra DOCS_CSS overlay file, in order to customize the html layout, by using the }(hjShhhNhNubh)}(h ``DOCS_CSS``h]hDOCS_CSS}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubh make variable.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKhhubh)}(hBy default, the "Alabaster" theme is used to build the HTML documentation; this theme is bundled with Sphinx and need not be installed separately. The Sphinx theme can be overridden by using the ``DOCS_THEME`` make variable.h](hBy default, the “Alabaster” theme is used to build the HTML documentation; this theme is bundled with Sphinx and need not be installed separately. The Sphinx theme can be overridden by using the }(hjshhhNhNubh)}(h``DOCS_THEME``h]h DOCS_THEME}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjsubh make variable.}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKhhubhnote)}(hSome people might prefer to use the RTD theme for html output. Depending on the Sphinx version, it should be installed separately, with ``pip install sphinx_rtd_theme``.h]h)}(hSome people might prefer to use the RTD theme for html output. Depending on the Sphinx version, it should be installed separately, with ``pip install sphinx_rtd_theme``.h](hSome people might prefer to use the RTD theme for html output. Depending on the Sphinx version, it should be installed separately, with }(hjhhhNhNubh)}(h ``pip install sphinx_rtd_theme``h]hpip install sphinx_rtd_theme}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjKhhhhhNubh)}(hXLThere is another make variable ``SPHINXDIRS``, which is useful when test building a subset of documentation. For example, you can build documents under ``Documentation/doc-guide`` by running ``make SPHINXDIRS=doc-guide htmldocs``. The documentation section of ``make help`` will show you the list of subdirectories you can specify.h](hThere is another make variable }(hjhhhNhNubh)}(h``SPHINXDIRS``h]h SPHINXDIRS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhl, which is useful when test building a subset of documentation. For example, you can build documents under }(hjhhhNhNubh)}(h``Documentation/doc-guide``h]hDocumentation/doc-guide}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh by running }(hjhhhNhNubh)}(h&``make SPHINXDIRS=doc-guide htmldocs``h]h"make SPHINXDIRS=doc-guide htmldocs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh. The documentation section of }(hjhhhNhNubh)}(h ``make help``h]h make help}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh: will show you the list of subdirectories you can specify.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKhhubh)}(h>To remove the generated documentation, run ``make cleandocs``.h](h+To remove the generated documentation, run }(hjhhhNhNubh)}(h``make cleandocs``h]hmake cleandocs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjKhhubhfootnote)}(hHaving ``inkscape(1)`` from Inkscape (https://inkscape.org) as well would improve the quality of images embedded in PDF documents, especially for kernel releases 5.18 and later. h](hlabel)}(hhh]h1}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j;hj7hhhNhNubh)}(hHaving ``inkscape(1)`` from Inkscape (https://inkscape.org) as well would improve the quality of images embedded in PDF documents, especially for kernel releases 5.18 and later.h](hHaving }(hjJhhhNhNubh)}(h``inkscape(1)``h]h inkscape(1)}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubh from Inkscape (}(hjJhhhNhNubh)}(hhttps://inkscape.orgh]hhttps://inkscape.org}(hjdhhhNhNubah}(h]h ]h"]h$]h&]refurijfuh1hhjJubhw) as well would improve the quality of images embedded in PDF documents, especially for kernel releases 5.18 and later.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj7ubeh}(h]jah ]h"]inkah$]h&]jajKjjuh1j5hhhKhjKhhubh)}(hhh](h)}(hChoice of Math Rendererh]hChoice of Math Renderer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h`Since kernel release 6.1, mathjax works as a fallback math renderer for html output.\ [#sph1_8]_h](hVSince kernel release 6.1, mathjax works as a fallback math renderer for html output. }(hjhhhNhNubj)}(h [#sph1_8]_h]h2}(hjhhhNhNubah}(h]id3ah ]h"]h$]h&]jKhsph1-8jjuh1jhjhKubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hGMath renderer is chosen depending on available commands as shown below:h]hGMath renderer is chosen depending on available commands as shown below:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhtable)}(hhh](h)}(hMath Renderer Choices for HTMLh]hMath Renderer Choices for HTML}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h Math rendererh]h Math renderer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hRequired commandsh]hRequired commands}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Image formath]h Image format}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(himgmathh]himgmath}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj^ubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hhh]h)}(h latex, dvipngh]h latex, dvipng}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hhh]h)}(h PNG (raster)h]h PNG (raster)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhjXubj)}(hhh](j)}(hhh]h)}(hmathjaxh]hmathjax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]uh1jVhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h]id4ah ]h"]h$]h&]uh1jhjhhhhhNubh)}(hbThe choice can be overridden by setting an environment variable ``SPHINX_IMGMATH`` as shown below:h](h@The choice can be overridden by setting an environment variable }(hjhhhNhNubh)}(h``SPHINX_IMGMATH``h]hSPHINX_IMGMATH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh as shown below:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](h)}(h$Effect of Setting ``SPHINX_IMGMATH``h](hEffect of Setting }(hj hhhNhNubh)}(h``SPHINX_IMGMATH``h]hSPHINX_IMGMATH}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj. ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj. ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hSettingh]hSetting}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjK ubah}(h]h ]h"]h$]h&]uh1jhjH ubj)}(hhh]h)}(hRendererh]hRenderer}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjb ubah}(h]h ]h"]h$]h&]uh1jhjH ubeh}(h]h ]h"]h$]h&]uh1jhjE ubah}(h]h ]h"]h$]h&]uh1jhj. ubjW)}(hhh](j)}(hhh](j)}(hhh]h)}(h``SPHINX_IMGMATH=yes``h]h)}(hj h]hSPHINX_IMGMATH=yes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(himgmathh]himgmath}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h``SPHINX_IMGMATH=no``h]h)}(hj h]hSPHINX_IMGMATH=no}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hmathjaxh]hmathjax}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jVhj. ubeh}(h]h ]h"]h$]h&]colsKuh1jhj ubeh}(h]id5ah ]h"]h$]h&]uh1jhjhhhhhNubj6)}(h2Fallback of math renderer requires Sphinx >=1.8. h](j<)}(hhh]h2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j;hj hhhNhNubh)}(h0Fallback of math renderer requires Sphinx >=1.8.h]h0Fallback of math renderer requires Sphinx >=1.8.}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubeh}(h]jah ]h"]sph1_8ah$]h&]jajKjjuh1j5hhhKhjhhubeh}(h]jah ]h"]choice of math rendererah$]h&]uh1hhjKhhhhhKjYKubeh}(h] sphinx-buildah ]h"] sphinx buildah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hWriting Documentationh]hWriting Documentation}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ hhhhhKubh)}(h-Adding new documentation can be as simple as:h]h-Adding new documentation can be as simple as:}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQ hhubhenumerated_list)}(hhh](h list_item)}(h:Add a new ``.rst`` file somewhere under ``Documentation``.h]h)}(hjy h](h Add a new }(hj{ hhhNhNubh)}(h``.rst``h]h.rst}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{ ubh file somewhere under }(hj{ hhhNhNubh)}(h``Documentation``h]h Documentation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{ ubh.}(hj{ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjw ubah}(h]h ]h"]h$]h&]uh1ju hjr hhhhhNubjv )}(hMRefer to it from the Sphinx main `TOC tree`_ in ``Documentation/index.rst``. h]h)}(hLRefer to it from the Sphinx main `TOC tree`_ in ``Documentation/index.rst``.h](h!Refer to it from the Sphinx main }(hj hhhNhNubh)}(h `TOC tree`_h]hTOC tree}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameTOC treeh7http://www.sphinx-doc.org/en/stable/markup/toctree.htmluh1hhj hKubh in }(hj hhhNhNubh)}(h``Documentation/index.rst``h]hDocumentation/index.rst}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1ju hjr hhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jp hjQ hhhhhKubh)}(hE.. _TOC tree: http://www.sphinx-doc.org/en/stable/markup/toctree.htmlh]h}(h]toc-treeah ]h"]toc treeah$]h&]hj uh1hhKhjQ hhhhjYKubh)}(hXThis is usually good enough for simple documentation (like the one you're reading right now), but for larger documents it may be advisable to create a subdirectory (or use an existing one). For example, the graphics subsystem documentation is under ``Documentation/gpu``, split to several ``.rst`` files, and has a separate ``index.rst`` (with a ``toctree`` of its own) referenced from the main index.h](hThis is usually good enough for simple documentation (like the one you’re reading right now), but for larger documents it may be advisable to create a subdirectory (or use an existing one). For example, the graphics subsystem documentation is under }(hj hhhNhNubh)}(h``Documentation/gpu``h]hDocumentation/gpu}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh, split to several }(hj hhhNhNubh)}(h``.rst``h]h.rst}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh files, and has a separate }(hj hhhNhNubh)}(h ``index.rst``h]h index.rst}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh (with a }(hj hhhNhNubh)}(h ``toctree``h]htoctree}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh, of its own) referenced from the main index.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjQ hhubh)}(hSee the documentation for `Sphinx`_ and `reStructuredText`_ on what you can do with them. In particular, the Sphinx `reStructuredText Primer`_ is a good place to get started with reStructuredText. There are also some `Sphinx specific markup constructs`_.h](hSee the documentation for }(hj^ hhhNhNubh)}(h `Sphinx`_h]hSphinx}(hjf hhhNhNubah}(h]h ]h"]h$]h&]nameSphinxhhuh1hhj^ hKubh and }(hj^ hhhNhNubh)}(h`reStructuredText`_h]hreStructuredText}(hjz hhhNhNubah}(h]h ]h"]h$]h&]namereStructuredTexthhuh1hhj^ hKubh9 on what you can do with them. In particular, the Sphinx }(hj^ hhhNhNubh)}(h`reStructuredText Primer`_h]hreStructuredText Primer}(hj hhhNhNubah}(h]h ]h"]h$]h&]namereStructuredText Primerh-http://www.sphinx-doc.org/en/stable/rest.htmluh1hhj^ hKubhK is a good place to get started with reStructuredText. There are also some }(hj^ hhhNhNubh)}(h$`Sphinx specific markup constructs`_h]h!Sphinx specific markup constructs}(hj hhhNhNubah}(h]h ]h"]h$]h&]name!Sphinx specific markup constructsh5http://www.sphinx-doc.org/en/stable/markup/index.htmluh1hhj^ hKubh.}(hj^ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjQ hhubh)}(hJ.. _reStructuredText Primer: http://www.sphinx-doc.org/en/stable/rest.htmlh]h}(h]restructuredtext-primerah ]h"]restructuredtext primerah$]h&]hj uh1hhKhjQ hhhhjYKubh)}(h\.. _Sphinx specific markup constructs: http://www.sphinx-doc.org/en/stable/markup/index.htmlh]h}(h]!sphinx-specific-markup-constructsah ]h"]!sphinx specific markup constructsah$]h&]hj uh1hhMhjQ hhhhjYKubh)}(hhh](h)}(h0Specific guidelines for the kernel documentationh]h0Specific guidelines for the kernel documentation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(h?Here are some specific guidelines for the kernel documentation:h]h?Here are some specific guidelines for the kernel documentation:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh bullet_list)}(hhh](jv )}(hPlease don't go overboard with reStructuredText markup. Keep it simple. For the most part the documentation should be plain text with just enough consistency in formatting that it can be converted to other formats. h]h)}(hPlease don't go overboard with reStructuredText markup. Keep it simple. For the most part the documentation should be plain text with just enough consistency in formatting that it can be converted to other formats.h]hPlease don’t go overboard with reStructuredText markup. Keep it simple. For the most part the documentation should be plain text with just enough consistency in formatting that it can be converted to other formats.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1ju hj hhhhhNubjv )}(hgPlease keep the formatting changes minimal when converting existing documentation to reStructuredText. h]h)}(hfPlease keep the formatting changes minimal when converting existing documentation to reStructuredText.h]hfPlease keep the formatting changes minimal when converting existing documentation to reStructuredText.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1ju hj hhhhhNubjv )}(hQAlso update the content, not just the formatting, when converting documentation. h]h)}(hPAlso update the content, not just the formatting, when converting documentation.h]hPAlso update the content, not just the formatting, when converting documentation.}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj* ubah}(h]h ]h"]h$]h&]uh1ju hj hhhhhNubjv )}(hXPPlease stick to this order of heading adornments: 1. ``=`` with overline for document title:: ============== Document title ============== 2. ``=`` for chapters:: Chapters ======== 3. ``-`` for sections:: Section ------- 4. ``~`` for subsections:: Subsection ~~~~~~~~~~ Although RST doesn't mandate a specific order ("Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered."), having the higher levels the same overall makes it easier to follow the documents. h](h)}(h1Please stick to this order of heading adornments:h]h1Please stick to this order of heading adornments:}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjB ubjq )}(hhh](jv )}(h]``=`` with overline for document title:: ============== Document title ============== h](h)}(h(``=`` with overline for document title::h](h)}(h``=``h]h=}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[ ubh" with overline for document title:}(hj[ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjW ubjV)}(h,============== Document title ==============h]h,============== Document title ==============}hjw sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjW ubeh}(h]h ]h"]h$]h&]uh1ju hjT ubjv )}(h,``=`` for chapters:: Chapters ======== h](h)}(h``=`` for chapters::h](h)}(h``=``h]h=}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh for chapters:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubjV)}(hChapters ========h]hChapters ========}hj sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhj ubeh}(h]h ]h"]h$]h&]uh1ju hjT ubjv )}(h*``-`` for sections:: Section ------- h](h)}(h``-`` for sections::h](h)}(h``-``h]h-}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh for sections:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubjV)}(hSection -------h]hSection -------}hj sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhM!hj ubeh}(h]h ]h"]h$]h&]uh1ju hjT ubjv )}(h3``~`` for subsections:: Subsection ~~~~~~~~~~ h](h)}(h``~`` for subsections::h](h)}(h``~``h]h~}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh for subsections:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM$hj ubjV)}(hSubsection ~~~~~~~~~~h]hSubsection ~~~~~~~~~~}hj sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhM&hj ubeh}(h]h ]h"]h$]h&]uh1ju hjT ubeh}(h]h ]h"]h$]h&]j j j hj j uh1jp hjB ubh)}(hX Although RST doesn't mandate a specific order ("Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered."), having the higher levels the same overall makes it easier to follow the documents.h]hXAlthough RST doesn’t mandate a specific order (“Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered.”), having the higher levels the same overall makes it easier to follow the documents.}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjB ubeh}(h]h ]h"]h$]h&]uh1ju hj hhhhhNubjv )}(hXTFor inserting fixed width text blocks (for code examples, use case examples, etc.), use ``::`` for anything that doesn't really benefit from syntax highlighting, especially short snippets. Use ``.. code-block:: `` for longer code blocks that benefit from highlighting. For a short snippet of code embedded in the text, use \`\`. h]h)}(hXRFor inserting fixed width text blocks (for code examples, use case examples, etc.), use ``::`` for anything that doesn't really benefit from syntax highlighting, especially short snippets. Use ``.. code-block:: `` for longer code blocks that benefit from highlighting. For a short snippet of code embedded in the text, use \`\`.h](hXFor inserting fixed width text blocks (for code examples, use case examples, etc.), use }(hjE hhhNhNubh)}(h``::``h]h::}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE ubhe for anything that doesn’t really benefit from syntax highlighting, especially short snippets. Use }(hjE hhhNhNubh)}(h``.. code-block:: ``h]h.. code-block:: }(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE ubhs for longer code blocks that benefit from highlighting. For a short snippet of code embedded in the text, use ``.}(hjE hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM.hjA ubah}(h]h ]h"]h$]h&]uh1ju hj hhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1j hhhMhj hhubeh}(h]0specific-guidelines-for-the-kernel-documentationah ]h"]0specific guidelines for the kernel documentationah$]h&]uh1hhjQ hhhhhMubh)}(hhh](h)}(h The C domainh]h The C domain}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM6ubh)}(haThe **Sphinx C Domain** (name c) is suited for documentation of C API. E.g. a function prototype:h](hThe }(hj hhhNhNubhstrong)}(h**Sphinx C Domain**h]hSphinx C Domain}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubhJ (name c) is suited for documentation of C API. E.g. a function prototype:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM8hj hhubjV)}(h0.. c:function:: int ioctl( int fd, int request )h]h0.. c:function:: int ioctl( int fd, int request )}hj sbah}(h]h ]h"]h$]h&]jejfforcelanguagersthighlight_args}uh1jUhhhM;hj hhubh)}(hThe C domain of the kernel-doc has some additional features. E.g. you can *rename* the reference name of a function with a common name like ``open`` or ``ioctl``:h](hJThe C domain of the kernel-doc has some additional features. E.g. you can }(hj hhhNhNubhemphasis)}(h*rename*h]hrename}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh: the reference name of a function with a common name like }(hj hhhNhNubh)}(h``open``h]hopen}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh or }(hj hhhNhNubh)}(h ``ioctl``h]hioctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM?hj hhubjV)}(hL.. c:function:: int ioctl( int fd, int request ) :name: VIDIOC_LOG_STATUSh]hL.. c:function:: int ioctl( int fd, int request ) :name: VIDIOC_LOG_STATUS}hjsbah}(h]h ]h"]h$]h&]jejfj j rstj }uh1jUhhhMChj hhubh)}(hThe func-name (e.g. ioctl) remains in the output but the ref-name changed from ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for this function is also changed to ``VIDIOC_LOG_STATUS``.h](hOThe func-name (e.g. ioctl) remains in the output but the ref-name changed from }(hj)hhhNhNubh)}(h ``ioctl``h]hioctl}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)ubh to }(hj)hhhNhNubh)}(h``VIDIOC_LOG_STATUS``h]hVIDIOC_LOG_STATUS}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)ubh7. The index entry for this function is also changed to }(hj)hhhNhNubh)}(h``VIDIOC_LOG_STATUS``h]hVIDIOC_LOG_STATUS}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj hhubh)}(hXPlease note that there is no need to use ``c:func:`` to generate cross references to function documentation. Due to some Sphinx extension magic, the documentation build system will automatically turn a reference to ``function()`` into a cross reference if an index entry for the given function name exists. If you see ``c:func:`` use in a kernel document, please feel free to remove it.h](h)Please note that there is no need to use }(hjmhhhNhNubh)}(h ``c:func:``h]hc:func:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmubh to generate cross references to function documentation. Due to some Sphinx extension magic, the documentation build system will automatically turn a reference to }(hjmhhhNhNubh)}(h``function()``h]h function()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmubhZ into a cross reference if an index entry for the given function name exists. If you see }(hjmhhhNhNubh)}(h ``c:func:``h]hc:func:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmubh9 use in a kernel document, please feel free to remove it.}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMLhj hhubeh}(h] the-c-domainah ]h"] the c domainah$]h&]uh1hhjQ hhhhhM6ubh)}(hhh](h)}(hTablesh]hTables}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMTubh)}(hReStructuredText provides several options for table syntax. Kernel style for tables is to prefer *simple table* syntax or *grid table* syntax. See the `reStructuredText user reference for table syntax`_ for more details.h](haReStructuredText provides several options for table syntax. Kernel style for tables is to prefer }(hjhhhNhNubj )}(h*simple table*h]h simple table}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh syntax or }(hjhhhNhNubj )}(h *grid table*h]h grid table}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh syntax. See the }(hjhhhNhNubh)}(h3`reStructuredText user reference for table syntax`_h]h0reStructuredText user reference for table syntax}(hjhhhNhNubah}(h]h ]h"]h$]h&]name0reStructuredText user reference for table syntaxhBhttps://docutils.sourceforge.io/docs/user/rst/quickref.html#tablesuh1hhjhKubh for more details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMVhjhhubh)}(h{.. _reStructuredText user reference for table syntax: https://docutils.sourceforge.io/docs/user/rst/quickref.html#tablesh]h}(h]0restructuredtext-user-reference-for-table-syntaxah ]h"]0restructuredtext user reference for table syntaxah$]h&]hjuh1hhMZhjhhhhjYKubh)}(hhh](h)}(h list tablesh]h list tables}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM^ubh)}(hX%The list-table formats can be useful for tables that are not easily laid out in the usual Sphinx ASCII-art formats. These formats are nearly impossible for readers of the plain-text documents to understand, though, and should be avoided in the absence of a strong justification for their use.h]hX%The list-table formats can be useful for tables that are not easily laid out in the usual Sphinx ASCII-art formats. These formats are nearly impossible for readers of the plain-text documents to understand, though, and should be avoided in the absence of a strong justification for their use.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hjhhubh)}(hfThe ``flat-table`` is a double-stage list similar to the ``list-table`` with some additional features:h](hThe }(hj<hhhNhNubh)}(h``flat-table``h]h flat-table}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubh' is a double-stage list similar to the }(hj<hhhNhNubh)}(h``list-table``h]h list-table}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubh with some additional features:}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMfhjhhubj )}(hhh](jv )}(hWcolumn-span: with the role ``cspan`` a cell can be extended through additional columns h]h)}(hVcolumn-span: with the role ``cspan`` a cell can be extended through additional columnsh](hcolumn-span: with the role }(hjuhhhNhNubh)}(h ``cspan``h]hcspan}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuubh2 a cell can be extended through additional columns}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMihjqubah}(h]h ]h"]h$]h&]uh1ju hjnhhhhhNubjv )}(hQrow-span: with the role ``rspan`` a cell can be extended through additional rows h]h)}(hProw-span: with the role ``rspan`` a cell can be extended through additional rowsh](hrow-span: with the role }(hjhhhNhNubh)}(h ``rspan``h]hrspan}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh/ a cell can be extended through additional rows}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMlhjubah}(h]h ]h"]h$]h&]uh1ju hjnhhhhhNubjv )}(hX auto span rightmost cell of a table row over the missing cells on the right side of that table-row. With Option ``:fill-cells:`` this behavior can changed from *auto span* to *auto fill*, which automatically inserts (empty) cells instead of spanning the last cell. h]h)}(hX auto span rightmost cell of a table row over the missing cells on the right side of that table-row. With Option ``:fill-cells:`` this behavior can changed from *auto span* to *auto fill*, which automatically inserts (empty) cells instead of spanning the last cell.h](hqauto span rightmost cell of a table row over the missing cells on the right side of that table-row. With Option }(hjhhhNhNubh)}(h``:fill-cells:``h]h :fill-cells:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh this behavior can changed from }(hjhhhNhNubj )}(h *auto span*h]h auto span}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh to }(hjhhhNhNubj )}(h *auto fill*h]h auto fill}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhN, which automatically inserts (empty) cells instead of spanning the last cell.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMohjubah}(h]h ]h"]h$]h&]uh1ju hjnhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j hhhMihjhhubh)}(hoptions:h]hoptions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjhhubj )}(hhh](jv )}(h.``:header-rows:`` [int] count of header rowsh]h)}(hj,h](h)}(h``:header-rows:``h]h :header-rows:}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubh [int] count of header rows}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMvhj*ubah}(h]h ]h"]h$]h&]uh1ju hj'hhhhhNubjv )}(h/``:stub-columns:`` [int] count of stub columnsh]h)}(hjQh](h)}(h``:stub-columns:``h]h:stub-columns:}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubh [int] count of stub columns}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMwhjOubah}(h]h ]h"]h$]h&]uh1ju hj'hhhhhNubjv )}(h8``:widths:`` [[int] [int] ... ] widths of columnsh]h)}(hjvh](h)}(h ``:widths:``h]h:widths:}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxubh, [[int] [int] ... ] widths of columns}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMxhjtubah}(h]h ]h"]h$]h&]uh1ju hj'hhhhhNubjv )}(hQ``:fill-cells:`` instead of auto-spanning missing cells, insert missing cells h]h)}(hP``:fill-cells:`` instead of auto-spanning missing cells, insert missing cellsh](h)}(h``:fill-cells:``h]h :fill-cells:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh@ instead of auto-spanning missing cells, insert missing cells}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhjubah}(h]h ]h"]h$]h&]uh1ju hj'hhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j hhhMvhjhhubh)}(hroles:h]hroles:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjhhubj )}(hhh](jv )}(h1``:cspan:`` [int] additional columns (*morecols*)h]h)}(hjh](h)}(h ``:cspan:``h]h:cspan:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh [int] additional columns (}(hjhhhNhNubj )}(h *morecols*h]hmorecols}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1ju hjhhhhhNubjv )}(h/``:rspan:`` [int] additional rows (*morerows*) h]h)}(h.``:rspan:`` [int] additional rows (*morerows*)h](h)}(h ``:rspan:``h]h:rspan:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh [int] additional rows (}(hjhhhNhNubj )}(h *morerows*h]hmorerows}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM~hj ubah}(h]h ]h"]h$]h&]uh1ju hjhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j hhhM}hjhhubh)}(hXGThe example below shows how to use this markup. The first level of the staged list is the *table-row*. In the *table-row* there is only one markup allowed, the list of the cells in this *table-row*. Exceptions are *comments* ( ``..`` ) and *targets* (e.g. a ref to ``:ref:`last row ``` / :ref:`last row `).h](h[The example below shows how to use this markup. The first level of the staged list is the }(hjKhhhNhNubj )}(h *table-row*h]h table-row}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKubh . In the }(hjKhhhNhNubj )}(h *table-row*h]h table-row}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKubhA there is only one markup allowed, the list of the cells in this }(hjKhhhNhNubj )}(h *table-row*h]h table-row}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKubh. Exceptions are }(hjKhhhNhNubj )}(h *comments*h]hcomments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKubh ( }(hjKhhhNhNubh)}(h``..``h]h..}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKubh ) and }(hjKhhhNhNubj )}(h *targets*h]htargets}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKubh (e.g. a ref to }(hjKhhhNhNubh)}(h``:ref:`last row ```h]h:ref:`last row `}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKubh / }(hjKhhhNhNubh)}(h:ref:`last row `h]j)}(hjh]hlast row}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjlast rowuh1hhhhMhjKubh).}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(hX&.. flat-table:: table title :widths: 2 1 1 3 * - head col 1 - head col 2 - head col 3 - head col 4 * - row 1 - field 1.1 - field 1.2 with autospan * - row 2 - field 2.1 - :rspan:`1` :cspan:`1` field 2.2 - 3.3 * .. _`last row`: - row 3h]hX&.. flat-table:: table title :widths: 2 1 1 3 * - head col 1 - head col 2 - head col 3 - head col 4 * - row 1 - field 1.1 - field 1.2 with autospan * - row 2 - field 2.1 - :rspan:`1` :cspan:`1` field 2.2 - 3.3 * .. _`last row`: - row 3}hjsbah}(h]h ]h"]h$]h&]jejfj j rstj }uh1jUhhhMhjhhubh)}(h Rendered as:h]h Rendered as:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hX'.. flat-table:: table title :widths: 2 1 1 3 * - head col 1 - head col 2 - head col 3 - head col 4 * - row 1 - field 1.1 - field 1.2 with autospan * - row 2 - field 2.1 - :rspan:`1` :cspan:`1` field 2.2 - 3.3 * .. _`last row`: - row 3 dh]j)}(hhh](h)}(h table titleh]h table title}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj.ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj.ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj.ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj.ubjW)}(hhh](j)}(hhh](j)}(hhh]h)}(h head col 1h]h head col 1}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(h head col 2h]h head col 2}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjvubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(h head col 3h]h head col 3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(h head col 4h]h head col 4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhjYubj)}(hhh](j)}(hhh]h)}(hrow 1h]hrow 1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h field 1.1h]h field 1.1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hfield 1.2 with autospanh]hfield 1.2 with autospan}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]morecolsKuh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjYubj)}(hhh](j)}(hhh]h)}(hrow 2h]hrow 2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h field 2.1h]h field 2.1}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h%:rspan:`1` :cspan:`1` field 2.2 - 3.3h](h }(hjDhhhNhNubh field 2.2 - 3.3}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]morerowsKmorecolsKuh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjYubj)}(hhh](j)}(hhh](h)}(h.. _`last row`:h]h}(h]h ]h"]h$]h&]hlast-rowuh1hhMhjgubh)}(hrow 3h]hrow 3}(hjuhhhNhNubah}(h]jtah ]h"]last rowah$]h&]uh1hhhhMhjgj}jjjsj}jtjjsubeh}(h]h ]h"]h$]h&]uh1jhjdubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jVhj.ubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h]id6ah ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h] list-tablesah ]h"] list tablesah$]h&]uh1hhjhhhhhM^ubeh}(h]tablesah ]h"]tablesah$]h&]uh1hhjQ hhhhhMTubh)}(hhh](h)}(hCross-referencingh]hCross-referencing}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXCross-referencing from one documentation page to another can be done simply by writing the path to the document file, no special syntax required. The path can be either absolute or relative. For absolute paths, start it with "Documentation/". For example, to cross-reference to this page, all the following are valid options, depending on the current document's directory (note that the ``.rst`` extension is required)::h](hXCross-referencing from one documentation page to another can be done simply by writing the path to the document file, no special syntax required. The path can be either absolute or relative. For absolute paths, start it with “Documentation/”. For example, to cross-reference to this page, all the following are valid options, depending on the current document’s directory (note that the }(hjhhhNhNubh)}(h``.rst``h]h.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh extension is required):}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(hSee Documentation/doc-guide/sphinx.rst. This always works. Take a look at sphinx.rst, which is at this same directory. Read ../sphinx.rst, which is one directory above.h]hSee Documentation/doc-guide/sphinx.rst. This always works. Take a look at sphinx.rst, which is at this same directory. Read ../sphinx.rst, which is one directory above.}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjhhubh)}(hIf you want the link to have a different rendered text other than the document's title, you need to use Sphinx's ``doc`` role. For example::h](huIf you want the link to have a different rendered text other than the document’s title, you need to use Sphinx’s }(hjhhhNhNubh)}(h``doc``h]hdoc}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh role. For example:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(h`.h]h`.}hj$sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjhhubh)}(hFor most use cases, the former is preferred, as it is cleaner and more suited for people reading the source files. If you come across a ``:doc:`` usage that isn't adding any value, please feel free to convert it to just the document path.h](hFor most use cases, the former is preferred, as it is cleaner and more suited for people reading the source files. If you come across a }(hj2hhhNhNubh)}(h ``:doc:``h]h:doc:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubh_ usage that isn’t adding any value, please feel free to convert it to just the document path.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hrFor information on cross-referencing to kernel-doc functions or types, see Documentation/doc-guide/kernel-doc.rst.h]hrFor information on cross-referencing to kernel-doc functions or types, see Documentation/doc-guide/kernel-doc.rst.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhh](h)}(hReferencing commitsh]hReferencing commits}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hhhhhMubh)}(hmReferences to git commits are automatically hyperlinked given that they are written in one of these formats::h]hlReferences to git commits are automatically hyperlinked given that they are written in one of these formats:}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`hhubjV)}(hYcommit 72bf4f1767f0 commit 72bf4f1767f0 ("net: do not leave an empty skb in write queue")h]hYcommit 72bf4f1767f0 commit 72bf4f1767f0 ("net: do not leave an empty skb in write queue")}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhj`hhubh)}(h.. _sphinx_kfigure:h]h}(h]h ]h"]h$]h&]hsphinx-kfigureuh1hhMhj`hhhhubeh}(h]referencing-commitsah ]h"]referencing commitsah$]h&]uh1hhjhhhhhMubeh}(h]cross-referencingah ]h"]cross-referencingah$]h&]uh1hhjQ hhhhhMubeh}(h]writing-documentationah ]h"]writing documentationah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFigures & Imagesh]hFigures & Images}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hIf you want to add an image, you should use the ``kernel-figure`` and ``kernel-image`` directives. E.g. to insert a figure with a scalable image format, use SVG (:ref:`svg_image_example`)::h](h0If you want to add an image, you should use the }(hjhhhNhNubh)}(h``kernel-figure``h]h kernel-figure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h``kernel-image``h]h kernel-image}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhL directives. E.g. to insert a figure with a scalable image format, use SVG (}(hjhhhNhNubh)}(h:ref:`svg_image_example`h]j)}(hjh]hsvg_image_example}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjsvg_image_exampleuh1hhhhMhjubh):}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(hT.. kernel-figure:: svg_image.svg :alt: simple SVG image SVG image exampleh]hT.. kernel-figure:: svg_image.svg :alt: simple SVG image SVG image example}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjhhubh)}(h.. _svg_image_example:h]h}(h]h ]h"]h$]h&]hsvg-image-exampleuh1hhMhjhhhhubkfigure kernel_figure)}(hhh]hfigure)}(hhh](himage)}(hU.. kernel-figure:: svg_image.svg :alt: simple SVG image SVG image example h]h}(h]h ]h"]h$]h&]altsimple SVG imageuridoc-guide/svg_image.svg candidates}j jJsuh1j;hj8hhhKubhcaption)}(hSVG image exampleh]hSVG image example}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jMhhhMhj8ubeh}(h]id7ah ]h"]h$]h&]uh1j6hj3ubah}(h]j/ah ]h"]svg_image_exampleah$]h&]uh1j1hjhhhhhNj}jhj%sj}j/j%subh)}(hMThe kernel figure (and image) directive supports **DOT** formatted files, seeh](h1The kernel figure (and image) directive supports }(hjmhhhNhNubj )}(h**DOT**h]hDOT}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjmubh formatted files, see}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(hhh](jv )}(h)DOT: http://graphviz.org/pdf/dotguide.pdfh]h)}(hjh](hDOT: }(hjhhhNhNubh)}(h$http://graphviz.org/pdf/dotguide.pdfh]h$http://graphviz.org/pdf/dotguide.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1ju hjhhhhhNubjv )}(h7Graphviz: http://www.graphviz.org/content/dot-language h]h)}(h6Graphviz: http://www.graphviz.org/content/dot-languageh](h Graphviz: }(hjhhhNhNubh)}(h,http://www.graphviz.org/content/dot-languageh]h,http://www.graphviz.org/content/dot-language}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1ju hjhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j hhhMhjhhubh)}(h*A simple example (:ref:`hello_dot_file`)::h](hA simple example (}(hjhhhNhNubh)}(h:ref:`hello_dot_file`h]j)}(hjh]hhello_dot_file}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjhello_dot_fileuh1hhhhMhjubh):}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(hS.. kernel-figure:: hello.dot :alt: hello world DOT's hello world exampleh]hS.. kernel-figure:: hello.dot :alt: hello world DOT's hello world example}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjhhubh)}(h.. _hello_dot_file:h]h}(h]h ]h"]h$]h&]hhello-dot-fileuh1hhMhjhhhhubj2)}(hhh]j7)}(hhh](j<)}(hT.. kernel-figure:: hello.dot :alt: hello world DOT's hello world example h]h}(h]h ]h"]h$]h&]alt hello worlduridoc-guide/hello.dotjK}j jAsuh1j;hj1hhhKubjN)}(hDOT's hello world exampleh]hDOT’s hello world example}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jMhhhMhj1ubeh}(h]id8ah ]h"]h$]h&]uh1j6hj.ubah}(h]j-ah ]h"]hello_dot_fileah$]h&]uh1j1hjhhhhhNj}j\j#sj}j-j#subh)}(htEmbedded *render* markups (or languages) like Graphviz's **DOT** are provided by the ``kernel-render`` directives.::h](h Embedded }(hjahhhNhNubj )}(h*render*h]hrender}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j hjaubh* markups (or languages) like Graphviz’s }(hjahhhNhNubj )}(h**DOT**h]hDOT}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjaubh are provided by the }(hjahhhNhNubh)}(h``kernel-render``h]h kernel-render}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubh directives.:}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(h.. kernel-render:: DOT :alt: foobar digraph :caption: Embedded **DOT** (Graphviz) code digraph foo { "bar" -> "baz"; }h]h.. kernel-render:: DOT :alt: foobar digraph :caption: Embedded **DOT** (Graphviz) code digraph foo { "bar" -> "baz"; }}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjhhubh)}(hHow this will be rendered depends on the installed tools. If Graphviz is installed, you will see a vector image. If not, the raw markup is inserted as *literal-block* (:ref:`hello_dot_render`).h](hHow this will be rendered depends on the installed tools. If Graphviz is installed, you will see a vector image. If not, the raw markup is inserted as }(hjhhhNhNubj )}(h*literal-block*h]h literal-block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh (}(hjhhhNhNubh)}(h:ref:`hello_dot_render`h]j)}(hjh]hhello_dot_render}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjhello_dot_renderuh1hhhhM hjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(h.. _hello_dot_render:h]h}(h]h ]h"]h$]h&]hhello-dot-renderuh1hhM hjhhhhubj7)}(hhh](j0 kernel_render)}(hhh]jV)}(h"digraph foo { "bar" -> "baz"; }h]h"digraph foo { "bar" -> "baz"; }}hj sbah}(h]h ]h"]h$]h&]jejfuh1jUhjhhubah}(h]h ]h"]h$]h&]altfoobar digraphsrclangDOTuh1jhjubjN)}(h Embedded **DOT** (Graphviz) codeh](h Embedded }(hj"hhhNhNubj )}(h**DOT**h]hDOT}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh (Graphviz) code}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1jMhhhKhjubeh}(h](id9jeh ]h"]hello_dot_renderah$]h&]altjcaptionj$uh1j6hjhhhhhNj}jGjsj}jjsubh)}(hXThe *render* directive has all the options known from the *figure* directive, plus option ``caption``. If ``caption`` has a value, a *figure* node is inserted. If not, an *image* node is inserted. A ``caption`` is also needed, if you want to refer to it (:ref:`hello_svg_render`).h](hThe }(hjNhhhNhNubj )}(h*render*h]hrender}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNubh. directive has all the options known from the }(hjNhhhNhNubj )}(h*figure*h]hfigure}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNubh directive, plus option }(hjNhhhNhNubh)}(h ``caption``h]hcaption}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNubh. If }(hjNhhhNhNubh)}(h ``caption``h]hcaption}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNubh has a value, a }(hjNhhhNhNubj )}(h*figure*h]hfigure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNubh node is inserted. If not, an }(hjNhhhNhNubj )}(h*image*h]himage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNubh node is inserted. A }(hjNhhhNhNubh)}(h ``caption``h]hcaption}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNubh- is also needed, if you want to refer to it (}(hjNhhhNhNubh)}(h:ref:`hello_svg_render`h]j)}(hjh]hhello_svg_render}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjhello_svg_renderuh1hhhhMhjNubh).}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hEmbedded **SVG**::h](h Embedded }(hjhhhNhNubj )}(h**SVG**h]hSVG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(h.. kernel-render:: SVG :caption: Embedded **SVG** markup :alt: so-nw-arrow ... h]h.. kernel-render:: SVG :caption: Embedded **SVG** markup :alt: so-nw-arrow ... }hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjhhubh)}(h.. _hello_svg_render:h]h}(h]h ]h"]h$]h&]hhello-svg-renderuh1hhM'hjhhhhubj7)}(hhh](j)}(hhh]jV)}(hX? h]hX? }hj=sbah}(h]h ]h"]h$]h&]jejfuh1jUhj:hhubah}(h]h ]h"]h$]h&]j so-nw-arrowj SVGuh1jhj7ubjN)}(hEmbedded **SVG** markuph](h Embedded }(hjShhhNhNubj )}(h**SVG**h]hSVG}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjSubh markup}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1jMhhhKhj7ubeh}(h](id10j6eh ]h"]hello_svg_renderah$]h&]captionjUaltjQuh1j6hjhhhhhNj}jxj,sj}j6j,subeh}(h](figures-imagesjeh ]h"](figures & imagessphinx_kfigureeh$]h&]uh1hhhhhhhhMj}jjsj}jjsubeh}(h](%using-sphinx-for-kernel-documentationheh ]h"](%using sphinx for kernel documentation sphinxdoceh$]h&]uh1hhhhhhhhKj}jhsj}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(sphinx](hjf erestructuredtext](hjz eimgmath]jramathjax]jachoice of math renderer]jaink]jasph1_8]jatoc tree]j arestructuredtext primer]j a!sphinx specific markup constructs]j a0restructuredtext user reference for table syntax]jaurefids}(h]haj]jaj]jajt]jjaj]jaj/]j%aj-]j#aj]jaj6]j,aj]jaj]jaunameids}(jhjjjVjSjcj`jFjjEjBjjjVjSjjjjjjjjjjj=j:jN jK jjjF jj? jjjj j j j j j j j jjjjjjjjjjtjjjjjjjjjhj/j\j-jGjjxj6u nametypes}(jjjVjcjFjEjjVjjjjjj=jN jjF j? jj j j j jjjjjjjjjjhj\jGjxuh}(hhjhjSjMj`jZjjjBjjjjSjjjYjjjjjjjjj:jjK jKjjjj7jjjjjj jjQ j j j j j j j j jj jjjjjjjtjujjjj`jjjjj/j3j-j.jjj6j7jjj j jjj_j8jSj1jDjjuj7u footnote_refs}(j]jaj]jau citation_refs} autofootnotes](j7j eautofootnote_refs](jjesymbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jK sRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h/Hyperlink target "sphinxdoc" is not referenced.}hjCsbah}(h]h ]h"]h$]h&]uh1hhj@ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j>ubj?)}(hhh]h)}(hhh]h4Hyperlink target "sphinx-install" is not referenced.}hj^sbah}(h]h ]h"]h$]h&]uh1hhj[ubah}(h]h ]h"]h$]h&]levelKtypejXsourcehlineKuh1j>ubj?)}(hhh]h)}(hhh]h8Hyperlink target "sphinx-pre-install" is not referenced.}hjxsbah}(h]h ]h"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]levelKtypejXsourcehlineKduh1j>ubj?)}(hhh]h)}(hhh]h.Hyperlink target "last-row" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejXlineMsourcehuh1j>ubj?)}(hhh]h)}(hhh]h4Hyperlink target "sphinx-kfigure" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejXsourcehlineMuh1j>ubj?)}(hhh]h)}(hhh]h7Hyperlink target "svg-image-example" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejXsourcehlineMuh1j>ubj?)}(hhh]h)}(hhh]h4Hyperlink target "hello-dot-file" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejXsourcehlineMuh1j>ubj?)}(hhh]h)}(hhh]h6Hyperlink target "hello-dot-render" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejXsourcehlineM uh1j>ubj?)}(hhh]h)}(hhh]h6Hyperlink target "hello-svg-render" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejXsourcehlineM'uh1j>ube transformerN include_log] decorationNhhub.