groff
[Top][All Lists]
Advanced

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

Re: [Groff] [Groff & Heirloom] tbl problem with backslashes


From: Brian Kernighan
Subject: Re: [Groff] [Groff & Heirloom] tbl problem with backslashes
Date: Mon, 1 Sep 2014 09:57:56 -0400 (EDT)
User-agent: Alpine 2.02 (LRH 1266 2009-07-14)

Sounds about right to me, though my troff/groff expertise has atrophied
quite a bit over the last 20 years.

Brian

On Mon, 1 Sep 2014, Mike Bianchi wrote:

On Sun, Aug 31, 2014 at 11:25:28PM -0500, Blake McBride wrote:
I found that Groff and Heirloom handle backslashes in tables differently.
 I actually think both are wrong, but I am not sure.  My input is as
follows:

.TS
a a .
INPUT PRODUCES
\\\\ \\
abc def
.TE



I am processing it with tbl & troff but no macro packages.  They produce
different results - both unexpected by me.  What I am trying to produce is
as follows:

INPUT    PRODUCES
\\       \
abc      def


(Yes, I am using tabs between the columns on the real input file.)


You've run into what (I think) was first stated as "Kernighan's Lemma"
which went something like:

        In troff, the number of  /  characters necessary to output a single
         /  character grows exponentially with macro depth.


This is why the  \e  escape was created:

        ... \e represents the current escape character.
        To get a backslash glyph, use \(rs or \[rs].
                                                        groff(7)


Brian:  I hope I represented this accurately.  ;)

--
Mike Bianchi
Foveal Systems

973 822-2085

address@hidden
http://www.AutoAuditorium.com
http://www.FovealMounts.com




reply via email to

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