From dfd1ec7d1500eeae1981cd5d0e03e1d97d705fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 10 Nov 2020 21:21:20 +0100 Subject: generate readme from manual --- Makefile | 2 + index.html | 186 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 Makefile create mode 100644 index.html diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f68fd2c --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +index.html: ../master/rf.1 + man -T html -O fragment $< > $@ diff --git a/index.html b/index.html new file mode 100644 index 0000000..6f5e32d --- /dev/null +++ b/index.html @@ -0,0 +1,186 @@ + + + + + + +
rf(1)General Commands Manualrf(1)
+
+
+

+rf — +
alternative reference system for (t)roff
+
+
+

+ + + + + +
rf< file
+
+
+

+rf is a reference system for troff and other roff + derivatives. It differs from refer(1), the traditional troff + reference system, in a couple important ways: +
    +
  1. References are not stored in a separate file. They are defined via macros + in the troff document itself. +

    This means that you can move, copy and share your troff + document without needing to worry about an additional reference file. + Furthermore, you never run the risk of accidentally losing the + references attached to a document.

    +
  2. +
  3. rf is around 150 lines of Perl. If you find a bug + or an (in your opinion) undesirable behavior in + rf, you can easily patch it.
  4. +
  5. Finally, 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.
  6. +
+
+
+

+rf is controlled by several macros, all consisting of + one uppercase and one lowercase letter, beginning with either an + ‘F’ (format macros) or an ‘R’ (inline reference + and reference list macros). These are listed below in alphabetical order. +
+

+
+
Ff
+
Defines the format for “full” inline references, which + usually contain both author and year. +

Default: (%a %y)

+
+
Fl
+
Defines the format for the reference list, which is usually located at the + end of the document. +

Default: %a (%y). {\fI%t\fR}. {\*Q%q\*U}. %n, %d. %c: %p. + {Available: %w.}

+
+
Fx
+
Defines the format for “alternate” inline references, which + usually contain only the year. +

Default: (%y)

+
+
+

For a description of the format syntax, see + FORMAT SYNTAX.

+
+
+

+
+
Rf
+
Inserts a “full” inline reference, which usually contains + both author and year.
+
Rx
+
Inserts an “alternate” inline reference, which usually + contains only the year.
+
+

What reference to refer to is specified by the rest of the line. + 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:

+
+
+.Rf Johnson 92 .
+
+
+

To wrap the inline reference in parentheses, use the following + syntax:

+
+
+.Rf Johnson 92 ) (
+
+
+

Additionally, 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 ...
+
+
+
+
+

+
+
Ra
+
Adds to the list of authors of the current reference. + Additionally, Ra marks the beginning of a new reference. +

Format: Surname(s), Forename(s)

+
+
Rc
+
Defines the city of publication.
+
Rd
+
Defines the (detailed) date of publication, not as a + substitute for Ry, but as a further specification. For + example, the day and month a newspaper article was published.
+
Rn
+
Defines the newspaper in which an article was + published.
+
Rp
+
Defines the publisher of a book.
+
Rq
+
Defines the (quoted) title of an article.
+
Rt
+
Defines the title of a book. Defines the (web) + address of an online resource.
+
Ry
+
Defines the year of publication.
+
+

Of these macros, Ra and Ry are + the most important.

+
+
+
+

+In a format definition, use a percent (%) sigil followed by a single letter to + interpolate any given field of the reference. The letter following the percent + sign corresponds to the second letter of the reference list macros described + above. For example: +
+
+.Ff (%a, %y)      \" (Author, Year)
+
+
+

By wrapping an interpolation in braces, you can specify a prefix + and/or suffix that should be included only if the interpolation is + successful. For example:

+
+
+.Ff (%a{, %y}).   \" Here, ', ' is removed if there is no year.
+
+
+

Note that all fields are inserted literally, except + %a, from which the forenames of the authors are + removed.

+

Finally, you usually don't need to worry about excessive spaces + and stray punctuation marks, as rf removes many of + these these automatically.

+
+
+

+rf was written by John Ankarström + <john + (on) + ankarstrom.se>. +
+
+ + + + + +
November 11, 2020Linux 5.4.72-0-lts
-- cgit v1.2.3