On Thu, Mar 15, 2007 at 09:36:22AM -0700, Frank Jahnke wrote:
> If that is so, do the readers of this list have some "standard" ones
> already worked out? It would be useful to pool these, so that we
> don't all have to reinvent the wheel.
First, a disclaimer.
I use -me most of the time, but couple of years ago, as I was writing
modifications for refer to get the refer macros right for -me I
implemented this for -ms. I don't know how general these are but they
worked for my needs at the time. Also notice that for the full
conformance with ACM style the names should be reversed and the first
name should be shortened to the initial only (e.g., Petkovic, Z.).
I'm sending this not as some serious contribution (more testing and
checking is probably necessary). I'm sending it because it may help the
original poster get around his problems with refer after small
modifications.
Best regards,
Zvezdan
.\" ACM-ms.tmac - refer support for -ms
.\"
.\" Conforms to the _Communications of the ACM_ reference style.
.\" The only exception is that author names are not reversed and shortened.
.\"
.\" Zvezdan Petkovic
.\"
.\" ****************************
.\" ******** module ref ********
.\" ****************************
.\" Refer support.
.de ]-
.rm [A [B [C [D [E [G [I [J [N [O [P [Q [R [S [T [V [W
.rm ref*string
..
.\" Other
.ds ref*spec!0 Q A T2 N S V I C D P O
.\" Journal article
.ds ref*spec!1 Q A T2 J V2 N2 D I C P O
.\" Book
.ds ref*spec!2 Q A T N S V I C D P O
.\" Article within book
.ds ref*spec!3 Q A T2 B W E N S V I C D P O
.\" Tech report
.ds ref*spec!4 Q A T2 R G I C D P O
.\" ][ type
.de ][
.if r [T .als [T2 [T
.if d [V .als [V2 [V
.if d [N .als [N2 [N
.ie d ref*spec!\\$1 .ref*build \\*[ref*spec!\\$1]
.el \{\
. @error unknown reference type `\\$1'
. ref*build \\*[ref*spec!0]
.\}
.ref*print
.rm ref*string
.rm [F [T2 [V2 [N2
..
.\" start of reference number
.\"ds [. [EMAIL PROTECTED]
.\" end of reference number
.\"ds .] [EMAIL PROTECTED]
.\" period before reference
.\"ds <. .
.\" period after reference
.\"ds >. \" empty
.\" comma before reference
.\"ds <, ,
.\" comma after reference
.\"ds >, \" empty
.\" start collected references
.ig
.de ]<
.als ref*print ref*end-print
.SH
\&\\*[REFERENCES]
[EMAIL PROTECTED]
..
.\" end collected references
.ig
.de ]>
[EMAIL PROTECTED]
.als ref*print ref*normal-print
..
.ig
.de ref*normal-print
.ie d [F .FS "\\*([.\\*([F\\*(.]"
.el .FS \&
\\*[ref*string]
.FE
..
.ig
.de ref*end-print
.ie d [F .IP "\\*([F."
.el .XP
\\*[ref*string]
..
.ig
.als ref*print ref*normal-print
.de ref*build
.rm ref*string ref*post-punct
.nr ref*suppress-period 1
.while \\n[.$] \{\
. if d [\\$1 \{\
. ie d ref*add-\\$1 .ref*add-\\$1
. el .ref*add-dflt \\$1
. \}
. shift
.\}
.\" now add a final period
.ie d ref*string \{\
. if !\\n[ref*suppress-period] .as ref*string .
. if d ref*post-punct \{\
. as ref*string "\\*[ref*post-punct]
. rm ref*post-punct
. \}
.\}
.el .ds ref*string
..
.de ref*add-T
.ref*field T . "\fI" "\fP"
.if r [T .nr ref*suppress-period \\n([T
..
.de ref*add-T2
.ref*field T .
.if r [T .nr ref*suppress-period \\n([T
..
.de ref*add-V
.ie d [S .ref*field V , "vol. "
.el .ref*field V . "Vol. "
..
.de ref*add-V2
.ie d [N .ref*field V "" "\fI" "\fP"
.el .ref*field V "" "\fIVolume " "\fP"
..
.de ref*add-N
.ie d [V .rm [N
.el .ref*field N . "Number "
..
.de ref*add-N2
.ie d [V .ref*field N ,
.el .ref*field N ""
..
.de ref*add-S
.\" [V has a precedence over [N, [N over nothing, hence this order
.ie d [V .ref*field S .
.el .if d [N .ref*field S "" "in "
.el .ref*field S .
..
.de ref*add-J
.ref*field J . "\fI" "\fP"
..
.de ref*add-W
.ref*field W "" ( ", \\*([D)"
..
.de ref*add-D
.ie d [J .ref*field D "" ( )
.el .ie d [W .rm [D
.el .ie d [C .ref*field D ,
.el .ie d [I .ref*field D ,
.el .ie d [G .ref*field D ,
.el .ie d [R .ref*field D ,
.el .ref*field D .
..
.de ref*add-E
.ie [W .ref*field E . "" ", Ed"
.el .ref*field E , "" ", Ed"
..
.de ref*add-G
.ref*field G "" ( )
..
.de ref*add-B
.ref*field B . "In \fI" "\fP"
..
.de ref*add-O
.ref*field O .
.ie r [O .nr ref*suppress-period \\n([O
.el .nr ref*suppress-period 1
..
.de ref*add-A
.ref*field A .
.if r [A .nr ref*suppress-period \\n([A
..
.de ref*add-C
.ref*field C ,
..
.de ref*add-I
.ie d [G ref*field I ,
.el .ie d [R .ref*field I ,
.el .ref*field I .
..
.de ref*add-P
.ie d [D .ref*field P ,
.el .ie d [C .ref*field P ,
.el .ie d [I .ref*field P ,
.el .ie d [G .ref*field P ,
.el .ie d [R .ref*field P ,
.el .ref*field P .
..
.de ref*add-dflt
.ref*field \\$1 .
..
.\" First argument is the field letter.
.\" Second argument is the punctuation character to use to separate this field
.\" from the previous field.
.\" Third argument is a string with which to prefix this field.
.\" Fourth argument is a string with which to postfix this field.
.\" Fifth argument is a string to add after the punctuation character supplied
.\" by the next field.
.de ref*field
.if d ref*string \{\
. ie !\\n[ref*suppress-period] .as ref*string \\$2
. el .if !"\\$2"." .as ref*string \\$2
. ie d ref*post-punct \{\
. as ref*string "\\*[ref*post-punct] \"
. rm ref*post-punct
. \}
. el .as ref*string " \"
.\}
.as ref*string "\\$3\\*([\\$1\\$4
.if \\n[.$]>4 .ds ref*post-punct "\\$5
.nr ref*suppress-period 0
..