From 0535b7262f9fbd79efd2dd471971c1d94fcc3bf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20Ankarstr=C3=B6m?=
rf
is around 150 lines of Perl. If you find a bug
- or an (in your opinion) undesirable behavior in
+ rf
consists of circa 200 lines of Perl. If you
+ find a bug or an (in your opinion) undesirable behavior in
rf
, you can easily patch it.rf
is much more simple and offers much
- more basic functionality than refer(1). This means that
- you can learn all of it in five minutes.rf
is much simpler, much less opaque and
+ offers much more basic functionality than refer(1). You
+ can learn all of it in five minutes.The performance of rf
primarily depends on
- the number of entries in the reference list at the end of the document. On
- my HP Compaq dc5700 from 2007, the relationship between number of entries in
- the reference list and total execution time is roughly the following:
Entries | @@ -51,56 +51,69 @@|||
3 | -0.03s | +0.01s | |
50 | -0.09s | +0.07s | |
107 | -0.15s | +100 | +0.14s |
182 | -0.24s | +200 | +0.26s | +
500 | +0.65s | +||
2,000 | +2.59s | +||
10,000 | +12.94s |
I would deem it rare to have more than a couple of hundred unique - references in a troff document.
+Luckily, I would deem it extremely rare to have more than a couple + of hundred unique references in a troff document.
rf
is controlled by several macros, all consisting of
- one uppercase and one lowercase letter, beginning with either an
- ‘F’ or an ‘R’. Macros beginning with
- ‘R’ control the two primary “units” of
- rf
:
-Macros beginning with ‘F’, in turn, control the - appearance of these two units.
+rf
provides two features, which it calls
+ references and citations:
+rf
is controlled by several macros, all
+ consisting of one uppercase and one lowercase letter, beginning with either
+ an ‘R’ – macros controlling references and citations
+ – or an ‘F’ – macros controlling the appearance
+ of references and citations.
Default: %a (%y). {\fI%t\fR}. {\*Q%q\*U}. %n, %d. %c: %p. {Available: %w.}
Default: (%A %y)
Default: (%y)
Format: Surname(s), Forename(s)
+Format: Surname, Forename/Initial
In the final output, rf
prints a formatted
- version of each reference entry in place of its definition.
- rf
does not change the order of reference entries.
- This means that you can arrange your references freely.
rf
does not change the order of reference. This
+ means that you can arrange your references freely.
What reference to refer to is specified by the rest of the line. - Each word of it is matched against the author, year and title of all - references to find a match. If only a weak match is found, a warning is - printed on standard error.
-To include some punctuation character immediately after the inline - reference, add a space before it:
+Reference identification. After the + macro name, you should provide one or more keywords to identify the + reference to which the citation is to refer. Each word is matched + case-insensitively against the author, year and title of all references. For + example:
++.Rf Trubetzkoy 1969 ++
If only a weak match is found, a helpful warning is printed on + standard error.
+Adjacent punctuation. To include some + punctuation character immediately after the inline reference, use the + following syntax:
-.Rf Johnson 92 . +.Rf Grot 1873 .
To wrap the inline reference in parentheses, use the following syntax:
-.Rf Johnson 92 ) ( +.Rf Courtenay 1972 ) (
Additionally, any instance of ''
is
- replaced with the last word on the preceding line. This allows the following
- shortcut:
Shortcuts. Any instance of
+ ''
is replaced with the last word on the preceding
+ line. This allows the following shortcut:
-According to Johnson -.Rx '' 92 , -there has been a gradual change in attitudes towards ... +According to Brandt +.Rx '' 1892 , +Russian differs from other European languages in its [...]
.Ff (%A, %y) \" (Author, Year) @@ -220,13 +242,13 @@ In a format definition, use a percent (%) sigil followed by a single letter to
- A backslash at the end of a format line acts as a line continuation marker. The newline after the backslash is preserved.
-- For format macros describing inline references, a backslash immediately - following the macro name will cause the reference be joined to the - preceding line.
+- For format macros describing citations, a backslash immediately following + the macro name will cause the reference be joined to the preceding + line.
Anywhere else in the line, backslashes are preserved literally.
-By using backslashes, you can implement footnote-based references. +
By using backslashes, you can implement footnote-based citations. For example, using the ms macro package:
@@ -328,7 +350,7 @@ Smith, P. (2007). \fIModern Society\fR. Athens: Logos.
November 11, 2020 | +November 12, 2020 | Linux 5.4.72-0-lts |