Re: manpage generation questions

Steve Cheng <[email protected]> Mon, 14 Mar 2005 19:54:27 -0500
Newsgroups gmane.text.docbook.docbook2x.general
Message-ID <[email protected]>
On Fri, Mar 11, 2005 at 10:58:52PM +0100, Hendrik Sattler wrote:
> Hi,
> 
> there are some strange things with docbook2x-0.8.3 (Debian Sarge):
> - When I choose an encoding with --encode, it is only honored for UTF-8, 
> ISO-8859-15 still gets "\(:a" instead of "ä". The problem with "\(:a" is that 
> the man program in Debian does only show an 'a', not an 'ä'.

The problem is that the mappings "ä" --> "\(:a"
etc. are executed before the encoding conversion.
I had thought this did no harm, but apparently not :(

You can override this behavior as follows.
Copy roff.charmap in the docbook2X charmaps/ directory
to some other file, say, roff.iso-8859-15.charmap.
Go edit that file and dike out all the undesired mappings.
Then run docbook2man (or db2x_manxml)
with the 

--utf8trans-charmap=/path/roff.iso-8859-15.charmap
--encoding=iso-8859-15

options.
This should do it.

(How I wish people would just switch to UTF-8, then there won't be
these annoying problems...)

> 
> - the .TH macro has some more parameters (the 4th is displayed at the bottom 
> left of a manpage) that cannot be used, or maybe I missed how.
> 

Actually, you can use write
<refentry>
...
<refmeta>
<refmiscinfo>4th parameter text</refmiscinfo>
</refmeta>
</refentry>

or the header-4 string XSLT parameter to specify it.
(I think I only documented this in docbook2X 0.8.5,
but you can read all about the details in xslt/man/refentry.xsl.)

> 
> Aditionally: how can I use that l10n stuff from
>   /usr/share/docbook2x/common/text ?

It's just for translating things like "NAME",
"SYNOPSIS" etc.  The translation is automatically done if you set 
<refentry lang="ja"> or whatever.

> It would probably be useful for translating the section titles. Is there a 
> nice way for translating docbook files other than copy&edit?

Sorry, I don't know.  Perhaps try asking people from other 
(translation) projects on how they do things.

> Thanks
> 
> HS
> 
> PS: Please CC me, I am not subscribed to this list.

Hope this helps.

-- 
Steve Cheng 
&#x912D;&#x541B;&#x535A;

docbook2X: <URL:http://docbook2x.sourceforge.net/>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click