groff
[Top][All Lists]
Advanced

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

Re: [groff] 01/08: mdoc: Accept mixed-case section headings.


From: Steffen Nurpmeso
Subject: Re: [groff] 01/08: mdoc: Accept mixed-case section headings.
Date: Wed, 16 Sep 2020 01:21:14 +0200
User-agent: s-nail v14.9.19-127-g67fa13b6

G. Branden Robinson wrote in
 <20200915183356.3xt3ywitpzifixm2@localhost.localdomain>:
 |At 2020-09-15T13:59:04+0200, Steffen Nurpmeso wrote:
 |> Just out of interest: why do you change an omnipresent idiom that
 |> is in use for standard section headers in Unix manual pages since
 |> at least fourty years?
 ...
 |But to answer your question in this historical spirit whence it was
 |posed: for the same reason that Unix was case-sensitive internally while
 |still being operable with uppercase-only terminals.  Remember this?
 |
 |  login: DMR
 |  PASSWORD:

C64 had no login.  And DMR would not have used it.
I am all with Tadziu Hoffmann in this thread.

  ...
 |> This commit changes the world and will affect the generations of
 |> programmers to come, shall they experience it.
 |
 |It is a change with some impact, yes, but my intention is that people be
 |able to see fully-capitalized page titles and section headings without
 |much effort on their part if that is their desire.  That is why I
 |implemented "CT" and "CS" registers in groff_man(7).  Please see the
 |following commits.
 |
 |  https://lists.gnu.org/archive/html/groff-commit/2019-09/msg00009.html
 |  https://lists.gnu.org/archive/html/groff-commit/2019-09/msg00018.html

I had totally forgotten about that.

 |I intend to do the same for groff_mdoc(7); it already happily has
 |compatible configuration semantics, and I've recently been increasing
 |the parallels between our mdoc and man implementations in this respect.
 |Here's an example.
 |
 |  https://lists.gnu.org/archive/html/groff-commit/2020-08/msg00075.html
 |
 |The only reason you don't already see CT and CS support in groff_mdoc(7)
 |is simply that I haven't done it yet and it wasn't logically necessary
 |for the change set I've already made.  I'll move this work higher on the
 |priority list since others may be as distressed as you were.

I see.  For Ingo's mandoc it will be an either/or thing i think.
Well.  I have no other opinion than what i expressed already.
More and more software packages only generate manual pages, in
fact more and more do not even ship with generated manual pages
but leave that up to the packager, as a build time dependency.  So
it is.

  ...
 |> Well, now that you say it have fuzzy memories .. and refreshed
 |> them.  Used to and living in text consoles only (though in
 |> graphical environment, again) i .. have mixed feelings, because
 |> now i am used to this notation for over twenty years.  I think it
 |> does make sense for several output devices, notably PDF, maybe
 |> even HTML, or markdown even, but for manual page output i feel
 |> differently.  Anyhow, if i make it, maybe i even follow but place
 |> a switch in site- and user-local configurations, for noone to find
 |> it ^_^.
 |
 |Except for the "no one being able to find it" part, that is precisely
 |what is intended.  From groff_man_style(7) on the master branch we have:
 |
 | /usr/local/share/groff/site-tmac/man.local
 |        Put local changes and customizations into this file.
 |
 |               .\" Use narrower indentation on terminals and similar.
 |               .if n .nr IN 4n
 |               .\" Put only one space after the end of a sentence.
 |               .ss 12 0 \" See groff(7).
 |               .\" Keep pages narrow even on wide terminals.
 |               .if n .if \n[LL]>78 .nr LL 78n
 |
 |        On multi-user systems, it is more considerate to users whose
 |        preferences may differ from the administrator's to be less ag‐
 |        gressive with such settings, or to permit their override with a
 |        user-specific man.local file.  One way to achieve the latter is
 |        by placing the following at the end of /usr/local/share/groff/
 |        site-tmac/.man.local.
 |               .so \V[HOME]/.man.local

More and more projects support $XDG_DATA_HOME aka _CONFIG_.

 |        Note that the above request will produce a warning if $HOME/
 |        man.local does not exist; you may wish to include one in /etc/
 |        skel or an equivalent account configuration system.  Further‐
 |        more, a security-sandboxed man(1) program may lack permission to
 |        open the file.
 |
 |I reckon I could add
 |               .\" Put page titles and section headings in full caps.
 |               .if n .nr CT 1
 |               .if n .nr CS 1
 |to the above.  Do you think that would be helpful?

Well i personally .. would do it like this.  Or better, i would
switch for .T == pdf or html and keep the default.  But that is
really just me.  Shall anyone use scripts they need to be
adjusted, for example.  A quickly thought hack would be a script
called synopsis which does

 man "$1" | sed -e '/^SYNO/,/^[A-Z]/p;d'

which goes two to far, but .. what i mean.

Ciao and good night,

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

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