[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Third-party viewers, KDE, and the "portable set"

From: Eric S. Raymond
Subject: [Groff] Third-party viewers, KDE, and the "portable set"
Date: Mon, 1 Jan 2007 17:49:58 -0500
User-agent: Mutt/

Gunnar Ritter <address@hidden>:
> Regardless of all opinions on data formats, standards,
> commerce, and the world in general, the question which
> Bernd must answer is the rather simple one if he likes
> to appear groffer(1) like
>         NAME
>          groffer - display groff files and man pages on X and tty 
>         SYNOPSIS
>          @1]  [option...] [filespecEllipsis]] 
>          @1]  
>          @1]  
>          @1]  
> e.g. with the KDE help system.

OK.  If the KDE system has its own non-groff man-page viewer (which I 
gather it must, otherwise Gunnar's comment would make no sense) then
the whole issue of what we have to do to support third-party viewers
just went critical.

XMan, TkMan, Rosetta, and their ilk are respectable projects which we
should support, but KDE is *huge*.  In terms of userbase size it
undoubtedly dwarfs all of these and doclifter and groff itself put

Accordingly, if we (and by "we" I mean groff contributors and
maintainers, of which I am one) don't do what we need to support clean
viewing of man pages in KDE, I submit that we're not doing our job,

This should incidentally solve doclifter's problems as well -- because
I'm working in Python where string-bashing and regexps are easy, I'd
bet the price of several good steak dinners that I'm more aggressive
in coping with weird features and broken markup than any viewer
written in C++ a la KDE.

I guess I'll have to accelerate my work on defining a portable subset 
of requests/escapes.  Here's what I have so far:

Safe requests:
    .ab .am .as .bp .c2 .cc .cu .de .do 
    .ds .em .fi .ft .if .ig .nf .nr .pm
    .rm .rn .rr .so .sp .tm .ul 

While .if is in the safe set, the expression set allowable in conditionals
has to be seriously restricted to be portable across rendering programs
including doclifter and Unix *roff.  *MORE GOES HERE*.

All predefined troff glyphs are safe (they can be mapped to Unicode)
except the old-style Bell Labs bracket-pile characters.

Safe escapes:  
    \' \` \- \$ \* \& \| \0 \<SP> \<CR> 
    \c \d \e \f \u \n 

These are all the escapes actually needed to translate the entire
13,446-page Fedora Core 6 corpus into DocBook.


Differences from the first version are that I've had to move .br, .ti,
and .in out of the portable subset, but .de has gone into it.  Also
I have been able to verify that almost all predefined groff glyphs 
are safe.

Gunnar, you could help by reporting which requests Heirloom Troff
and the KDE man-page viewer support.  Is anybody else willing to 
take on analyzing XMan, TKman, or Rosetta?
                <a href="";>Eric S. Raymond</a>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]