aboutsummaryrefslogtreecommitdiff
path: root/rf
diff options
context:
space:
mode:
Diffstat (limited to 'rf')
-rwxr-xr-xrf12
1 files changed, 6 insertions, 6 deletions
diff --git a/rf b/rf
index 8052634..76d013f 100755
--- a/rf
+++ b/rf
@@ -6,7 +6,7 @@ use warnings;
# Default configuration
my %fmt;
-$fmt{e} = '%a (%y). {\fI%t\fR}. {\*Q%q\*U}. %n, %d. %c: %p. {Available: %w.}';
+$fmt{r} = '%a (%y). {\fI%t\fR}. {\*Q%q\*U}. %n, %d. %c: %p. {Available: %w.}';
$fmt{f} = "\n(%A %y)";
$fmt{x} = "\n(%y)";
@@ -21,7 +21,7 @@ while (<>) {
chomp;
# Format specification
- if (/^\.F([efx])(\\?) +(.*)/) {
+ if (/^\.F([rfx])(\\?) +(.*)/) {
my ($type, $join, $rest) = ($1, $2, $3);
$rest = "\n$rest" if not $join;
while (not eof()) {
@@ -37,7 +37,7 @@ while (<>) {
push @lines, $_;
}
-# Second pass (process reference definitions and inline references)
+# Second (backwards) pass (process reference definitions and inline citations)
my $inlref = 0;
my @r = ();
@@ -47,7 +47,7 @@ for (my $i = $#lines; $i >= 0; $i--) {
$_ = $lines[$i];
chomp;
- # Entry definition
+ # Reference definition
if (/^\.R([acdnpqtwy]) +(.*)/) {
my ($fld, $rest) = ($1, $2);
@@ -62,10 +62,10 @@ for (my $i = $#lines; $i >= 0; $i--) {
next;
} elsif ($refblock) {
# print formatted reference definition
- push @r, fmt($fmt{e}, $refi) . "\n";
+ push @r, fmt($fmt{r}, $refi) . "\n";
}
- # Inline reference
+ # Inline citation
if (/^\.R([fx]) +(.*)/) {
my ($fld, $rest) = ($1, $2, $3);