[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
defxx regression in docbook output cvs texinfo
From: |
Per Bothner |
Subject: |
defxx regression in docbook output cvs texinfo |
Date: |
Fri, 20 Jul 2012 20:59:57 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
It's been a while since I updated cvs texinfo, but today I did
to see if a problem was fixed. It was, but there another bigger problem
in the docbook translation of the definition commands.
I prefer to have the category in the right margin, as I think it
makes the output for readable and less cluttered. For example:
http://www.gnu.org/software/kawa/Processes.html
Before, makeinfo --docbook some generate something like:
<informalfigure><synopsis role="Procedure"><indexterm
role="cp"><primary>make-process</primary></indexterm><function>make-process</function><replaceable>
command</replaceable><replaceable> envp</replaceable></synopsis>
(This seems to match the old texi2html/formats/docbook.pm.)
Notice the above is easily changed to move the category (here
"Procedure") wherever you want it using docbook of css stylesheets.
However, there is a downside: The default DocBook XST stylesheets
will ignore the category, since it's just an attribute.
From this, my DocBook-to-HTML XSLT stylesheet generates:
<p class="synopsis"><span class="kind">Procedure</span><span
class="ignore">: </span><a class="indexterm" name="id437045"></a><code
class="function">make-process</code><em class="replaceable"><code>
command</code></em><em class="replaceable"><code> envp</code></em></p>
With no CSS stylesheet, this displays the "classic" view with
"Procedure:" at the
beginning of the line, but it is easy for a CSS stylesheet to show it at the
end of the line:
p.synopsis span.kind { float: right; padding-left: 2em }
p.synopsis span.kind:before { content: "[" }
p.synopsis span.kind:after { content: "]" }
p.synopsis > code { font-weight: bold; }
Today's CVS generates:
<synopsis><indexterm
role="fn"><primary>make-process</primary></indexterm><emphasis
role="bold">Procedure</emphasis>: <function>make-process</function>
<replaceable>command</replaceable>
<replaceable>envp</replaceable></synopsis>
This is a lot harder to deal with. There is no semantic information encoded
in the structure, just in the text. Nothing to indicate that the word
"Procedure" has special meaning. I.e. the translation has lost information.
Furthermore, getting rid of the colon is likely to be ugly,
So I'd like to suggest the attached fix. It's simple, localized, and I've
verified that adjusting the xslt stylesheet is straightforward.
--
--Per Bothner
address@hidden http://per.bothner.com/
db-synopsis.patch
Description: Text Data
- defxx regression in docbook output cvs texinfo,
Per Bothner <=
- Re: defxx regression in docbook output cvs texinfo, Patrice Dumas, 2012/07/21
- Re: defxx regression in docbook output cvs texinfo, Per Bothner, 2012/07/21
- Re: defxx regression in docbook output cvs texinfo, Patrice Dumas, 2012/07/22
- Re: defxx regression in docbook output cvs texinfo, Per Bothner, 2012/07/22
- Re: defxx regression in docbook output cvs texinfo, Patrice Dumas, 2012/07/23
- Re: defxx regression in docbook output cvs texinfo, Per Bothner, 2012/07/23
- Re: defxx regression in docbook output cvs texinfo, Karl Berry, 2012/07/23
- Re: defxx regression in docbook output cvs texinfo, Patrice Dumas, 2012/07/23