[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160304085908.GA17381@linuxtv.org>
Date: Fri, 4 Mar 2016 09:59:08 +0100
From: Johannes Stezenbach <js@...uxtv.org>
To: Jani Nikula <jani.nikula@...el.com>
Cc: Mauro Carvalho Chehab <mchehab@....samsung.com>,
Keith Packard <keithp@...thp.com>,
Jonathan Corbet <corbet@....net>,
LKML <linux-kernel@...r.kernel.org>, linux-doc@...r.kernel.org,
Daniel Vetter <daniel.vetter@...ll.ch>,
Hans Verkuil <hverkuil@...all.nl>, linux-media@...r.kernel.org,
Graham Whaley <graham.whaley@...ux.intel.com>
Subject: Re: Kernel docs: muddying the waters a bit
On Fri, Mar 04, 2016 at 10:29:08AM +0200, Jani Nikula wrote:
> On Fri, 04 Mar 2016, Mauro Carvalho Chehab <mchehab@....samsung.com> wrote:
> >
> > If, on the other hand, we decide to use RST, we'll very likely need to
> > patch it to fulfill our needs in order to add proper table support.
> > I've no idea how easy/difficult would be to do that, nor if Sphinx
> > upstream would accept such changes.
> >
> > So, at the end of the day, we may end by having to carry on our own
> > version of Sphinx inside our tree, with doesn't sound good, specially
> > since it is not just a script, but a package with hundreds of
> > files.
>
> If we end up having to modify Sphinx, it has a powerful extension
> mechanism for this. We wouldn't have to worry about getting it merged to
> Sphinx upstream, and we wouldn't have to carry a local version of all of
> Sphinx. (In fact, the extension mechanism provides a future path for
> doing kernel-doc within Sphinx instead of as a preprocessing step.)
>
> I know none of this alleviates your concerns with table supports right
> now. I'll try to have a look at that a bit more.
FWIW, I think table formatting in Sphinx works via style sheets.
The mechanism is documented in the Python docutils docs that
Sphinx is built upon.
Basically you use the "class" or "role" directive and define
the corresponding CSS or LaTeX (or rst2pdf) style.
Here is one example (using a custom "cssclass" role):
https://pythonhosted.org/sphinxjp.themes.basicstrap/sample.html
Directives (especially role and class):
http://www.sphinx-doc.org/en/stable/rest.html#directives
LaTeX styling:
http://docutils.readthedocs.org/en/sphinx-docs/user/latex.html#custom-interpreted-text-roles
HTH,
Johannes
Powered by blists - more mailing lists