The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] Why does refer(1) have no database field for "edition"?.
@ 2021-08-02 23:38 Douglas McIlroy
  2021-08-04  8:16 ` G. Branden Robinson
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas McIlroy @ 2021-08-02 23:38 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

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.

Doug

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [TUHS] Why does refer(1) have no database field for "edition"?.
  2021-08-02 23:38 [TUHS] Why does refer(1) have no database field for "edition"? Douglas McIlroy
@ 2021-08-04  8:16 ` G. Branden Robinson
  0 siblings, 0 replies; 2+ messages in thread
From: G. Branden Robinson @ 2021-08-04  8:16 UTC (permalink / raw)
  To: groff; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 2403 bytes --]

So many groff discussions get re-routed to TUHS thanks to Doug's MUA. :)

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[3].

$ 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.


Regards,
Branden

[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
[3] ...and a nickel goes into the "cat -v swear jar".

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-04  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 23:38 [TUHS] Why does refer(1) have no database field for "edition"? Douglas McIlroy
2021-08-04  8:16 ` G. Branden Robinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).