groff
[Top][All Lists]
Advanced

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

Re: [Groff] add extra footer with running page numbers


From: Werner LEMBERG
Subject: Re: [Groff] add extra footer with running page numbers
Date: Tue, 09 Sep 2008 16:44:54 +0200 (CEST)

> > It is a mix. Using -mdoc I get warnings like:
> > 
> > Not a \-mdoc command: .LP (#2959)
> > Not a \-mdoc command: .SH (#2972)
> > mdoc warning: Empty input line #2973
> 
> 
> Been having a look at this, and my impression is that switching back
> and forth between two macro packages that haven't been explicitly
> designed to cooperate isn't something to be recommended in general.
> 
> Nevertheless, apart from some strange behavior of the macros
> themselves [it seems to me that the BSD macros do not start a new
> page for a new entry -- is this really intended?]

I'm not sure.  However, since it is plain ugly, I'll change that to
start a new page.

> and a bug in an-old.tmac [where it says ".nr FT -.5i" it should
> really be ".nr FT 0-.5i"]

Fixed.

> I've (mostly) gotten it to work (I think) with the following package
> switcher, to be used instead of andoc.tmac.

Thanks!  Will inspect it soon more closely.

> What still doesn't always work are the page footers -- when
> switching from man to doc or vice versa, the last footer will
> already be in the style of the new package.  Fixing this isn't
> impossible, but it will probably require modifying the
> initialization procedures in doc.tmac and an-old.tmac (I haven't yet
> attempted to do this).

OK.  I think this is a harmless degradation.

> By the way, the "input stack limit exceeded" problem was a result of
> page footer traps from both macro packages being active at the same
> time.

Yes, I've suspected the same.

> .\" andoc.tmac -- load either an-old.tmac or doc.tmac.
> .if !\n(.g .ab These macros require groff.
> .de reload-doc
> .ch an-header   \" remove trap set by an-old.tmac
> .ch an-footer   \" remove trap set by an-old.tmac
> .ch an-p-footer \" remove trap set by an-old.tmac
> .rm Dd
> .do mso doc.tmac
> .ds str-dfp NAME\" this triggers setup-header
> .Dd \\$*
> .do als TH reload-man
> ..
> .de reload-man
> .ch header \" remove trap set by doc.tmac
> .ch footer \" remove trap set by doc.tmac
> .rm RI     \" disable load-only-once, see an-old.tmac
> .rn e@ em  \" doc.tmac disables end-macro defining
> .rm TH
> .do so an-old.tmac
> .TH \\$*
> .do als Dd reload-doc
> ..
> .als TH reload-man
> .als Dd reload-doc
> .\" dummy equation macros -- eqnrc is read before .TH or .Dd is parsed.
> .de EQ
> ..
> .de EN
> ..




reply via email to

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