From: Akira Yokosawa <akiyks@gmail.com>
To: bagasdotme@gmail.com, rdunlap@infradead.org
Cc: devicetree@vger.kernel.org, grant.likely@linaro.org,
krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
robh+dt@kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH v2] docs: dt: Make references and mention kernel abstractions
Date: Tue, 9 May 2023 00:09:57 +0900 [thread overview]
Message-ID: <ff9ee361-cb1e-26c3-c14d-f4bc1c1a9059@gmail.com> (raw)
In-Reply-To: <ZFkDce5ISNEu6nsp@debian.me>
Hi,
On Date: Mon, 8 May 2023 21:13:05 +0700, Bagas Sanjaya wrote:
> On Sat, May 06, 2023 at 03:09:11PM -0700, Randy Dunlap wrote:
>> For @linux-doc: Is there something in ReST that does auto section numbering
>> so that this renumbering does not have to be repeated in the future?
>>
>
> There is sectnum:: directive which does the job. In the kernel docs,
Just for you info:
In Sphinx documentation at:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#directives
has a warning which reads:
Warning
Do not use the directives sectnum, header and footer.
Sphinx prefers the the :numbered: option of the toctree:: directive.
See https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree
This directive applies to the documentation as a whole, not to each .rst
file.
An example is at:
https://www.kernel.org/doc/html/latest/process/development-process.html
Just my two cents.
Thanks, Akira
> however, it is customarily used together with contents:: directive to
> generate toctree for current doc. In order for this to work as expected,
> you need also to rearrange section heading levels, like:
>
> ---- >8 ----
> diff --git a/Documentation/devicetree/usage-model.rst b/Documentation/devicetree/usage-model.rst
> index 87f522d5feba81..890dde293540f9 100644
> --- a/Documentation/devicetree/usage-model.rst
> +++ b/Documentation/devicetree/usage-model.rst
> @@ -1,5 +1,8 @@
> .. SPDX-License-Identifier: GPL-2.0
>
> +.. contents::
> +.. sectnum::
> +
> ========================
> Linux and the Devicetree
> ========================
prev parent reply other threads:[~2023-05-08 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 12:43 [PATCH v2] docs: dt: Make references and mention kernel abstractions Linus Walleij
2023-05-06 3:51 ` Bagas Sanjaya
2023-05-06 22:09 ` Randy Dunlap
2023-05-08 14:13 ` Bagas Sanjaya
2023-05-08 15:09 ` Akira Yokosawa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff9ee361-cb1e-26c3-c14d-f4bc1c1a9059@gmail.com \
--to=akiyks@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).