From cd225683d4414006c9422ff23076d88638af1794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 11 Nov 2020 15:13:38 +0100 Subject: add backslash escaping, auto-remove more punctuation --- rf.1 | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'rf.1') diff --git a/rf.1 b/rf.1 index d85121b..fbf429f 100644 --- a/rf.1 +++ b/rf.1 @@ -189,16 +189,32 @@ For example: \&.Ff (%a{, %y}). \\" Here, ', ' is removed if there is no year. .Ed .Pp -Note that all fields are inserted literally, except -.Em %a , -from which the forenames of the authors are removed. +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: +.Bd -literal -offset indent +\&.Fx\\ \\**\\ +\&.FS\\ +%A, {\\fI%t\\fR}, {\\*Q%q\\*U}, %y.\\ +\&.FE +.Ed .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 +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 .Nm . .Pp -Finally, you usually don't need to worry about excessive spaces and stray punctuation marks, as +Note that all fields are inserted literally, with one exception: +when +.Em %a +is used in an inline reference format, the forenames of the authors are automatically removed. +To include the forenames, use +.Em %A +instead. +.Pp +Finally, you usually don't need to worry about excessive spaces and stray punctuation marks. .Nm -removes many of these these automatically. +removes common punctuation immediately preceding and following an unsuccessful interpolation. . .Sh EXAMPLE Below is an example of an ms-based troff document using -- cgit v1.2.3