groff
[Top][All Lists]
Advanced

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

Re: [Groff] How *not* to print References with -ms?


From: Anton Shterenlikht
Subject: Re: [Groff] How *not* to print References with -ms?
Date: Thu, 10 Sep 2015 09:01:42 +0100 (BST)

>From address@hidden Wed Sep  9 15:14:26 2015
>
>It looks like that this is hard coded when using ".]<" ...
>
>You may do
>
>    .rm ref*biblio-start-hook
>
>or
>
>    .rm REFERENCES
>
>after the first list.
>
>Maybe a short example with actual and desired nroff output could help to find 
>a better answer.

ok, an example with 3 separate lists of
references:

All 7 source files:

$ cat z.1
.NH 1
Some references
.so j.ref
.so c.ref
.so b.ref
$ cat j.1
.NH 2 
Journals
.R1
bibliography j
.R2
$ cat c.1
.NH 2
Conf
.R1
bibliography c
.R2
$ cat b.1
.NH 2
Books
.R1
bibliography b
.R2
$ cat j
%D 2015
%A G. Mozdzynski \fIet al\fP
%J Int. J. High Perf. Comp. Appl.
%P 1-13
%O DOI: 10.1177/1094342015576773
$ cat c
%D 2014
%A C. Yang \fIet al\fP
%B Proc. 19th ACM SIGPLAN Symposium on Principles
and Practice of Parallel Computing, PPoPP, 15-19 February 2014,
Orlando, Florida, USA
%P 81-92
%O DOI: 10.1145/2555243.2555270
$ cat b
%D 2014
%A I. M. Smith
%A D. V. Griffiths
%A L. Margetts
%T Programming the finite element method
%C 5ed
%I Wiley
$ 

Build like this:

$ refer b.1 > b.ref && refer c.1 > c.ref && refer j.1 > j.ref
$ soelim z.1 > z.full
$ groff -ms -Tascii z.full -P-c|head -n32






1.  Some references

1.1.  Journals

References

1.   G.  Mozdzynski  et  al, Int. J. High Perf. Comp. Appl.,
     pp. 1-13 (2015). DOI: 10.1177/1094342015576773.

1.2.  Conf

References

1.   C. Yang et al in Proc. 19th ACM  SIGPLAN  Symposium  on
     Principles  and  Practice of Parallel Computing, PPoPP,
     15-19 February 2014, Orlando, Florida, USA,  pp.  81-92
     (2014). DOI: 10.1145/2555243.2555270.

1.3.  Books

References

1.   I. M. Smith, D. V. Griffiths, and L. Margetts, Program-
     ming the finite element method, Wiley, 5ed (2014).


$ 

I want *not* to print the word "References".

On my big document both your suggestions work.
However, on this text document, your first
suggestion doesn't seem to work:

$ cat z.1
.NH 1
Some references
.PP
Some text
.\".rm REFERENCES
.rm ref*biblio-start-hook
.so j.ref
.so c.ref
.so b.ref
$ soelim z.1 > z.full
$ groff -ms -Tascii z.full -P-c|head -n32






1.  Some references

     Some text

1.1.  Journals

References

1.   G.  Mozdzynski  et  al, Int. J. High Perf. Comp. Appl.,
     pp. 1-13 (2015). DOI: 10.1177/1094342015576773.

1.2.  Conf

References

1.   C. Yang et al in Proc. 19th ACM  SIGPLAN  Symposium  on
     Principles  and  Practice of Parallel Computing, PPoPP,
     15-19 February 2014, Orlando, Florida, USA,  pp.  81-92
     (2014). DOI: 10.1145/2555243.2555270.

1.3.  Books

References

1.   I. M. Smith, D. V. Griffiths, and L. Margetts, Program-
     ming the finite element method, Wiley, 5ed (2014).
$ 


The second suggestion does work,
although I get a warning and too much
white space:


$ cat z.1
.NH 1
Some references
.PP
Some text
.rm REFERENCES
.\".rm ref*biblio-start-hook
.so j.ref
.so c.ref
.so b.ref
$ soelim z.1 > z.full
$ groff -ms -Tascii z.full -P-c|head -n32
j.1:3: warning: macro `REFERENCES' not defined






1.  Some references

     Some text

1.1.  Journals



1.   G.  Mozdzynski  et  al, Int. J. High Perf. Comp. Appl.,
     pp. 1-13 (2015). DOI: 10.1177/1094342015576773.

1.2.  Conf



1.   C. Yang et al in Proc. 19th ACM  SIGPLAN  Symposium  on
     Principles  and  Practice of Parallel Computing, PPoPP,
     15-19 February 2014, Orlando, Florida, USA,  pp.  81-92
     (2014). DOI: 10.1145/2555243.2555270.

1.3.  Books



1.   I. M. Smith, D. V. Griffiths, and L. Margetts, Program-
     ming the finite element method, Wiley, 5ed (2014).
$


As I said above, .rm ref*biblio-start-hook seems to work
well in a big document. The relevant fragment is:

.NH 2
Publications
.PP
This was some idiosyncrasy of transliteration rules.
.rm ref*biblio-start-hook
.\".rm REFERENCES
.so j.ref
.so r.ref
.so c.ref
.so p.ref
.NH 2

So I don't understand why I get different behaviour
between the big and a test documents.

Anyway, many thanks for your help.

Anton




reply via email to

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