Thread: [Refdb-devel] Latin-1 character 160 (nbsp) in manpages
Status: Beta
Brought to you by:
mhoenicka
From: David N. <dav...@sw...> - 2006-08-18 09:49:59
|
Hi Markus, The following manpages cause groff errors when they are being processed for display: refdbib, bib2ris, db2ris, en2ris, marc2ris, med2ris, refdbxml, refdba, refdbc and refdbd. The error for refdbc is representative: ---------------------------------------------------------------------------- /usr/share/man/man1/refdbc.1:143: warning: can't find numbered character 160 /usr/share/man/man1/refdbc.1:143: warning: can't find numbered character 160 ---------------------------------------------------------------------------- There are two Latin-1 characters 160 (non-breaking space) in line 143 of refdbc.1. Line 143 is: 'Table 1. refdbcrc'. The non-breaking spaces can be made visible by changing them to hashes: ------------------------------------------------------------------------- << first line proves there are no hash ('#') characters in manpage source >> $ cat refdbc.1 | grep '#' << now transform non-breaking space to hash david@hezmana:temp$ cat refdbc.1 | tr '\240' '#' | grep '#' Table#1.#refdbcrc $ ------------------------------------------------------------------------- The hashes show the location of the two non-breaking spaces. In every case where this error occurs it is due to a table caption line similar to the one for refdbc.1. These characters are not present in the xml source and are obviously introduced during the transformation of xml to groff. On my xterm the relevant region of transformed groff input is displayed as: ------------------------------------------------------------------------- ... refdbc evaluates the refdbcrc configuration file at startup to initialize it- self. Table1.refdbcrc | Variable | Default | Comment | ... ------------------------------------------------------------------------- You can see groff strips out the offending characters. Incidentally, the layout would look better if the table caption had its own line. I know I'm being picky here but an error is an error... Regards, David. |
From: Markus H. <mar...@mh...> - 2006-08-18 20:20:57
|
Hi David, David Nebauer writes: > ---------------------------------------------------------------------------- > /usr/share/man/man1/refdbc.1:143: warning: can't find numbered character 160 > /usr/share/man/man1/refdbc.1:143: warning: can't find numbered character 160 > ---------------------------------------------------------------------------- I can't reproduce this problem over here. I've tried this on FreeBSD, Cygwin, and Debian (testing) without getting warnings like this. I wonder whether this is a localization issue. In any case, the DocBook stylesheets indeed put the non-breaking space where you see it, and they do so on purpose. Just have a look at the manpages/charmap.groff.xsl file which contains the mapping of the groff construct "\ " to the character #160. For the time being I've changed the driver file which RefDB uses to process the man pages. > You can see groff strips out the offending characters. Incidentally, the > layout would look better if the table caption had its own line. > While I was at it, I also put the caption on a separate line. The only downside is that the tables are not numbered. I don't think this is going to cause problems as the tables are always rendered where they belong. > I know I'm being picky here but an error is an error... > Actually it is a good sign if we have the time to ponder problems like these. This means that the rest of the program is more or less working ok. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Michael(tm) S. <sm...@xm...> - 2006-08-21 03:01:47
|
Markus Hoenicka <mar...@mh...>, 2006-08-18 22:20 +0200: > For the time being I've changed the driver file which RefDB uses to > process the man pages. That driver file should no longer be needed except for backward compatibility with older versions of the DocBook XSL stylesheets. The current version, 1.70.1, fully supports real table output using tbl(1) markup. See the attached example (refdbib.1). I've also attached a patch to the driver file. The patch causes the driver to check the value of the DocBook XSL stylesheets $VERSION param. If the middle part is 70 or greater, it uses the table-processing code in the stylesheets as-is; otherwise, it falls back to outputting the table rows in paragraphs. --Mike |
From: Markus H. <mar...@mh...> - 2006-08-21 22:18:52
|
Hi Mike, Michael(tm) Smith writes: > I've also attached a patch to the driver file. The patch causes > the driver to check the value of the DocBook XSL stylesheets > $VERSION param. If the middle part is 70 or greater, it uses the > table-processing code in the stylesheets as-is; otherwise, it > falls back to outputting the table rows in paragraphs. > The new manpage output is a real jawdropper. Thanks for providing the patch. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: David N. <dav...@sw...> - 2006-08-21 08:21:20
|
Michael(tm) Smith wrote: > The current version, 1.70.1, fully supports real table output > using tbl(1) markup. See the attached example (refdbib.1). The table output in the example looks stunningly good. Regards, David. |
From: Michael(tm) S. <sm...@xm...> - 2006-08-25 04:28:03
Attachments:
smime.p7s
|
David Nebauer <dav...@sw...>, 2006-08-21 17:51 +0930: > Michael(tm) Smith wrote: > >The current version, 1.70.1, fully supports real table output > >using tbl(1) markup. See the attached example (refdbib.1). >=20 > The table output in the example looks stunningly good. That's tbl(1) magic. The stylesheet just converts the DocBook table markup to tbl markup. The only tricky parts are in the handling of tables that have horizontal and vertical spans, but as far as I can tell from my testing, I think I managed to get the code for converting those to tbl markup done right. --Mike |