From 5ac0bf9632f4475ef82f3bda2528d76e0e84c5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 11 Nov 2020 22:40:22 +0100 Subject: generate (improvements) --- index.html | 177 +++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 103 insertions(+), 74 deletions(-) diff --git a/index.html b/index.html index 4c3db0d..23462fd 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ 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, usually at the end. + at the end of 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 @@ -73,26 +73,34 @@

    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. + ‘F’ or an ‘R’. Macros beginning with + ‘R’ control the two primary “units” of + rf: +
      +
    1. entries in the reference list, and
    2. +
    3. inline references to these entries.
    4. +
    +

    Macros beginning with ‘F’, in turn, control the + appearance of these two units.

    +You can control the appearance of your references as they are displayed in-line + as well as in the final reference list by using the format macros.
    -
    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. +
    Fe
    +
    Defines the format for reference list entries.

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

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

    Default: (%A %y)

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

    Default: (%y)

    @@ -100,8 +108,48 @@ FORMAT SYNTAX.

    +

    +In the reference list, each entry is defined by a contiguous + block of lines containing definition macros, describing various + fields belonging to the reference, such as author and year. + The definition of one reference is separated from that of another by any other + lines, including text lines and empty lines. +
    +
    Ra
    +
    Adds to the list of authors of the current 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.
    +
    Rw
    +
    Defines the (web) address of an online resource.
    +
    Ry
    +
    Defines the year of publication.
    +
    +

    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.

    +
    +

    +To insert an inline reference to an entry in the reference list, you can use one + of two macros:
    Rf
    Inserts a “full” inline reference, which usually contains @@ -111,9 +159,9 @@ 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.

    + 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:

    @@ -139,50 +187,19 @@ 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.
    -
    -

    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.

    -

    +
    +

    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)
    +.Ff (%A, %y)      \" (Author, Year)
     

    By wrapping an interpolation in braces, you can specify a prefix @@ -190,33 +207,44 @@ In a format definition, use a percent (%) sigil followed by a single letter to successful. For example:

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

    You can include a newline in your format by ending the line with a - backslash and continuing on the next line. If you add a backslash - immediately following the macro name, the interpolated format will be joined - to the preceding line. By using backslashes, you can implement - footnote-based references. For example, using the ms macro package:

    +

    To interpolate only the surnames of the authors, + you can use the special %A syntax, with an uppercase + instead of lowercase ‘a’.

    +
    +
    +

    +
      +
    1. A backslash at the end of a format line acts as a line continuation + marker. The newline after the backslash is preserved.
    2. +
    3. For format macros describing inline references, a backslash immediately + following the macro name will cause the reference be joined to the + preceding line.
    4. +
    +

    Anywhere else in the line, backslashes are preserved + literally.

    +

    By using backslashes, you can implement footnote-based references. + For example, using the ms macro package:

     .Fx\ \**\
     .FS\
    -%A, {\fI%t\fR}, {\*Q%q\*U}, %y.\
    +%a, {\fI%t\fR}, {\*Q%q\*U}, %y.\
     .FE
     
    -

    As you can see above, you can use troff requests and other macros - in your format. This will expand to a valid request/macro in the output of - rf.

    -

    Note that all fields are inserted literally, with one exception: - when %a is used in an inline reference format, the - forenames of the authors are automatically removed. To include the - forenames, use %A instead.

    -

    Finally, you usually don't need to worry about excessive spaces - and stray punctuation marks. rf removes common - punctuation immediately preceding and following an unsuccessful - interpolation.

    +
    +
    +

    +You usually don't need to worry about excessive spaces and stray punctuation + marks. rf removes common punctuation immediately + preceding and following an unsuccessful interpolation. Excessive spaces are + also removed, unless they follow a period, marking the end of a sentence. +

    @@ -247,19 +275,19 @@ Literature .Ra Davidson, H. .Ry 1991 .Rt Seminal Work -.Rc London -.Rp Another Press +.Rc Athens +.Rp Logos .XP .Ra Smith, P. .Ry 2007 .Rt Modern Society -.Rc New York -.Rp Some Press +.Rc Athens +.Rp Logos

    When given the above file, rf will output - the following code:

    + the following source code:

     .de noop
    @@ -269,6 +297,7 @@ Literature
     .SH
     Previous work
     
    +
     .LP
     Davidson
     (1991)
    @@ -282,10 +311,10 @@ has performed a study [...]
     Literature
     
     .XP
    -Davidson, H. (1991). \fISeminal Work\fR. London: Another Press.
    +Davidson, H. (1991).  \fISeminal Work\fR.  Athens: Logos.
     
     .XP
    -Smith, P. (2007). \fIModern Society\fR. New York: Some Press.
    +Smith, P. (2007).  \fIModern Society\fR.  Athens: Logos.
     
    -- cgit v1.2.3