groff
[Top][All Lists]
Advanced

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

RE: [Groff] refer macros


From: Ted Harding
Subject: RE: [Groff] refer macros
Date: Tue, 11 Jul 2000 19:09:18 +0100 (BST)

Hi Nicola,

On 11-Jul-00 Nicola Bernardini wrote:
> I need to use the refer preprocessor for a paper I'm writing and
> using the mm macros. The mm macros I have (from the groff CVS dist)
> have no support for refer, while the ms do. I'm thinking of rebuilding
> a separate set of refer macros to be used with any package.
> 
> Has something like this already been done? Is there any
> counter-indication
> in doing it? (I would send them to the maintainers afterwards of
> course).
> 
> Nicola

I don't know of it's having been done so if anyone else knows, or has done
it, it would be good to hear.

It shouldn't be too difficult to do it, so long as you take care to avoid
treading on anything already defined in mm, and correctly implement
the calls to ms macros and registers.

Of the latter, I think there are only

In .de ]<
.SH
address@hidden

In .de ]>
address@hidden

In .de ref*normal-print
.FS
.FE

In .de ref*end-print
.IP
.XP

.ds [. address@hidden
.ds .] address@hidden
.ref*field T , "\\*Q" "" "\\*U"

Of these, .SH, .FS, .FE, .IP, .XP, \\*Q and \\*U
are "user" macros/strings defined in ms macros; the remainder
are "internal" to the ms macros (the latter may cause you more
trouble since the former have their mm equivalents).


However, you may also like to have a look at 'bib' (a fairly
old program written 1985-87 by Timothy Budd) and avoid using
'refer' altogether. ('bib' is descended from 'refer' and can, I think,
do anything that troff 'refer' can; I'm not too sure how it compares
with groff 'refer').

I find that 'refer' and its ms implementation are a bit limited,
and difficult to customise. 'bib' gives you a bit more scope;
it is another pre-processor like 'refer'. It can be found at

   ftp ftp.cs.orst.edu  pub/budd/bib.tar.Z

(it's still there!). There is also a brief man-page in the O'Reilly
"4.4BSD User's Reference Manual", and an extended user's manual
in "4.4BSD User's Supplementary Documents" (more extended than
the one which is "bibdoc.ps" which can be constructed -- using
'bib' itself -- from the sources in the tar file).

'bib' uses the same bibliographic database format as 'refer.
Output format is specified in format files containing style macros.
This is more flexible than the 'refer' mechanism, where customising
requires re-writing the (somewhat obscure) macros in the "ref"
module of the ms macros. One advantage of doing it the 'bib' way
is that you can have different format files for, say, different
journals.

However, 'bib' still does a less than comprehensive job.

'bib' is closely related to the TeX-oriented package 'tib' with similar
functionality (and descended, like 'bib' from 'refer'), allowing
a degree of exchange between troff and TeX bibliographies.

You can find 'tib' at CTAN, e.g.

  ftp://sunsite.org.uk/packages/tex/uk-tex/biblio/tib

but it's all in separate files, and I don't know of a place to
find a tar-ball.

I hope this helps!
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 11-Jul-00                                       Time: 19:09:18
------------------------------ XFMail ------------------------------

reply via email to

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