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?)}(hX``--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}jjsubeh}(h](jid1eh ]h"](sphinx installsphinx_installeh$]h&]uh1hhhhhhhhKj}jjsj}jjsubh)}(hhh](h)}(h Sphinx Buildh]h Sphinx Build}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(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 }(hjhhhNhNubh)}(h``make htmldocs``h]h make htmldocs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh or }(hjhhhNhNubh)}(h``make pdfdocs``h]h make pdfdocs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhK. There are also other formats available: see the documentation section of }(hjhhhNhNubh)}(h ``make help``h]h make help}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhP. The generated documentation is placed in format-specific subdirectories under }(hjhhhNhNubh)}(h``Documentation/output``h]hDocumentation/output}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(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 (}(hj9hhhNhNubh)}(h``sphinx-build``h]h sphinx-build}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubhB) must obviously be installed. For PDF output you’ll also need }(hj9hhhNhNubh)}(h ``XeLaTeX``h]hXeLaTeX}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubh and }(hj9hhhNhNubh)}(h``convert(1)``h]h convert(1)}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubh from ImageMagick (}(hj9hhhNhNubh)}(hhttps://www.imagemagick.orgh]hhttps://www.imagemagick.org}(hjwhhhNhNubah}(h]h ]h"]h$]h&]refurijyuh1hhj9ubh). }(hj9hhhNhNubhfootnote_reference)}(h[#ink]_h]h1}(hjhhhNhNubah}(h]id2ah ]h"]h$]h&]autoKhinkdocnamejuh1jhj9hKubhA All of these are widely available and packaged in distributions.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(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 }(hjhhhNhNubh)}(h``SPHINXOPTS``h]h SPHINXOPTS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh! make variable. For example, use }(hjhhhNhNubh)}(h``make SPHINXOPTS=-v htmldocs``h]hmake SPHINXOPTS=-v htmldocs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh to get more verbose output.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(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 }(hjhhhNhNubh)}(h ``DOCS_CSS``h]hDOCS_CSS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh make variable.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(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 }(hjhhhNhNubh)}(h``DOCS_THEME``h]h DOCS_THEME}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh make variable.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhnote)}(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 }(hj hhhNhNubh)}(h ``pip install sphinx_rtd_theme``h]hpip install sphinx_rtd_theme}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(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 }(hjFhhhNhNubh)}(h``SPHINXDIRS``h]h SPHINXDIRS}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubhl, which is useful when test building a subset of documentation. For example, you can build documents under }(hjFhhhNhNubh)}(h``Documentation/doc-guide``h]hDocumentation/doc-guide}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubh by running }(hjFhhhNhNubh)}(h&``make SPHINXDIRS=doc-guide htmldocs``h]h"make SPHINXDIRS=doc-guide htmldocs}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubh. The documentation section of }(hjFhhhNhNubh)}(h ``make help``h]h make help}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubh: will show you the list of subdirectories you can specify.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(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&]uh1hhhhKhjhhubhfootnote)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(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 }(hjhhhNhNubh)}(h``inkscape(1)``h]h inkscape(1)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh from Inkscape (}(hjhhhNhNubh)}(hhttps://inkscape.orgh]hhttps://inkscape.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubhw) as well would improve the quality of images embedded in PDF documents, especially for kernel releases 5.18 and later.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]jah ]h"]inkah$]h&]jajKjjuh1jhhhKhjhhubh)}(hhh](h)}(hChoice of Math Rendererh]hChoice of Math Renderer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(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}(hj$hhhNhNubah}(h]id3ah ]h"]h$]h&]jKhsph1-8jjuh1jhjhKubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hGMath renderer is chosen depending on available commands as shown below:h]hGMath renderer is chosen depending on available commands as shown below:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubhtable)}(hhh](h)}(hMath Renderer Choices for HTMLh]hMath Renderer Choices for HTML}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j`hj]ubja)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j`hj]ubja)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j`hj]ubhthead)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhj]ubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(himgmathh]himgmath}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h latex, dvipngh]h latex, dvipng}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h PNG (raster)h]h PNG (raster)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hmathjaxh]hmathjax}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3ubah}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]colsKuh1j[hjJubeh}(h]id4ah ]h"]h$]h&]uh1jHhj hhhhhNubh)}(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 }(hjvhhhNhNubh)}(h``SPHINX_IMGMATH``h]hSPHINX_IMGMATH}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvubh as shown below:}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjI)}(hhh](h)}(h$Effect of Setting ``SPHINX_IMGMATH``h](hEffect of Setting }(hjhhhNhNubh)}(h``SPHINX_IMGMATH``h]hSPHINX_IMGMATH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubj\)}(hhh](ja)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j`hjubja)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j`hjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hSettingh]hSetting}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hRendererh]hRenderer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj2 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)}(hjW h]hSPHINX_IMGMATH=no}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU ubah}(h]h ]h"]h$]h&]uh1hhhhKhjR ubah}(h]h ]h"]h$]h&]uh1jhjO ubj)}(hhh]h)}(hmathjaxh]hmathjax}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjr ubah}(h]h ]h"]h$]h&]uh1jhjO ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j[hjubeh}(h]id5ah ]h"]h$]h&]uh1jHhj hhhhhNubj)}(h2Fallback of math renderer requires Sphinx >=1.8. h](j)}(hhh]h2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 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]j3ah ]h"]sph1_8ah$]h&]j.ajKjjuh1jhhhKhj hhubeh}(h]jah ]h"]choice of math rendererah$]h&]uh1hhjhhhhhKjYKubeh}(h] sphinx-buildah ]h"] sphinx buildah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hWriting Documentationh]hWriting Documentation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(h-Adding new documentation can be as simple as:h]h-Adding new documentation can be as simple as:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubhenumerated_list)}(hhh](h list_item)}(h:Add a new ``.rst`` file somewhere under ``Documentation``.h]h)}(hj 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&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj hhhhhNubj )}(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}(hjE 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}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj= ubh.}(hj= hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj9 ubah}(h]h ]h"]h$]h&]uh1j hj hhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1j hj hhhhhKubh)}(hE.. _TOC tree: http://www.sphinx-doc.org/en/stable/markup/toctree.htmlh]h}(h]toc-treeah ]h"]toc treeah$]h&]hjU uh1hhKhj 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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh (with a }(hj hhhNhNubh)}(h ``toctree``h]htoctree}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh, of its own) referenced from the main index.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj 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}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameSphinxhhuh1hhj hKubh and }(hj hhhNhNubh)}(h`reStructuredText`_h]hreStructuredText}(hj 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&]uh1hhhhKhj hhubh)}(hJ.. _reStructuredText Primer: http://www.sphinx-doc.org/en/stable/rest.htmlh]h}(h]restructuredtext-primerah ]h"]restructuredtext primerah$]h&]hj% uh1hhKhj 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: uh1hhKhj hhhhjYKubh)}(hhh](h)}(h0Specific guidelines for the kernel documentationh]h0Specific guidelines for the kernel documentation}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj] hhhhhKubh)}(h?Here are some specific guidelines for the kernel documentation:h]h?Here are some specific guidelines for the kernel documentation:}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj] hhubh bullet_list)}(hhh](j )}(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&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj~ hhhhhNubj )}(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&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj~ hhhhhNubj )}(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&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hj~ hhhhhNubj )}(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:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubj )}(hhh](j )}(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&]uh1hhhhKhj ubjV)}(h,============== Document title ==============h]h,============== Document title ==============}hj sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhKhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(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 ========}hj2 sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(h*``-`` for sections:: Section ------- h](h)}(h``-`` for sections::h](h)}(h``-``h]h-}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ ubh for sections:}(hjJ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjF ubjV)}(hSection -------h]hSection -------}hjf sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhM hjF ubeh}(h]h ]h"]h$]h&]uh1j hj ubj )}(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 hjz ubjV)}(hSubsection ~~~~~~~~~~h]hSubsection ~~~~~~~~~~}hj sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjz ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]j~ j j hj j uh1j hj 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&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j hj~ hhhhhNubj )}(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 }(hj hhhNhNubh)}(h``::``h]h::}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhe for anything that doesn’t really benefit from syntax highlighting, especially short snippets. Use }(hj hhhNhNubh)}(h``.. code-block:: ``h]h.. code-block:: }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhs for longer code blocks that benefit from highlighting. For a short snippet of code embedded in the text, use ``.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj~ hhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1j| hhhKhj] hhubeh}(h]0specific-guidelines-for-the-kernel-documentationah ]h"]0specific guidelines for the kernel documentationah$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h The C domainh]h The C domain}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(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&]uh1hhhhM!hj hhubjV)}(h0.. c:function:: int ioctl( int fd, int request )h]h0.. c:function:: int ioctl( int fd, int request )}hjG 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 }(hjZ hhhNhNubhemphasis)}(h*rename*h]hrename}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjZ ubh: the reference name of a function with a common name like }(hjZ hhhNhNubh)}(h``open``h]hopen}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ ubh or }(hjZ hhhNhNubh)}(h ``ioctl``h]hioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ ubh:}(hjZ 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}hj sbah}(h]h ]h"]h$]h&]jejfjU jV rstjX }uh1jUhhhM,hj 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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh to }(hj hhhNhNubh)}(h``VIDIOC_LOG_STATUS``h]hVIDIOC_LOG_STATUS}(hj hhhNhNubah}(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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM1hj 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 }(hj hhhNhNubh)}(h ``c:func:``h]hc:func:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh to generate cross references to function documentation. Due to some Sphinx extension magic, the documentation build system will automatically turn a reference to }(hj hhhNhNubh)}(h``function()``h]h function()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhZ into a cross reference if an index entry for the given function name exists. If you see }(hj hhhNhNubh)}(h ``c:func:``h]hc:func:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh9 use in a kernel document, please feel free to remove it.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM5hj hhubeh}(h] the-c-domainah ]h"] the c domainah$]h&]uh1hhj hhhhhMubh)}(hhh](h)}(hTablesh]hTables}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhM=ubh)}(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 }(hjQhhhNhNubjc )}(h*simple table*h]h simple table}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjQubh syntax or }(hjQhhhNhNubjc )}(h *grid table*h]h grid table}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjQubh syntax. See the }(hjQhhhNhNubh)}(h3`reStructuredText user reference for table syntax`_h]h0reStructuredText user reference for table syntax}(hj}hhhNhNubah}(h]h ]h"]h$]h&]name0reStructuredText user reference for table syntaxhBhttps://docutils.sourceforge.io/docs/user/rst/quickref.html#tablesuh1hhjQhKubh for more details.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM?hj@hhubh)}(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&]hjuh1hhMChj@hhhhjYKubh)}(hhh](h)}(h list tablesh]h list tables}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMGubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjhhubh)}(hfThe ``flat-table`` is a double-stage list similar to the ``list-table`` with some additional features:h](hThe }(hjhhhNhNubh)}(h``flat-table``h]h flat-table}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh' is a double-stage list similar to the }(hjhhhNhNubh)}(h``list-table``h]h list-table}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh with some additional features:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMOhjhhubj} )}(hhh](j )}(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 }(hjhhhNhNubh)}(h ``cspan``h]hcspan}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh2 a cell can be extended through additional columns}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(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 }(hj&hhhNhNubh)}(h ``rspan``h]hrspan}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubh/ a cell can be extended through additional rows}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMUhj"ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(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 }(hjPhhhNhNubh)}(h``:fill-cells:``h]h :fill-cells:}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPubh this behavior can changed from }(hjPhhhNhNubjc )}(h *auto span*h]h auto span}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjPubh to }(hjPhhhNhNubjc )}(h *auto fill*h]h auto fill}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjPubhN, which automatically inserts (empty) cells instead of spanning the last cell.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMXhjLubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j| hhhMRhjhhubh)}(hoptions:h]hoptions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjhhubj} )}(hhh](j )}(h.``:header-rows:`` [int] count of header rowsh]h)}(hjh](h)}(h``:header-rows:``h]h :header-rows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh [int] count of header rows}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM_hjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(h/``:stub-columns:`` [int] count of stub columnsh]h)}(hjh](h)}(h``:stub-columns:``h]h:stub-columns:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh [int] count of stub columns}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM`hjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(h8``:widths:`` [[int] [int] ... ] widths of columnsh]h)}(hjh](h)}(h ``:widths:``h]h:widths:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, [[int] [int] ... ] widths of columns}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMahjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(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:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubh@ instead of auto-spanning missing cells, insert missing cells}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMbhj ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j| hhhM_hjhhubh)}(hroles:h]hroles:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjhhubj} )}(hhh](j )}(h1``:cspan:`` [int] additional columns (*morecols*)h]h)}(hj_h](h)}(h ``:cspan:``h]h:cspan:}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubh [int] additional columns (}(hjahhhNhNubjc )}(h *morecols*h]hmorecols}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjaubh)}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMfhj]ubah}(h]h ]h"]h$]h&]uh1j hjZhhhhhNubj )}(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 (}(hjhhhNhNubjc )}(h *morerows*h]hmorerows}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMghjubah}(h]h ]h"]h$]h&]uh1j hjZhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j| hhhMfhjhhubh)}(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 }(hjhhhNhNubjc )}(h *table-row*h]h table-row}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh . In the }(hjhhhNhNubjc )}(h *table-row*h]h table-row}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubhA there is only one markup allowed, the list of the cells in this }(hjhhhNhNubjc )}(h *table-row*h]h table-row}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh. Exceptions are }(hjhhhNhNubjc )}(h *comments*h]hcomments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh ( }(hjhhhNhNubh)}(h``..``h]h..}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh ) and }(hjhhhNhNubjc )}(h *targets*h]htargets}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh (e.g. a ref to }(hjhhhNhNubh)}(h``:ref:`last row ```h]h:ref:`last row `}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh / }(hjhhhNhNubh)}(h:ref:`last row `h]j)}(hjZh]hlast row}(hj\hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]refdocj refdomainjfreftyperef refexplicitrefwarnjlast rowuh1hhhhMihjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMihjhhubjV)}(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&]jejfjU jV rstjX }uh1jUhhhMohjhhubh)}(h Rendered as:h]h Rendered as:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh block_quote)}(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 h]jI)}(hhh](h)}(h table titleh]h table title}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj\)}(hhh](ja)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j`hjubja)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j`hjubja)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j`hjubja)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j`hjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h head col 1h]h head col 1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h head col 2h]h head col 2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h head col 3h]h head col 3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h head col 4h]h head col 4}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hrow 1h]hrow 1}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMubah}(h]h ]h"]h$]h&]uh1jhjJubj)}(hhh]h)}(h field 1.1h]h field 1.1}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjdubah}(h]h ]h"]h$]h&]uh1jhjJubj)}(hhh]h)}(hfield 1.2 with autospanh]hfield 1.2 with autospan}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{ubah}(h]h ]h"]h$]h&]morecolsKuh1jhjJubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h%:rspan:`1` :cspan:`1` field 2.2 - 3.3h](h }(hjhhhNhNubh field 2.2 - 3.3}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(2[h]h ]h"]h$]h&]morerowsKmorecolsKuh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](h)}(h.. _`last row`:h]h}(h]h ]h"]h$]h&]hlast-rowuh1hhMhjubh)}(hrow 3h]hrow 3}(hjhhhNhNubah}(h]jah ]h"]last rowah$]h&]uh1hhhhMhjj}j jsj}jjsubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j[hjubeh}(h]id6ah ]h"]h$]h&]uh1jHhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h] list-tablesah ]h"] list tablesah$]h&]uh1hhj@hhhhhMGubeh}(h]tablesah ]h"]tablesah$]h&]uh1hhj hhhhhM=ubh)}(hhh](h)}(hCross-referencingh]hCross-referencing}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhhhhhMubh)}(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 }(hj_hhhNhNubh)}(h``.rst``h]h.rst}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubh extension is required):}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubjV)}(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&]jejfuh1jUhhhMhjNhhubh)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh role. For example:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubjV)}(h`.h]h`.}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhjNhhubh)}(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 }(hjhhhNhNubh)}(h ``:doc:``h]h:doc:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh_ usage that isn’t adding any value, please feel free to convert it to just the document path.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNhhubh)}(hhh](h)}(hReferencing commitsh]hReferencing commits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjV)}(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&]jejfuh1jUhhhMhjhhubh)}(h.. _sphinx_kfigure:h]h}(h]h ]h"]h$]h&]hsphinx-kfigureuh1hhMhjhhhhubeh}(h]referencing-commitsah ]h"]referencing commitsah$]h&]uh1hhjNhhhhhMubeh}(h]cross-referencingah ]h"]cross-referencingah$]h&]uh1hhj hhhhhMubeh}(h]writing-documentationah ]h"]writing documentationah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFigures & Imagesh]hFigures & Images}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hhhhhMubh)}(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 }(hjJhhhNhNubh)}(h``kernel-figure``h]h kernel-figure}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubh and }(hjJhhhNhNubh)}(h``kernel-image``h]h kernel-image}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubhL directives. E.g. to insert a figure with a scalable image format, use SVG (}(hjJhhhNhNubh)}(h:ref:`svg_image_example`h]j)}(hjxh]hsvg_image_example}(hjzhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjsvg_image_exampleuh1hhhhMhjJubh):}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubjV)}(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&]jejfuh1jUhhhMhj9hhubh)}(h.. _svg_image_example:h]h}(h]h ]h"]h$]h&]hsvg-image-exampleuh1hhMhj9hhhhubkfigure 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 jsuh1jhjhhhKubhcaption)}(hSVG image exampleh]hSVG image example}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]id7ah ]h"]h$]h&]uh1jhjubah}(h]jah ]h"]svg_image_exampleah$]h&]uh1jhj9hhhhhNj}jjsj}jjsubh)}(hMThe kernel figure (and image) directive supports **DOT** formatted files, seeh](h1The kernel figure (and image) directive supports }(hjhhhNhNubj. )}(h**DOT**h]hDOT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j- hjubh formatted files, see}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubj} )}(hhh](j )}(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}(hj$hhhNhNubah}(h]h ]h"]h$]h&]refurij&uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(h7Graphviz: http://www.graphviz.org/content/dot-language h]h)}(h6Graphviz: http://www.graphviz.org/content/dot-languageh](h Graphviz: }(hjChhhNhNubh)}(h,http://www.graphviz.org/content/dot-languageh]h,http://www.graphviz.org/content/dot-language}(hjKhhhNhNubah}(h]h ]h"]h$]h&]refurijMuh1hhjCubeh}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1j| hhhMhj9hhubh)}(h*A simple example (:ref:`hello_dot_file`)::h](hA simple example (}(hjlhhhNhNubh)}(h:ref:`hello_dot_file`h]j)}(hjvh]hhello_dot_file}(hjxhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjhello_dot_fileuh1hhhhMhjlubh):}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubjV)}(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&]jejfuh1jUhhhMhj9hhubh)}(h.. _hello_dot_file:h]h}(h]h ]h"]h$]h&]hhello-dot-fileuh1hhMhj9hhhhubj)}(hhh]j)}(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.dotj}j jsuh1jhjhhhKubj)}(hDOT's hello world exampleh]hDOT’s hello world example}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]id8ah ]h"]h$]h&]uh1jhjubah}(h]jah ]h"]hello_dot_fileah$]h&]uh1jhj9hhhhhNj}jjsj}jjsubh)}(htEmbedded *render* markups (or languages) like Graphviz's **DOT** are provided by the ``kernel-render`` directives.::h](h Embedded }(hjhhhNhNubjc )}(h*render*h]hrender}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh* markups (or languages) like Graphviz’s }(hjhhhNhNubj. )}(h**DOT**h]hDOT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j- hjubh are provided by the }(hjhhhNhNubh)}(h``kernel-render``h]h kernel-render}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh directives.:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubjV)}(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"; }}hj.sbah}(h]h ]h"]h$]h&]jejfuh1jUhhhMhj9hhubh)}(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 }(hj<hhhNhNubjc )}(h*literal-block*h]h literal-block}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hj<ubh (}(hj<hhhNhNubh)}(h:ref:`hello_dot_render`h]j)}(hjXh]hhello_dot_render}(hjZhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjdreftyperef refexplicitrefwarnjhello_dot_renderuh1hhhhMhj<ubh).}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubh)}(h.. _hello_dot_render:h]h}(h]h ]h"]h$]h&]hhello-dot-renderuh1hhMhj9hhhhubj)}(hhh](j kernel_render)}(hhh]jV)}(h"digraph foo { "bar" -> "baz"; }h]h"digraph foo { "bar" -> "baz"; }}hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhjhhubah}(h]h ]h"]h$]h&]altfoobar digraphsrclangDOTuh1jhjubj)}(h Embedded **DOT** (Graphviz) codeh](h Embedded }(hjhhhNhNubj. )}(h**DOT**h]hDOT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j- hjubh (Graphviz) code}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h](id9jeh ]h"]hello_dot_renderah$]h&]altjcaptionjuh1jhj9hhhhhNj}jjsj}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 }(hjhhhNhNubjc )}(h*render*h]hrender}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh. directive has all the options known from the }(hjhhhNhNubjc )}(h*figure*h]hfigure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh directive, plus option }(hjhhhNhNubh)}(h ``caption``h]hcaption}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh. If }(hjhhhNhNubh)}(h ``caption``h]hcaption}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh has a value, a }(hjhhhNhNubjc )}(h*figure*h]hfigure}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh node is inserted. If not, an }(hjhhhNhNubjc )}(h*image*h]himage}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jb hjubh node is inserted. A }(hjhhhNhNubh)}(h ``caption``h]hcaption}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh- is also needed, if you want to refer to it (}(hjhhhNhNubh)}(h:ref:`hello_svg_render`h]j)}(hj_h]hhello_svg_render}(hjahhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]refdocj refdomainjkreftyperef refexplicitrefwarnjhello_svg_renderuh1hhhhMhjubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubh)}(hEmbedded **SVG**::h](h Embedded }(hjhhhNhNubj. )}(h**SVG**h]hSVG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j- hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubjV)}(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&]jejfuh1jUhhhMhj9hhubh)}(h.. _hello_svg_render:h]h}(h]h ]h"]h$]h&]hhello-svg-renderuh1hhMhj9hhhhubj)}(hhh](j)}(hhh]jV)}(hX? h]hX? }hjsbah}(h]h ]h"]h$]h&]jejfuh1jUhjhhubah}(h]h ]h"]h$]h&]j so-nw-arrowjSVGuh1jhjubj)}(hEmbedded **SVG** markuph](h Embedded }(hjhhhNhNubj. )}(h**SVG**h]hSVG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j- hjubh markup}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h](id10jeh ]h"]hello_svg_renderah$]h&]captionjaltjuh1jhj9hhhhhNj}jjsj}jjsubeh}(h](figures-imagesj eh ]h"](figures & imagessphinx_kfigureeh$]h&]uh1hhhhhhhhMj}jjsj}j jsubeh}(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_handlerj@error_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](hj erestructuredtext](hj eimgmath]jramathjax]jachoice of math renderer]jaink]jasph1_8]j$atoc tree]jE arestructuredtext primer]j a!sphinx specific markup constructs]j* a0restructuredtext user reference for table syntax]j}aurefids}(h]haj]jaj]jaj]jaj ]jaj]jaj]jaj]jaj]jaj]jaj3]j$aunameids}(jhjjjVjSjcj`jjjjjjjVjSjjjjjjjjjjj j jjj jj j3j6j3j j jN jK jZ jW j j j=j:jKjHjjjCj@j jj.j+j&j#jj j j jjjjjjjju nametypes}(jjjVjcjjjjVjjjjjj jj j j6j jN jZ j j=jKjjCj j.j&jj jjjjuh}(hhjhjSjMj`jZjjjjjjjSjjjYjjjjjjjjj jjjjjjj j.j$j3j j3j j j jK jE jW jQ j j] j:j jHj@jjj@jjjj+jNj#jj j9j j9jjjjjjjjjqjJj jj3jjjjjjjjju footnote_refs}(j]jaj]j$au citation_refs} autofootnotes](jj eautofootnote_refs](jj$esymbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jNK sRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h/Hyperlink target "sphinxdoc" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jubj)}(hhh]h)}(hhh]h4Hyperlink target "sphinx-install" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]h)}(hhh]h8Hyperlink target "sphinx-pre-install" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKduh1jubj)}(hhh]h)}(hhh]h.Hyperlink target "last-row" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejlineMsourcehuh1jubj)}(hhh]h)}(hhh]h4Hyperlink target "sphinx-kfigure" is not referenced.}hj5sbah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jubj)}(hhh]h)}(hhh]h7Hyperlink target "svg-image-example" is not referenced.}hjOsbah}(h]h ]h"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jubj)}(hhh]h)}(hhh]h4Hyperlink target "hello-dot-file" is not referenced.}hjisbah}(h]h ]h"]h$]h&]uh1hhjfubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jubj)}(hhh]h)}(hhh]h6Hyperlink target "hello-dot-render" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jubj)}(hhh]h)}(hhh]h6Hyperlink target "hello-svg-render" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jube transformerN include_log] decorationNhhub.