diff options
author | John Ankarstrom <john@ankarstrom.se> | 2021-07-04 12:24:35 +0200 |
---|---|---|
committer | John Ankarstrom <john@ankarstrom.se> | 2021-07-04 20:57:50 +0200 |
commit | 80529f0b47ab620f7f219511d9211e105faf1f2b (patch) | |
tree | 01106cc21be73c4871fa39df41f374dc678ee9d1 | |
parent | 1a107db25c36898cf72c3e3431faab0d31425599 (diff) | |
download | mk-refer.tar.gz |
Add krefer.tmac (work in progress)refer
-rw-r--r-- | mk/krefer.tmac | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/mk/krefer.tmac b/mk/krefer.tmac new file mode 100644 index 0000000..78de825 --- /dev/null +++ b/mk/krefer.tmac @@ -0,0 +1,82 @@ +.\" "/. +.\" refer support for mk "/. +.\" (harvard) "/. +.\" "/. +.\" Permission to use, copy, modify and/or "/. +.\" distribute this software for any purpose "/. +.\" with or without fee is hereby granted. "/. +.\" "/. +.\" Use the following command line: "/. +.\" refer -P -S -e -p <bib> "/. +.\" "/. +.\" If you want to use a manual inline "/. +.\" citation format, provide the -k flag and "/. +.\" put the correct reference format in the "/. +.\" %L field of each reference, e.g.: "/. +.\" %L Davidson et al 1990 "/. +.\" "/. +. +.eo +. +. \" translation of "and" in author list +. ds [& and +. +. \" oxford comma in author list (disabled by default) +. ds [, +. +.\" ]< -- begin reference list +.de ]< +.. +. +.\" ]> -- end reference list +.de ]> +.. +. +.\" ][ -- put full reference +.de ][ +. [\$1 +.. +. +.\" [0 -- other +.de [0 +. x +. [a +\*([A +.. +. +.\" [1 -- book +. +.\" [2 -- article +. +.\" [3 -- journal article +. +.\" [4 -- tech report +. +.\" [5 -- ??? +. +.\" [a -- replace "(,) and" in list of authors +.de [a +. if '\*([,',' .if '\*([&'and' .return +. +. \" replace ", and " +. index _ [A ", and +. if \n_>-1 \{\ +. ds _a \*([A +. ds _b \*([A +. substring _a 0 \n_-3 +. substring _b \n_+4 +. ds [A "\*(_a\*([, \*([& \*(_b +. return +.\} +. +. \" replace " and " +. index _ [A " and +. if \n_=-1 .return +. ds _a \*([A +. ds _b \*([A +. substring _a 0 \n_ +. substring _b \n_+2 +. ds [A "\*(_a \*([& \*(_b +.. +. +.ec |