groff
[Top][All Lists]
Advanced

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

[Groff] newbie help with header and -ms


From: Daniel Lyons
Subject: [Groff] newbie help with header and -ms
Date: Sat, 15 Dec 2012 01:17:46 -0700

So, I have a big pile of emails in a particular format and I want to import 
each one into a document and do a page break. I have a macro to do this which 
looks like:

.de email
.so \\$1
.bp
..

Ideally, I would then have evenside headers like:

  <page number>  Title  [blank]

and oddside headers like:

  [blank]  filename  <page number>

I'm having trouble seeing how to get from here to there. I'm using -ms. My 
first thought was something like this:

.EH `%`\fITitle\fR``
.OH ``Document`%`

But I don't see how to get the document name into the .OH. If I use e.g.:

.de email
.ds DC \\$1
.so \\$1
.bp
..

I don't seem to be able to cause that string to get evaluated by doing either 
of these:

.OH ``\*(DC`%`
.OH ``\\*(DC`%`

It also occurred to me I might try \n(.F, but this seems to produce either the 
file where the macro is defined or the file which calls .email but not the 
filename, depending on whether I use this:

.de PT
.tl `Hi`\n(.F`Hi`
..

Or this:

.de PT
.tl `Hi`\\n(.F`Hi`
..

So I'm kind of lost as to what to do here to get the behavior I want.

Thanks for your help!

— 
Daniel Lyons






reply via email to

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