bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61027] [refer] want %O format to interpolate a marker


From: G. Branden Robinson
Subject: [bug #61027] [refer] want %O format to interpolate a marker
Date: Wed, 11 Aug 2021 08:12:34 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?61027>

                 Summary: [refer] want %O format to interpolate a marker
                 Project: GNU troff
            Submitted by: gbranden
            Submitted on: Wed 11 Aug 2021 12:12:32 PM UTC
                Category: Preprocessor refer
                Severity: 1 - Wish
              Item Group: New feature
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Doug McIlroy reported a feature request, to which I replied.

https://lists.gnu.org/archive/html/groff/2021-08/msg00029.html


At 2021-08-02T19:38:42-0400, Douglas McIlroy wrote:
> Another issue I have run into is recursion, when a reference includes
> another reference. This comes up in various forms:
>      Also published as ...
>      Errata available at ...
>      Summarized [or reviewed] in ...
>      Preprint available at ...
> Often such a reference takes the form of a URL or a page in a journal
> or in a proceedings. This can be most succinctly placed in situ --
> formatted consistently with other references. If the reference
> identifies an alternate mode of publication, it may lack %A or %T
> fields.
> 
> Partial proposal. a %O field may contain a reference, with no further
> recursion, The contained reference will be formatted in line in the %O
> text unless references are accumulated and the  contained reference is
> not unique.

This would tighten the existing semantics of %O, would it not?  Maybe
that's not a problem, since it's already defined as a dumping ground[1].

So if I understand you and the GNU refer(1) manual correctly, %O would
be parsed for a pair of brackets[2] containing keywords only (no
fields), and if that resolved to a single reference, the label for that
reference would be interpolated.  That of itself would be sufficient to
halt the recursion.

Here's an example of what this sort of thing looks like today, _without_
adding this feature to %O.

$ cat EXPERIMENTS/my-db-file-for-doug
%A Daniel P.\& Friedman
%A Matthias Felleisen
%C Cambridge, Massachusetts
%D 1996
%I The MIT Press
%T The Little Schemer, Fourth Edition
%O Reviewed in [posterior analytics 36]
$ REFER=EXPERIMENTS/my-db-file-for-doug ./build/test-groff -R -Tutf8 \
 -ms EXPERIMENTS/scheme.ms | cat -s

Read the book[1] on your  summer  vacation.   Commentary  is
available.*

───────────
  [1] Daniel  P.  Friedman  and Matthias Felleisen, The
Little Schemer, Fourth Edition,  The  MIT  Press,  Cam‐
bridge,  Massachusetts  (1996).  Reviewed in [posterior
analytics 36].
  * Space reserved for penetrating insight.

[1] "Other information.  This is usually printed at the end of the
    reference."
[2] could be anything non-keywordy, but brackets seem like a good choice





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61027>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]