On 2015-05-28, anatoly techtonik wrote:
> On Thu, May 28, 2015 at 4:05 PM, Guenter Milde <
mi...@users.sf.net> wrote:
>>>> This can become the basis of an additional HTML5 writer, if there is need
>>>> for more specific HTML 5 support.
>>> Yes, please. Absense of HTML5 makes Sphinx customization pretty limited.
>> Can you be more specific, please? Where would HTML5 be better configurable
>> than XHTML1.1?
> Configurable?
Customizable, to use the term you introduced. However, I cannot see the
connection between (X)HTML version and Sphinx customization.
> HTML5 is for humans.
... but Docutils/Sphinx is a program that can easily translate a markup
language that is even more suited for input by humans (rST) into both,
valid HTML and XHTML.
>
http://www.dummies.com/how-to/content/the-relationship-between-html5-and-xhtml.html
The arguments in favour of HTML over XHTML don't hold if you generate the
document from another language.
The the new Docutils HTML writer implements the strict content/layout
separation for HTML as well as XHTML.
Customization/Layout/Styling is done via CSS and does not depend
on the HTML/XHTML version.
Easier parsing and machine-processing is the advantage of XML that comes at
no cost with Docutils.
> You don't want t XSLT stylesheets for the doctools output, do you?
Well, the only existing rst2rst converter uses XSLT and the native
DocutilsXML.
>>> Also, is it possible to make markup of parent elements independent on their
>>> child? While styling it gives a headache when markup starts depend on the
>>> content.
>>> Here is one case
http://permalink.gmane.org/gmane.text.docutils.devel/5982
>> The new html writer(s) do not change the basic behaviour: just like the
>> current writer there is an option to style a list differently depending
>> on "compactness".
>> However, this is fully configurable (also with the current html writer)
>> via a Docutils configuration setting or via custom CSS. This is why the
>> referenced bug report is closed as invalid. For details see my reply to
>> the bug report.
>> One problem is, that the Sphinx documentation does not reveal how to set
>> Docutils configuration settings.
>> Relevant settings in `Docutils configuration files`__ are fully
>> considered by the Docutils parser, transforms and writer(s) used by
>> Sphinx "under the hood".
>> __
http://docutils.sourceforge.net/docs/user/config.html#configuration-files
> The problem is that rare people understand where docutils configuration is,
> what is needed to be set to get consistent markup, and there is usually no
> time to grok on that.
This is a pity and a problem of Sphinx: it uses a complex tool under the
hood and adds more complexity in the
> It will really help people (especially those without rich
> Python/docutils/reST background) who are asked to do styles for the
> docs if the output from Sphinx html5 is predictable 1:1 mapping of
> elements that don't try to be too smart and leave the hard job of
> styling what is got there to CSS + JS.
Also the new writer (both xhtml and html5) will have different spacing
for compact and open lists but this is implemented via a class argument
and the default CSS rules. So it can be configured just as easy and maybe a
bit more straigthforward by just looking into the CSS style sheet.
Günter