groff
[Top][All Lists]
Advanced

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

[Groff] Mom TYPEWRITE problem


From: Peter Schaffter
Subject: [Groff] Mom TYPEWRITE problem
Date: Tue, 20 May 2003 03:19:51 -0400
User-agent: Mutt/1.0.1i

Hi, all.

As nearly as I can tell, the problem with the wonky typewrite.ps
example is not caused by a bug in om.tmac _per se_, but by
something odd that's happened between groff 1.18 and 1.19.1.

I did the latest work on mom using 1.18.  Everything tested fine,
including the example files.  When the bug report against
typewrite.ps came in, I downloaded 1.19.1 from the CVS and, before
building, checked the file typewrite.mom from which typewrite.ps
gets produced during the build.  Using 1.18, it came out just fine.

I built 1.19.1 and installed it, then tested the same file--and got
the wonky typewrite output.

I had to study the output long and hard to figure out exactly where
the problem (actually, there are several) was creeping in, and
discovered the following which I'll use as an example:

Original snippet from macro DO_FOOTER that no longer works
----------------------------------------------------------

.    FAMILY  \\*[$HDRFTR_FAM]
.    FT      R
.    PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE]
.    if \\n[#PRINT_STYLE]=1 \{\    \"i.e. if printstyle is TYPEWRITE
.       fam C
.       ft  R
.       ps  12
.    \}

In this example, FAMILY, FT and PT_SIZE are ignored if the
printstyle is TYPEWRITE, and in any case, the "if" clause following
them, in 1.18, reset the family, font and point size (which were
set in the lines above).  Worked like a charm.

Snippet from revised DO_FOOTER that works
-----------------------------------------

.    if \\n[#PRINT_STYLE]=1 \{\
.       fam C
.       ft  R
.       ps  12
.    \}
.    if \\n[#PRINT_STYLE]=2 \{\
.       FAMILY  \\*[$HDRFTR_FAM]
.       FT      R
.       PT_SIZE \\n[#DOC_PT_SIZE]u\\*[$HDRFTR_SIZE_CHANGE]
.    \}

As you can see, I now have to create an explicit "if" clause for
each of the printstyles, but I can't for the life of me figure out
why, especially when my former code worked from 1.17-2 onward.

And now I've just discovered there's a problem with footnotes in
TYPEWRITE, apparently not related to the above anomoly, which
wasn't there when mom 1.1.6 was tested with groff 1.18.

-- 
Peter Schaffter

Author of _The Schumann Proof_, appearing fall, 2004
(pub. RendezVous Press, Canada)

reply via email to

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