diff options
author | John Ankarström <john@ankarstrom.se> | 2020-11-11 12:57:25 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-11-11 12:57:32 +0100 |
commit | f6796338ea3b588d2cfbfc9e9a25a5894429a54d (patch) | |
tree | 5094a61fff27147c14dc72d2bf076ead2b9647bf | |
parent | 9ac2fd7b837766ede53c5c78206dae3d9d251b73 (diff) | |
download | rf-f6796338ea3b588d2cfbfc9e9a25a5894429a54d.tar.gz |
regenerate (example, clarifications)
-rw-r--r-- | index.html | 84 |
1 files changed, 80 insertions, 4 deletions
@@ -66,7 +66,7 @@ <td>0.24s</td> </tr> </table> -<p class="Pp">I would deem it rare to have more than a couple of hundred +<p class="Pp">I would deem it rare to have more than a couple of hundred unique references in a troff document.</p> </section> <section class="Sh"> @@ -167,8 +167,10 @@ there has been a gradual change in attitudes towards ... <dt><b class="Sy">Ry</b></dt> <dd>Defines the <i class="Em">year</i> of publication.</dd> </dl> -<p class="Pp">Of these macros, <b class="Sy">Ra</b> and <b class="Sy">Ry</b> are - the most important.</p> +<p class="Pp">In the final output, <code class="Nm">rf</code> prints a formatted + version of each reference entry in place of its definition. + <code class="Nm">rf</code> does not change the order of reference entries. + This means that you can arrange your references freely.</p> </section> </section> <section class="Sh"> @@ -194,15 +196,89 @@ In a format definition, use a percent (%) sigil followed by a single letter to <p class="Pp">Note that all fields are inserted literally, except <i class="Em">%a</i>, from which the forenames of the authors are removed.</p> +<p class="Pp">Note also that you can use troff requests and other macros in your + format by starting with a dot. This will expand to a valid request/macro in + the output of <code class="Nm">rf</code>.</p> <p class="Pp">Finally, you usually don't need to worry about excessive spaces and stray punctuation marks, as <code class="Nm">rf</code> removes many of these these automatically.</p> </section> <section class="Sh"> +<h2 class="Sh" id="EXAMPLE"><a class="permalink" style="color: black; text-decoration: none;" href="#EXAMPLE">EXAMPLE</a></h2> +Below is an example of an ms-based troff document using + <code class="Nm">rf</code> references. +<div class="Bd Pp Bd-indent"> +<pre> +.de noop +.. +.blm noop + +.SH +Previous work + +.LP +Davidson +.Rx '' 1991 +has performed a study [...] + +.PP +[...] which leads to a higher total cholesterol level +.Rf Smith 2007 . + +.SH +Literature + +.XP +.Ra Davidson, H. +.Ry 1991 +.Rt Seminal Work +.Rc London +.Rp Another Press + +.XP +.Ra Smith, P. +.Ry 2007 +.Rt Modern Society +.Rc New York +.Rp Some Press +</pre> +</div> +<p class="Pp">When given the above file, <code class="Nm">rf</code> will output + the following code:</p> +<div class="Bd Pp Bd-indent"> +<pre> +.de noop +.. +.blm noop + +.SH +Previous work + +.LP +Davidson +(1991) +has performed a study [...] + +.PP +[...] which leads to a higher total cholesterol level +(Smith 2007). + +.SH +Literature + +.XP +Davidson, H. (1991). \fISeminal Work\fR. London: Another Press. + +.XP +Smith, P. (2007). \fIModern Society\fR. New York: Some Press. +</pre> +</div> +</section> +<section class="Sh"> <h2 class="Sh" id="AUTHORS"><a class="permalink" style="color: black; text-decoration: none;" href="#AUTHORS">AUTHORS</a></h2> <code class="Nm">rf</code> was written by John Ankarström <<a class="Mt" href="mailto:john">john</a> - <a class="Mt" href="mailto:(on)">(on)</a> + <a class="Mt" href="mailto:(at)">(at)</a> <a class="Mt" href="mailto:ankarstrom.se">ankarstrom.se</a>>. </section> </div> |