I noticed that someone (could be Werner) did something really clever:

grep '.so refer.tmac' /usr/share/groff/current/tmac/*
/usr/share/groff/current/tmac/refer-me.tmac:.mso refer.tmac
/usr/share/groff/current/tmac/refer-mm.tmac:.mso refer.tmac
/usr/share/groff/current/tmac/refer-ms.tmac:.mso refer.tmac

This clever person then cut the refer related stuff from s.tmac and put it
into a refer.tmac. That is nice, since it reduces the amount of code to
maintain.
It had been even nicer, though, if I could copy this refer.tmac to my
project and modify it. After all, if you are writing a paper you would like
to have one refer.tmac per reference style. Like the ones here

   1. APA
   2. MLA
   3. Chicago Manual of Style

See (for example... there is a page like this at basically all
universities): https://libguides.brown.edu/citations/styles

I would like to change my refer.tmac. I can report that this is possible.
This mail started as a question, and while writing I found the answer. You
need to use the macro refer-ms.tmac (or refer-mm.tmac or refer-me.tmac).

groff  -ms -mrefer-ms -M ./tmac -m your-refer-code

So, now my questions have changed:

How do I make sure that a URL isn't hyphenated?
And how do I enforce a break using an escape sequence rather than .br?

I know, writing reference lists are not what developers love the most.

Yours

Sigfrid

-- 
Sigfrid Lundberg, Ph.D., System developer
Lund, Sweden
https://sigfrid-lundberg.se/ <http://sigfrid-lundberg.se/>

Reply via email to