bugGNU roff - Bugs: bug #61027, [refer] want %O format to...

 
 

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

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Wed 11 Aug 2021 12:12:32 PM UTC
   
 
Category:  Preprocessor refer Severity:  1 - Wish
Item Group:  Feature change Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 11 Aug 2021 12:12:32 PM UTC, original submission:  

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


G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  • -email is unavailable- added by gbranden (original reporter)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-11 gbranden Carbon-Copy- Added douglas mcilroy <douglas.mcilroy@dartmouth.edu>

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code