Re: [HACKERS] Small issue in online devel documentation build

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Small issue in online devel documentation build
Date: 2017-02-18 14:26:45
Message-ID: alpine.DEB.2.20.1702181420030.2300@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www


Hello Magnus,

> It turns out the "c2" class is added by tidy. The reason is this:
> http://api.html-tidy.org/tidy/quickref_5.0.0.html#clean

> I've removed the flag for the devel docs build for now (or - for any XML
> based docs build). I've also forced another docs load, so the results can
> be checked.

Indeed, thanks, now it looks great... under firefox at least.

Another issue in the new HTML documentation, this time not related to the
web site. Under chrome there are some strange font size effects on
options, for instance with this HTML in "app-psql.html":

<span class="term">
<code class="option">-f
<em class="replaceable"><code>filename</code></em>
</code>
<br>
</span>

For previous versions, the following html was generated:

<tt class="OPTION">-f <tt class="REPLACEABLE c2">filename</tt></tt>

The filename in the newer html appears much larger under chrome, seemingly
because of the <code> within a <code>. Maybe a bug in chrome CSS
interpretation, because CSS on code seems to indicate "font-size: 1.3em",
but it seems to do 1.3**2 instead for "filename"... However it does not do
that elsewhere so it may not be that simple...

Basically it looks ok under chrome if in the initial sgml file there is:

<term><option>-s</option> <replaceable>scale_factor</></term>

(replaceable is out of option)

But bad on:

<term><option>--tablespace=<replaceable>tablespace</replaceable></option></term>

(replaceable is in the option), because the size change is somehow applied
twice.

The docbook doc says that "replaceable" is a children of "option", which
seems to suggest that this nested usage is legit... but it may be buggy as
well.

This may be fixed/worked around in several places:

1. html generation could be clever enough not to nest "code" tags?
or generate tt tags instead as was done before?

I have not found where this transformation is defined, probably
somewhere within "docbook"...

2. avoid replaceable within option in initial sgml files
=> many changes, will reappear if someone forgets.

3. some more post-processing tidying could be done
hmmm:-(

4. chrome should be repaired if there is indeed a bug...

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-02-18 14:57:00 Re: Provide list of subscriptions and publications in psql's completion
Previous Message Petr Jelinek 2017-02-18 14:05:12 Re: Logical replication existing data copy

Browse pgsql-www by date

  From Date Subject
Next Message Tom Lane 2017-02-18 16:00:55 Re: OS X to macOS
Previous Message Magnus Hagander 2017-02-18 13:15:00 Re: [HACKERS] Small issue in online devel documentation build