[bug #64576] [pdf.tmac] pdf*href option handling insufficiently flexible

2024-04-10 Thread Keith Marshall
Follow-up Comment #9, bug #64576 (group groff):

[comment #2 comment #2:]
> I reiterate that stuff like this:

> .  while dpdf:href.opt\\$1 \{\
> . pdf:href.opt\\$1 \\$@
> . shift \\n[pdf:href.argc]
> . \}


> is too clever by half--by three quarters, maybe,
This, of course, is utter nonsense.
> if you're neither doing sanitization (which will need to be
> reversible for things like link text, and therefore even more
> tedious and difficult than sanitization already is), nor input
> validation.
> 
> But the latter isn't even really what you want anyway.
You got that much right.
> There's no reason that every argument to a macro must be expected
> to be a valid *roff identifier.
Also true; however...
> This is simply a mistaken premise that appears to have driven
> several bad design decisions.
This conclusion is, once again, utter nonsense.  The design is perfectly
sound; it is the implementation that is flawed.  You even hinted at the fault,
and thus implicitly at a practical solution, in your reference to "input
validation", and *that* is readily accomplished:

.  while \A'\\$1' \{\
. if !dpdf:href.opt\\$1 .break
. pdf:href.opt\\$1 \\$@
. shift \\n[pdf:href.argc]
. \}

will prevent any attempt to match any argument which could not be legitimately
incorporated into an identifier name, (and any which follow it), to a defined
macro name, (which is the intent of this while loop).

I have identified six loops, within _pdfmark.pdf_, which exhibit such
vulnerability, and thus, where similar input validation would be advisable; I
will fix them accordingly, in my OSDN _groff-pdfmark_ repository.


___

Reply to this item at:

  

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




[bug #65117] [pdfmark] premature page break in "pdfmark.ms" output with page size A4

2024-04-10 Thread Keith Marshall
Update of bug #65117 (group groff):

  Status:None => Unreproducible 

___

Follow-up Comment #2:

[comment #0 original submission:]
> Subject: [pdfmark] premature page brake in "pdfmark.ms" output
> with page size A4
> 
> Page 14.
> 
>   The page is advanced after
> 
> invokes ``.pdfsync O'' to ensure that the outline for the
I'm not seeing that in *my* A4 format copy, (or in the current online copy, at
https://osdn.net/users/keith/pf/groff-pdfmark/wiki/FrontPage, which is also
formatted as for printing on A4 paper), where this text appears towards the
bottom of page 27, *not* page 14, on the last but one line of the last
paragraph of section 2.7; the last line of the paragraph follows
*immediately*, (still on page 27).
>   although there it plenty of space left on the page.
> 
>   The next page begins with the last line of the previous
> paragraph (widow).
*My* next page begins with the top level heading for section 3; there is no
widow line, carried forward from section 2.7.

Marking as "Unreproducible", for now; maybe should be "Invalid"?  Furthermore,
is there any real value in keeping this open?  I will certainly *not* be
pursuing it.


___

Reply to this item at:

  

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




[bug #60927] improve pdfmark documentation, including pdfroff(1)

2024-04-10 Thread Keith Marshall
Update of bug #60927 (group groff):

  Status:None => In Progress
 Assigned to:None => keithmarshall  

___

Follow-up Comment #5:

This is still a work in progress.  I consider the pdfroff(1) manual page to be
complete, but I still plan to provide two more: groff_pdfmark(7) and
groff_pdfhref(7).  I also have more content, which I plan to add, via
pdfmark.ms, to pdfmark.pdf.

Meanwhile, I have now (as of 9-Apr-2024) posted significant additions to
pdfmark.pdf; these may be found at
https://osdn.net/users/keith/pf/groff-pdfmark/wiki/FrontPage


___

Reply to this item at:

  

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




[bug #64202] [man pages] groff_man(7) inconsistently (and redundantly) guards some .MR references with '\%'

2024-03-29 Thread Keith Marshall
Follow-up Comment #10, bug #64202 (group groff):

[comment #9 comment #9:]
> [comment #1 comment #1:]
> > 3.  The reason for that is that man page content is partially
> > dynamic.  The redundancy you're observing is the result of the
> > "@g@" character sequence being replaced by the ./configure-d
> > command prefix in use by the build.  By default, and in many
> > build scenarios (of those I've seen personally, all except for
> > Solaris), this prefix is empty.
> 
> This was and remains true.
I think we had already agreed that the issue arose from expansion of the '@g@'
configuration macro, the intent of which is to support addition of (normally)
'g' as a program name prefix.  That many systems do not specify such a prefix
is certainly true, but is not germane to this issue anyway -- the addition of
'g', as prefix, would not cause any problem.  However, that the expansion of
'@g@' is similarly empty, in the case of groff's generated man pages, is
apparently *not* true.  In the case of _groff_man.7_, which I cited as an
example merely because that's what drew my attention to this issue, '@g@'
appears to expand to '\%', and when that infiltrates a PDF hypertext
reference, via a PDF-centric overridden 'MR' macro, it becomes a problem.  I
have little doubt that _groff_man.7_ is not alone, in exhibiting this
affliction.
> > 4.  @g@ is expanded in several contexts, not just the first
> > argument of `MR`.  Wherever it occurs, it is part of a literal to
> > which we do not want automatic hyphenation to apply.
> 
> This was and remains true.
I have no doubt that this is the case.  However, there are many similar
literals, which are *not* prefixed by '@g@' but should also not be hyphenated.
 You have conflated two unrelated concepts into the expansion of a single
configuration macro, which does not have sufficient degrees of freedom to
separate the two concepts.  At best, that is a gross abuse of the '@g@' macro,
which I contend is a bug.
> A built _groff_ 1.23.0 tree does not produce any instances of
> `\%\%` in any of its man pages, as a _grep_ will readily confirm.
Which is *not* the issue, and I never said that it was.  That there is just
one '\%' at the start of *some* 'MR' topic references, (and it seems to be
just those which are prefixed by '@g@'), *is* the problem, because that
infiltrates, and corrupts PDF hypertext references, which are compiled from
the 'MR' arguments.
> Your ticket title appears to have been deceptive.
Possibly.  It is, perhaps, misleading that I cited _groff_man.7_ as *the*
problem page.  It is *a* problem page; I have no doubt that there are others.
> I should have demanded evidence from you at the time; I will have
> settle for doing so now.
I based my original testing on:

$ ../groff-build/config.status --version
GNU roff config.status 1.23.0.rc4.59-51a03-dirty
configured by ../groff-tmp/configure, generated by GNU Autoconf 2.71,
  with options ""

In my local build from that _groff-tmp_ git checkout, I see:

$ grep '^\. *MR' ../groff-build/tmac/groff_man.7
.MR groff_man_style 7 ,
.MR man 1
.MR intro 1
.MR groff_man_style 7
.MR man 7
.MR grotty 1 ).
.MR groff_man_style 7 .
.MR \%tbl 1
.MR groff 7
.MR groff 7 .
.MR groff 7 .
.MR groff 7 ).
.MR \%tbl 1 ,
.MR \%eqn 1 ,
.MR \%refer 1
.MR man 1
.MR groff_mdoc 7
.MR groff_man_style 7 ,
.MR groff 7 ,
.MR groff_char 7 ,
.MR man 7

Note that of all 'MR' references, only four exhibit the redundant '\%' prefix,
(redundant because, presumably, 'MR' would be expected to suppress hyphenation
of its output, in any case, even without an explicit '\%' prefix), and
inconsistent for the fairly obvious reason: (most 'MR' references omit the
'\%' prefix, but just a few have it).  Furthermore, I see:

$ grep '^\. *MR  *@g@' ../groff-build/tmac/groff_man.7.man
.MR @g@tbl @MAN1EXT@
.MR @g@tbl @MAN1EXT@ ,
.MR @g@eqn @MAN1EXT@ ,
.MR @g@refer @MAN1EXT@

This would appear to confirm that, where this redundant '\%' prefix appears,
it is the result of expansion of '@g@'.
> In the absence of such evidence, I regard your claim of bugginess
> as unfounded.  Changing status to "Invalid".
Frankly, I could not care less what you choose to do, henceforth.  I say this
is a bug; you may disagree, in which case we must agree to disagree.  I now
have a satisfactory work around for this bug, and I have no further interest
in contributing to _groff_, or in pursuing any further local builds.  I shall
continue to maintain _pdfroff_, _pdfmark.tmac_, and associated documentation
independently; this has already diverged significantly from its state, when I
ceased to maintain it as a part of _groff_.


___

Reply to this item at:

  

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




[bug #64202] [man pages] groff_man(7) inconsistently (and redundantly) guards some .MR references with '\%'

2024-03-28 Thread Keith Marshall
Follow-up Comment #8, bug #64202 (group groff):

[comment #7 comment #7:]
> I'm rejecting this.
Fair enough; that is your prerogative.  It doesn't make it any less of a bug;
it just makes it a bug which you have decided you will not fix!  In any case,
I have a work around.
> If a PDFMark tag indexing system constructs _groff_ identifiers
> from arbitrary input strings, that system is responsible for
> ensuring that the constructed identifiers are syntactically valid.
That is *not* the issue here.  The issue is that your unnecessary '\%' prefix
infiltrates the text of the pdfmark '/Link' annotation, which defines the
destination of the resultant PDF hyperlink; there is no attempt to construct a
_groff_ identifier from this text.  My work around simply iterates over the
initial part of the string, discarding the first character while it is '\%',
and keeping the remainder of the string, as soon as its first character
becomes anything other than '\%'.

In fact, I am not aware of any code, within _pdfmark.tmac_, which attempts to
construct a _groff_ identifier from arbitrary input text; if _you_ know of
any, please do bring it to my attention.
> The _groff_ language has, for decades, supported the `\A` escape
> sequence to assist with this.
I am aware of this.  Indeed, just last week, I *did* stumble on some code
which *does* attempt to *match* arbitrary input text to (a part of) a
*pre-existing* _groff_ identifier, using _.if d prefix.\\$1_ as the sole test.
 In the particular context, the effect was completely innocuous, aside from
raising an unexpected warning.  The solution, to avoid the warning, was to
test _.if \A'\\$1'_ *first*, and to perform the _.if d ..._ test only if that
returns _true_.
> Unfortunately, it has also lacked a string iterator that would make
> it easier to _do_ something about arbitrary input strings one's tag
> indexing system encounters.  (Apart from aborting the formatter or
> risking incorrect lookups on tag values, that is.)  Providing such
> a facility is contemplated as a future _groff_ language direction
> in bug #62264.
I agree that string iteration could be made more convenient, but it *is*
already possible ... I do it, in my _sanitize.tmac_, to filter out special
codes, which do not render appropriately in PDF outline text.
> I decided to solve this problem in "pdf.tmac" by not constructing
> _groff_ identifiers from arbitrary input strings, instead using
> another string, indexed by the bookmark's sequence number.  This
> does come at the price of turning tag lookup time from constant in
> the number of already-recorded tags to linear.
As I've pointed out above, identifier construction is *not* relevant to this
issue, so what you have done in _pdf.tmac_ has no bearing on what I have had
to do, to work around your bug.


___

Reply to this item at:

  

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




[bug #64202] [man pages] groff_man(7) inconsistently (and redundantly) guards some .MR references with '\%'

2023-05-23 Thread Keith Marshall
Follow-up Comment #6, bug #64202 (project groff):

[comment #5 comment #5:]
> [comment #4 comment #4:]
> > [comment #3 comment #3:]
> > ... I don't have enough insight into the implementation you're
> > working on to offer advice.  Maybe you could share some of its
> > code.
> 
> I'll post it on OSDN, when I get it to a "commit-ready" state.
> I do have it working, quite nicely, now, but with my MR macro
> override "uglified" by the need to filter out '\%' prefixes,
> from its first argument.
You can find it at
[https://osdn.net/users/keith/pf/groff-pdfmark/scm/commits/918f8bd24f903ec0a9e4367286eeaafdb66ece3d
groff-pdfmark commit #918f8bd] -- look, in particular, for the new
[https://osdn.net/users/keith/pf/groff-pdfmark/scm/blobs/918f8bd24f903ec0a9e4367286eeaafdb66ece3d/tmac/anpdf.tmac
tmac/anpdf.tmac] file.


___

Reply to this item at:

  

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




[bug #63827] withdraw contrib/pdfmark

2023-05-23 Thread Keith Marshall
Follow-up Comment #14, bug #63827 (project groff):

[comment #13 comment #13:]
> [comment #11 comment #11:]
> > [comment #10 comment #10:]
> > > Should the 1.23 announcement/news mention that:
> > > * the pdfmark bundled with this release of groff is not the
> > >   latest code (and provide a pointer to that code)?
> > 
> > I don't think they've diverged all that much.
> 
> Keith addressed this in comment #12; I don't know if that changes 
> the conclusion any.

And today, there's
_[https://osdn.net/users/keith/pf/groff-pdfmark/wiki/ChangeLog even more
extensive divergence]_ than there was when I wrote comment #12.

> > pdfroff(1) will continue to exist in groff 1.23.0
> > distributions and point readers to Keith's site.
> 
> Ah, yes, I somehow missed
[http://git.savannah.gnu.org/cgit/groff.git/commit/?id=948ccc55 commit
948ccc55], even though it
> was cited in a comment to bug #63133, on which I'm cc:ed.

Yet today, following a pull and update from git master, I _still_ see no
reference in the NEWS file; given the extent of divergence, now, I think that
the obsolescence of groff's pdfroff/pdfmark distribution deserves a mention in
NEWS, as well as in pdfroff(1).


___

Reply to this item at:

  

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




[bug #64202] [man pages] groff_man(7) inconsistently (and redundantly) guards some .MR references with '\%'

2023-05-22 Thread Keith Marshall
Follow-up Comment #5, bug #64202 (project groff):

[comment #4 comment #4:]
> [comment #3 comment #3:]
> > [comment #1 comment #1:]
> > > Hi Keith,
> > > 
> > > I'm aware of this.  It's deliberate insofar as it's a consequence of
other decisions.
> > > 
> > > The main facts are these:
> > > 
> > > 1.  The new `MR` macro unconditionally prefixes its first argument with
a `\%` escape sequence to suppress hyphenation.
> > 
> > That's what I thought.  Consequently, there is _absolutely_ no need for
references, such as '.MR \%topic n', to _ever_ add that redundant '\%' prefix
to the topic name.
> 
> ...and there are no cases of it doing so in the groff tree,
Seriously?  Is your day job related to government, in some shape or form?  You
certainly seem to exhibit the politician's proclivity to spew verbiage, with
little. or no, bearing on the issue at hand.

> $ git grep 'MR.*\\%' || echo NONE
> NONE

A badly designed experiment, testing a bogus hypothesis, might be viewed as
disingenuous obfuscation ... perhaps not so in this case, but rather a
misunderstanding of the issue?  In reality, there _are_ 197 cases arising from
abuse of '.MR @g@...', and one further, from abuse of '.MR @PSPRINT@ ...'

$ hg grep '^\. *MR  *@g@' | wc -l
197

$ hg grep '^\. *MR  *@' | wc -l
198

$ hg grep '^\. *MR  *@[^g]'
src/roff/groff/groff.1.man:.MR @PSPRINT@ 1 .


> [...irrelevant verbiage snipped...]

> The purpose is not being subverted.
I guess we'll just have to agree to disagree, on that conclusion.
> You said yourself that the "seat" of this behavior is Makefile rules for
generating .[157] from .man.  It would be wrong to do so in
"makevarescape.sed", for instance, because '@g@' and friends get expanded in
contexts other than _roff_ sources.  Moreover, valid _roff_ input is indeed
being produced.
> 
> [...more verbiage snipped...]

> This is why I mentioned the following point in comment #1.
> 
> > You do not _need_ to sanitize content destined for device control escape
sequences (or the `device` request) of the `\%` escape sequence.  The
formatter will ignore this escape sequence in that context, skipping over it
without diagnostic, and it will not appear in the "x X" commands that GNU
troff produces.  This is already the case in groff 1.22.4 and therefore I
suspect it's been true for many years.

Well, it _does_ propagate through pdfmark output to grops.  Perhaps the
pdfmark macro _should_ sanitize its output, but that seems like a huge
overhead in tmac code ... every single byte of pdfmark throughput would need
to be inspected, just to weed out a miniscule few rogues.

> Are you wrapping or replacing the `MR` macro
Yes, and ...
> and "sanitizing" its first argument for some other purpose?
...no; it's a consequence of _not_ sanitizing the first argument, coupled with
your abuse of '@g@', (and maybe also of '@PSPRINT@'), in man page source, that
allows the unwanted '\%' to propagate.
> You said:
> 
> > (which, in its present state of development, does not incur any address
sanitizer overhead)
> 
> ...which I didn't completely understand, as ASAN doesn't seem relevant to
the present discussion of _roff_ macro processing.
> 
> Leaving in "Need Info" status, as I'm stuck; I don't agree with your
implication that repeated leading \% escape sequences in a word are invalid
_roff_ input,
I neither said, nor even remotely implied, any such thing.
> and I don't have enough insight into the implementation you're working on to
offer advice.  Maybe you could share some of its code.
I'll post it on OSDN, when I get it to a "commit-ready" state.  I do have it
working, quite nicely, now, but with my MR macro override "uglified" by the
need to filter out '\%' prefixes, from its first argument.


___

Reply to this item at:

  

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




[bug #64202] [man-pages]: groff_man(7) inconsistently (and redundantly) guards some .MR references with '\%'

2023-05-17 Thread Keith Marshall
Follow-up Comment #3, bug #64202 (project groff):

[comment #1 comment #1:]
> Hi Keith,
> 
> I'm aware of this.  It's deliberate insofar as it's a consequence of other
decisions.
> 
> The main facts are these:
> 
> 1.  The new `MR` macro unconditionally prefixes its first argument with a
`\%` escape sequence to suppress hyphenation.

That's what I thought.  Consequently, there is _absolutely_ no need for
references, such as '.MR \%topic n', to _ever_ add that redundant '\%' prefix
to the topic name.

> 2.  All of _groff_'s man pages (.[157]) files are produced in the build tree
from from .man inputs.

Again, I'm well aware of this, but the '*.man' sources _do not_ specify the
redundant prefix, (other than incidentally, via a malformed transform for a
'@g@' prefix).

> 3.  The reason for that is that man page content is partially dynamic.  The
redundancy you're observing is the result of the "@g@" character sequence
being replaced by the ./configure-d command prefix in use by the build.  By
default, and in many build scenarios (of those I've seen personally, all
except for Solaris), this prefix is empty.

And, therein lies the bug ... for it _is_ a bug.  The intent of '@g@' is to
add a program name prefix -- typically 'g' for GNU programs -- so that 'tbl'
becomes 'gtbl', when appropriate; it has _absolutely no business_ to _ever_
include '\%' as part of that prefix.

(FWIW, the seat of the bug is within the substitution for '@g@', as it is
specified in the generated Makefile, at the point where 'topic.n' is generated
from 'topic.n.man').

> 4.  @g@ is expanded in several contexts, not just the first argument of
`MR`.  Wherever it occurs, it is part of a literal to which we do not want
automatic hyphenation to apply.

Understood.  However, the intent of '@g@' should _not_ be subverted, for this
unrelated purpose ... either specify '\%' _explicitly_, in any context where
it is intended, or introduce a specific transform, other than '@g@' itself,
which implies the effect of '\%@g@'.

> ...snip...
> 
> What do you think?

I think that this is an insidious bug, which should be fixed.


___

Reply to this item at:

  

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




[bug #64202] [man-pages]: groff_man(7) inconsistently (and redundantly) guards some .MR references with '\%'

2023-05-16 Thread Keith Marshall
URL:
  <https://savannah.gnu.org/bugs/?64202>

 Summary: [man-pages]: groff_man(7) inconsistently (and
redundantly) guards some .MR references with '\%'
   Group: GNU roff
   Submitter: keithmarshall
   Submitted: Tue 16 May 2023 07:20:54 PM UTC
Category: Macro man
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None


___

Follow-up Comments:


---
Date: Tue 16 May 2023 07:20:54 PM UTC By: Keith Marshall 
The title mostly says it all.  When groff_man(7) refers to tbl(1), eqn(1), and
refer(1), it does so using a reference of the form:

.MR \%tbl 1

while, when referring to any other page, such as groff(1), it omits the '\%'
hyphenation guard prefix:

.MR groff 1

In this context, the '\%' prefix is redundant; the MR macro -- at least in the
fall back within the man page source -- supplies an additional one anyway. 
Furthermore, specifying such a guard in the macro call imposes an unnecessary
burden on any macro implementation which constructs, for example, a PDF
external reference based on the MR macro arguments, because the generated
reference address must be passed through a sanitizer routine -- an unnecessary
overhead, when MR already prepends the '\%' in running text.

To illustrate the issue, I've attached a copy of groff_man.7.pdf, generated
from your git master source, and formatted by my development copy of pdfroff,
with complementary '-manpdf', (which, in its present state of development,
does not incur any address sanitizer overhead):

GROFF_TMAC_PATH=/path/to/groff-pdfmark/tmac ./pdfroff -manpdf groff_man.7 >
groff_man.7.pdf

Note the malformed https references for tbl(1), eqn(1), and refer(1), in the
"See also" section,for example.






___
File Attachments:


---
Date: Tue 16 May 2023 07:20:54 PM UTC  Name: groff_man.7.pdf  Size: 71KiB  
By: keithmarshall
Illustration of malformed reference link addresses
<http://savannah.gnu.org/bugs/download.php?file_id=54755>

___

Reply to this item at:

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

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




[bug #64183] [pdfroff]: sanitize.tmac throws warning when -ww specified

2023-05-11 Thread Keith Marshall
URL:
  <https://savannah.gnu.org/bugs/?64183>

 Summary: [pdfroff]: sanitize.tmac throws warning when -ww
specified
   Group: GNU roff
   Submitter: keithmarshall
   Submitted: Thu 11 May 2023 09:14:45 PM UTC
Category: General
Severity: 3 - Normal
  Item Group: Warning/Suspicious behaviour
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None


___

Follow-up Comments:


---
Date: Thu 11 May 2023 09:14:45 PM UTC By: Keith Marshall 
After patching test-groff, per attached, to allow me to run pdfroff within the
groff build tree, and formatting pdfroff.1 as PDF, using my own as yet
unpublished anpdf.tmac, I see:

$ CMD=pdfroff ./test-groff -ww -manpdf -dpaper=a4 -P-pa4 -rFT='(-0.75i)'
../groff-pdfmark/build/pdfroff.1 > pdfroff.1.pdf
troff:../groff-pdfmark/build/pdfroff.1:2: warning: end index of substring out
of range, set to string length
...

(the same warning is repeated a further eight times, originating from
differing line numbers within pdfroff.1).

The warning originates from contrib/pdfmark/sanitize.tmac, after inspection of
the last character in the pdfhref address string, when attempting to discard
this character from the residual string.

I've already fixed this in
[https://osdn.net/users/keith/pf/groff-pdfmark/scm/tree/tip/ groff-pdfmark, at
OSDN]; a patch, relative to your contrib/pdfmark version, (which also adds
some additional filters from my version of sanitize.tmac, which are not in
yours), is attached.






___
File Attachments:


---
Date: Thu 11 May 2023 09:14:45 PM UTC  Name: test-groff-command.patch  Size:
381B   By: keithmarshall

<http://savannah.gnu.org/bugs/download.php?file_id=54728>
---
Date: Thu 11 May 2023 09:14:45 PM UTC  Name: reference-sanitizer.patch  Size:
7KiB   By: keithmarshall

<http://savannah.gnu.org/bugs/download.php?file_id=54729>

___

Reply to this item at:

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

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




[bug #63133] [pdfroff] throws warning on any document if -ww given

2023-04-06 Thread Keith Marshall
Follow-up Comment #10, bug #63133 (project groff):

[comment #9 comment #9:]
> [comment #8 comment #8:]
> > The underlying issue, with pdfroff, was fixed by
> >
[https://osdn.net/users/keith/pf/groff-pdfmark/scm/commits/5d88cef1407d5bb625a1c23a888976f6efa80fab
commit 5d88cef1407d5bb625a1c23a888976f6efa80fab]:

> > 2023-02-24  Keith Marshall  
> > 
> > Do not emit redundant 'pdfhref Z' records.
> > 
> > * pdfroff.sh [grohtml-info] (pdfhref Z): Adapt awk script, to emit...
> > (pdfhref Z 0 0 0): ...this conditionally, only if at least one prior
> > record has been emitted; delete unconditional emission, which caused
> > the anomaly reported as groff issue #63133.


> > 
> > Okay to close?
> 
> Hi Keith,
> 
> I'd prefer not to close it here since it still affects groff's
> pdfroff and therefore likely the 1.23.0 release.
> 
> Unless we cherry-pick the fix...

Okay.  You might consider just copying my latest pdfroff.sh, accompanying
pdfroff.1.man, and everything in my tmac/ subtree, *except* s.tmac, (which is
just a verbatim copy of yours, at the time I forked groff-pdfmark, and yours
has evolved since then), but I'll leave it to your discretion.

> BTW, are you sure about that commit link?

Oops! It looks like I copied, and pasted the wrong link; it should have been
[https://osdn.net/users/keith/pf/groff-pdfmark/scm/commits/69c99bee3ce93ddaae89026d61cea9bc75ecf453
commit #69c99bee]; (I should have noticed that the hash wasn't as I
expected).

> It seems to go to this change:

> Clean up Z-shell initialization logic.
> 
> * pdfroff.sh [ZSH_VERSION]: Tidy initialization code for...
> (NULLCMD, emulate sh): ...these; bring it more into alignment with
> contemporary GNU autoconf usage.


Indeed.  That's the immediate parent of the intended commit.

> In any case I'll take responsibility for it, on the assumption I'll
> be able to cherry-pick, and mark it "Confirmed" for want of a status
> that means "fix available elsewhere".

Okay; I'll leave it with you.


___

Reply to this item at:

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

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




[bug #63133] [pdfroff] throws warning on any document if -ww given

2023-04-05 Thread Keith Marshall
Follow-up Comment #8, bug #63133 (project groff):

The underlying issue, with pdfroff, was fixed by
[https://osdn.net/users/keith/pf/groff-pdfmark/scm/commits/5d88cef1407d5bb625a1c23a888976f6efa80fab
commit 5d88cef1407d5bb625a1c23a888976f6efa80fab]:

2023-02-24  Keith Marshall  

Do not emit redundant 'pdfhref Z' records.

* pdfroff.sh [grohtml-info] (pdfhref Z): Adapt awk script, to emit...
(pdfhref Z 0 0 0): ...this conditionally, only if at least one prior
record has been emitted; delete unconditional emission, which caused
the anomaly reported as groff issue #63133.


Okay to close?


___

Reply to this item at:

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

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




[bug #63827] withdraw contrib/pdfmark

2023-03-05 Thread Keith Marshall
Follow-up Comment #12, bug #63827 (project groff):

[comment #11 comment #11:]
> [comment #10 comment #10:]
> > Should the 1.23 announcement/news mention that:
> > * the pdfmark bundled with this release of groff is not the latest code
(and provide a pointer to that code)?
> 
> I don't think they've diverged all that much.  ...
Sorry, but I beg to differ.  Since I forked it, I have added quite a
significant amount of new content to pdfmark.ms, (and hence to pdfmark.pdf). 
I've also improved, and sometimes corrected, a few features of pdfroff.sh
operation, corrected some issues which I've identified in pdfmark.tmac, and
added the new toc.tmac facility, to improve table of contents generation
capabilities.

I no longer maintain a free-standing ChangeLog file, within my repository, but
can generate one on demand, from the mercurial log; I've attached a copy of
that, spanning the period from the time of the fork, up to the latest
published commit, from which you should be able to glean some idea of the
changes I've already published.

In addition to my published changes, I have a queue of some 16 local patches,
yet to be finalized, but I anticipate fairly imminent publication of several
of them.

(file #54446)

___

Additional Item Attachment:

File name: ChangeLog  Size:17 KB




___

Reply to this item at:

  

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




[bug #60927] improve pdfmark documentation, including pdfroff(1)

2023-02-27 Thread Keith Marshall
Follow-up Comment #4, bug #60927 (project groff):

[comment #3 comment #3:]
> [comment #2 comment #2:]
> > Further work is still required, to cover the semantics of pdfroff(1),
> 
> Should this further work be documented in a ticket on OSDN?
I plan to cover it in section 4 of pdfmark.pdf, which I am currently working
on, so a specific ticket should not be necessary at this stage.  However, if
there are any specific topics, which you think I may otherwise overlook,
please do feel free to open a ticket.


___

Reply to this item at:

  

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




[bug #63827] withdraw contrib/pdfmark

2023-02-25 Thread Keith Marshall
Follow-up Comment #9, bug #63827 (project groff):

[comment #8 comment #8:]
> [comment #6 comment #6:]
> > [comment #3 comment #3:]
> > > ...
> > > groff's man pages all have that logic at the top and bottom that
> > > takes the body of the page out of compatibility mode, ...
> > As already noted in bug #63133 comment #1
, your code, to do that:
> [snip]
> > doesn't work on groff-1.22.x and earlier, (because those older
> > groff versions do not grok the 'cp' register).
> 
> [suggested replacement]:
> 
> .\" Save and disable compatibility mode (e.g., for Solaris 10/11).
> .nr _C \n(.C
> .do rnn _C *groff_pdfroff_1_man_C
> .cp 0
> 
> 
> This is similar to something I've had in my man.local for quite a while.
> 
> 
> .if \n(.x=1&\n(.y<23 \{
> .  \" Construct an equivalent of groff 1.23's .cp register.
> .  nr }{ \n(.C
> .  do nr .cp \n(}{
> .\}
> 
> 
> I'm not sure which I like better.  Yours does have appeal.
Either _should_ work, I think.  As you might expect, I tend to favour mine,
not just because it is _mine_, but because:
* It doesn't introduce any conditional version dependency; (feature test
conditions should _always_ trump version tests, but it doesn't even depend of
a feature test).
* It doesn't pollute the register namespace with a 'cp' register, which
wouldn't otherwise be present, and shouldn't be needed, (_unless_ there is
_another_ version dependency, within the document stream, which requires it).


___

Reply to this item at:

  

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




[bug #63827] withdraw contrib/pdfmark

2023-02-24 Thread Keith Marshall
Follow-up Comment #6, bug #63827 (project groff):

[comment #3 comment #3:]
> ...
> groff's man pages all have that logic at the top and bottom that
> takes the body of the page out of compatibility mode, ...
As already noted in bug #63133 comment #1
, your code, to do that:

.\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
.do nr *groff_pdfroff_1_man_C \n[.cp]
.cp 0

doesn't work on groff-1.22.x and earlier, (because those older groff versions
do not grok the 'cp' register).  I think that we should endeavour to support
such older versions, at least for as long as contemporary software
distributions continue to deliver 1.22.x; thus, unless you can see anything
obviously wrong with it, I plan to replace this, in my pdfroff.1.man, with the
following, (as reflected in the attached patch):

.\" Save and disable compatibility mode (e.g., for Solaris 10/11).
.nr _C \n(.C
.do rnn _C *groff_pdfroff_1_man_C
.cp 0

which does appear to work, on groff-1.22.4 ... at least insofar as it doesn't
raise any warnings, when run with '-ww'.

(file #54393)

___

Additional Item Attachment:

File name: manpage-compatibility-save.patch Size:1 KB
   




___

Reply to this item at:

  

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




[bug #63827] withdraw contrib/pdfmark

2023-02-24 Thread Keith Marshall
Follow-up Comment #5, bug #63827 (project groff):

[comment #3 comment #3:]
> [comment #2 comment #2:]
> > ...
> > More importantly, my simple implementation relies on the '!d'
> > conditional, which I suspect may be groff-specific, (is it?),
> 
> Yes.  Subsection "Conditional expressions" of groff_diff(7) covers
> it, and the other extensions.
Thanks, but there is no such subsection, in the version of groff_diff(7) on my
Manjaro (Arch Linux) system.  The information is there, but not so easily
found.  In any event, I had been perusing 'info groff', which -- again in the
installed version -- does not make it clear that '.if d...' is a groff
extension, at the point where the conditional operators are described.
> ...
> > if we are concerned about non-groff compatibility,
> 
> The test is not so much for implementation of groff extensions as
> the likelihood of the `MR` macro being already defined by that
> implementation.  If one exists, I don't want to clobber it because
> it can do much more than just typeset the arguments.  It can embed
> hyperlinks on supporting output devices.
Provided the implementation which does exist will DTRT, w.r.t. the
expectations from using the groff >= 1.23 implementation, sure.  But if you
don't know for sure that any existing implementation mimics groff >= 1.23
behaviour, all bets are off; you surely *do* want to clobber it. 
> groff's man pages all have that logic at the top and bottom that
> takes the body of the page out of compatibility mode,
Sure, but what if that compatibility save, disable, then restore hack doesn't
work?  If the page source is passed through a formatter which doesn't support
the 'do' and 'cp' requests, or otherwise support groff extended syntax, then
all kinds of output garbage may ensue.
> and the pages generally use groff extensions like special characters
> that aren't documented in CSTR #54, often using the \[foo] syntax
> that also wasn't supported by AT troff.
In which case, attempting to retain even a modicum of support for legacy
formatting engines is likely a forlorn venture, so why bother?
> > can we safely use long register names, such as your 'do-fallback'?
> 
> I think we can, because Heirloom, mandoc(1), and older groffs
> support them.
I'm inclined to disagree, only to the extent that any legacy formatter may be
confused by them, but maybe I'm just being excessively pedantic.
> The idea is to get something that works on Heirloom Doctools troff,
> mandoc, and older versions of groff.  This doesn't work perfectly in
> general, but for the MR feature specifically, it does.
Fair enough, provided we're happy to abandon any hope of legacy formatter
support otherwise.


___

Reply to this item at:

  

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




[bug #63827] withdraw contrib/pdfmark

2023-02-23 Thread Keith Marshall
Follow-up Comment #2, bug #63827 (project groff):

[comment #1 comment #1:]
> Some changes, since then I already have captured, in some shape or
> form; some others, (at least one of which looks suspiciously wrong,
> to me...
I guess I shouldn't make such statements, without corroboration.  I had
planned to point out the utterly borked MR fallback, but I see you've reworked
it today!  FWIW, I had already implemented my own -- simpler -- fallback, in
my fork of pdfroff.1.man:

.if !d MR \{\
.\" This document uses the MR macro, which was not available prior
.\" to groff-1.23; this minimal local fallback emulation may suffice
.\" to support formatting with earlier versions of groff.
.de MR
.IR \%\\$1 (\\$2)\\$3
..
.\}

Granted, that doesn't address the possibility that MR might be invoked with
fewer than two arguments -- because pdfroff.1.man never calls it with fewer --
but that's a trivial adjustment, for the more general case.  More importantly,
my simple implementation relies on the '!d' conditional, which I suspect may
be groff-specific, (is it?), in which case, I need to address that.  However,
on a related note, if we are concerned about non-groff compatibility, can we
safely use long register names, such as your 'do-fallback'?


___

Reply to this item at:

  

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




[bug #63133] [pdfroff] throws warning on any document if -ww given

2023-02-23 Thread Keith Marshall
Follow-up Comment #6, bug #63133 (project groff):

[comment #5 comment #5:]
> Bug #63827 is now open to track the removal of pdfmark from the
> groff git repository.  The following is more relevant to that bug,
And I will follow up there.
> but I'm starting it here because it's a reply to a comment here,
> and Keith is already cc:ed here.
Indeed, but I'm also subscribed to bug #63827.


___

Reply to this item at:

  

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




[bug #63827] withdraw contrib/pdfmark

2023-02-23 Thread Keith Marshall
Follow-up Comment #1, bug #63827 (project groff):

bug #63133 comment #5: 
> Bug #63827 is now open to track the removal of pdfmark from the
> groff git repository.  The following is more relevant to that bug,
> but I'm starting it here because it's a reply to a comment here,
> and Keith is already cc:ed here.
> 
> comment #3: 
> > Agreed.  I have, indeed, added significant new content to
> > pdfmark.pdf, (via pdfmark.ms), and some pdfroff enhancements,
> > which are not now included in groff's contrib/pdfmark tree.
> 
> There have also been 12 commits that have touched groff's
> contrib/pdfmark tree since the 2021-11-13 creation of the OSDN
> pdfmark, according to:
> 
> git log --since 2021-11-13 contrib/pdfmark
> 
> I presume these haven't been reflected in OSDN.
Some have, albeit not in exactly the same manner; some of the others, I will
address shortly.
> Many of them are part of larger changes to the groff code base,
> and may or may not be necessary
Those which impact, primarily, on the build infrastructure, are irrelevant; I
do not use automake, (and will not entertain doing so); I *do* use GNU make,
and make no apology for introducing GNU make specific constructs, within my
makefile.
> to keep the two interoperating happily, but someone familiar with
> the code will have to make that call for each change.
I'll be happy to look into any concerns; please feel free to bring any to my
attention, either by commenting on this ticket, or by opening one on my OSDN
groff-pdfmark ticket page
; (you may need to
create a personal OSDN account, for the latter).
> (This presumes that the OSDN repository was created from the latest
> groff git contrib/pdfmark at the time;
It was.
> if it was spawned from another source, there might be more
> divergence.)
Everything, up to the date of the fork, I have captured.  Some changes, since
then I already have captured, in some shape or form; some others, (at least
one of which looks suspiciously wrong, to me), I may need to address.


___

Reply to this item at:

  

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




[bug #63133] [pdfroff] throws warning on any document if -ww given

2023-02-21 Thread Keith Marshall
Follow-up Comment #3, bug #63133 (project groff):

[comment #2 comment #2:]
> Long story short, the `.C` register didn't work for some of the use cases
people had for it, including the one seen above.
Yep.  The interaction between compatibility mode and '.C' is kind of tricky
... when compatibility mode is on, it needs to be interpolated using the
'\n(.C' syntax, because the '\n[.C]' syntax isn't "compatible":

$ printf '.cp 0\n.tm .C = \\n[.C]\n' | groff -ww > /dev/null
.C = 0
$ printf '.cp 1\n.tm .C = \\n[.C]\n' | groff -ww > /dev/null
.C = troff: :2: warning: number register '[' not defined
0.C]
$ printf '.cp 1\n.tm .C = \\n(.C\n' | groff -ww > /dev/null
.C = 1

Interaction with the '.do' request compounds the trickiness:

$ printf '.cp 1\n.do tm .C = \\n[.C]\n' | groff -ww > /dev/null
.C = 0
$ printf '.cp 1\n.do tm .C = \\n(.C\n' | groff -ww > /dev/null
.C = 0

It appears that the '.do' takes effect *before* the remainder of the request
line, (and in particular, the '\n(.C' evaluation), is parsed.  Thus, within
the scope of '.do', '\n(.C' must *always* evaluate to zero.  This isn't made
particularly clear, in the relevant groff documentation.
> This went unnoticed for a long time, I think, because relatively few people
tried to render many groff man pages in series using a single invocation of
the formatter.
Or ... perhaps more likely ... few people use groff directly, to render
manpages, and even those who may have done so didn't think to add the '-ww'
option?
> > Please note that this wider issue is not even related to pdfroff:
> > 
> > $ groff -ww -man src/roff/groff/groff.1 > /dev/null
> > troff: src/roff/groff/groff.1:25: warning: number register '.cp' not
defined
> > 
> > Does this merit its own bug report?
> 
> I don't think so.  It was a deliberate feature change.  I infer that you're
running the above commands using groff 1.22.4
Yes; it's what is installed by default, by the Manjaro derivative of Arch
Linux, (which is my current distro of choice).
> (else you wouldn't get the diagnostic message, which also hasn't been worded
that way since before commit 31e8ff9daf on 30 June 2021.
Fair enough.  I noticed it when formatting up-to-date pdfroff.1.man with
similarly up-to-date pdfroff, and with '-ww' in effect, per this ticket, but
underpinned by the system-native groff installation.
> On another subject:
> 
> > in my own groff-pdfmark development fork
.
> 
> In bug #63590, you expressed disinterest in maintaining pdfmark in the groff
source tree.
I no longer feel comfortable committing directly to the groff repo, following
the debacle when you deleted a published branch ...
> Would you prefer to make your OSDN the official pdfmark resource?
so yes, I would prefer to keep control of my own development tree.
> I don't think it would do anyone any good for contrib/pdfmark to bit-rot in
groff's contrib.
Agreed.  I have, indeed, added significant new content to pdfmark.pdf, (via
pdfmark.ms), and some pdfroff enhancements, which are not now included in
groff's contrib/pdfmark tree.


___

Reply to this item at:

  

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




[bug #63133] [pdfroff] throws warning on any document if -ww given

2023-02-20 Thread Keith Marshall
Follow-up Comment #1, bug #63133 (project groff):

[comment #0 original submission:]
> Affects groff 1.22.4.
> 
> 
> $ echo | pdfroff -ww >/dev/null
> troff: /tmp/branden/pdfroff-ehedRan1l8/pdf41844.cmp:1: warning: macro
'pdfhref' not defined
> 

Obviously, since your test case doesn't load any PDF related macro sets,
pdfhref is not going to be defined.

I do appreciate the minimalism of your test case; with the addition of the
'--keep-temporary-files' option, it becomes trivially easy to identify the
source of the spurious 'pdfhref' reference.  However, since it runs pdfroff,
with no attempt to incorporate *any* PDF features, does it really provide a
compelling incentive to pursue the issue?  I hardly think so, but I *can* find
such an incentive in the '%.pdf:%.man' Makefile.in rule, in my own
groff-pdfmark development fork
. 
Specifically, (if I edit the generated Makefile, to remove the
'--no-reference-dictionary' and '--no-toc-relocation' options, the former of
which prevents the issue from arising, but then requires the latter to avoid
duplication of output), when I invoke this, I see:

$ make -C wip/build/ pdfroff.1.pdf MAN2PDF_FLAGS=-ww
make: Entering directory '/home/keith/projects/groff-pdfmark/wip/build'
/usr/bin/sed -e 's!@VERSION@!1.23.0!' -e 's!@MDATE@!20 February 2023!' -e
's!@PDFDOCDIR@!/usr/local/share/doc/!' -e 's!@MAN\([1-9]\)EXT@!\1!g'
../../pdfroff.1.man | GROFF_TMAC_PATH=../../tmac /bin/sh ./pdfroff -man -ww >
pdfroff.1.pdf
troff: ./pdfroff-jfeZdKTQvb/pdf19949.cmp:1: warning: macro 'pdfhref' not
defined
troff: :30: warning: number register '.cp' not defined
make: Leaving directory '/home/keith/projects/groff-pdfmark/wip/build'

This does, indeed, reproduce the issue which you report, (and I do have a
practical solution, *without* requiring the '--no-reference-dictionary'
option).  However, it also reveals a more insidious issue, (viz. the reference
to undefined '.cp' number register), which appears to be endemic among the
entire corpus of manpage sources, throughout the groff code base; it appears
to have been introduced by:

$ hg annotate src/roff/groff/groff.1.man
...
3963: .\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
3963: .do nr *groff_groff_1_man_C \n[.cp]
3963: .cp 0
...

$ hg log -r 3963
changeset:   3963:01c8e28fa4bd
user:G. Branden Robinson 
date:Sun Oct 18 22:56:32 2020 +1100
summary: man pages: Make preambles consistent.

Please note that this wider issue is not even related to pdfroff:

$ groff -ww -man src/roff/groff/groff.1 > /dev/null
troff: src/roff/groff/groff.1:25: warning: number register '.cp' not defined

Does this merit its own bug report?


___

Reply to this item at:

  

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




[bug #63590] [pdfmark] some spelling mistakes found with "codespell"

2023-01-01 Thread Keith Marshall
Update of bug #63590 (project groff):

 Assigned to:   keithmarshall => None   


___

Reply to this item at:

  

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




[bug #63590] [pdfmark] some spelling mistakes found with "codespell"

2023-01-01 Thread Keith Marshall
Follow-up Comment #2, bug #63590 (project groff):

Thanks for flagging these typos; I committed
https://osdn.net/users/keith/pf/groff-pdfmark/scm/commits/c0904b57e9b63b369e627d45a067ce97b289d777
to my master repo, (and this is as far as I will pursue the matter).

I am rejecting any suggestion that "co-ordinate" is misspelled; it is
completely correct, according to my 1960's UK grammar school education, and
confirmed by my 1979 printing of the 6th edition of the Concise Oxford
Dictionary of English.

Furthermore, I would point out that the "connot" reference, although
misspelled, is actually correct in the ChangeLog context in which it appears,
and the misspelled "enviroment" reference is not my typo.  In any case, since
I no longer maintain a free-standing ChangeLog file, (having deprecated it in
favour of the mercurial commit log), I will be taking no associated corrective
action.


___

Reply to this item at:

  

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




[bug #60927] improve pdfmark documentation, including pdfroff(1)

2022-03-01 Thread Keith Marshall
Follow-up Comment #2, bug #60927 (project groff):

An expanded version of the pdfmark.pdf publication may be found at
https://osdn.net/users/keith/pf/groff-pdfmark/wiki/FrontPage

Further work is still required, to cover the semantics of pdfroff(1), but
section 2 does now provide substantially complete coverage of cross-reference
mark-up, and section 3 now covers ms document structuring considerations,
including the use of macros such as XH, XN, and their user-redefinable hooks,
for mark-up of section headings.

___

Reply to this item at:

  

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




[bug #61371] [PATCH] [tbl]: tbl.1.man: use neutral wording "decimal separator" in place of English specific "decimal point" and "dot"

2021-11-08 Thread Keith Marshall
Follow-up Comment #11, bug #61371 (project groff):

[comment #10 comment #10:]
> ...
> Keith's claim that "decimal separator" is "invalid terminology" is
> contradicted by Wikipedia's extensive, and extensively annotated, entry for
the term ,
> ...
Wikipedia is *not* authoritative.  Besides, the documentation in question *is*
in the the English language, so English-specific terminology is appropriate.

*Neither* the Oxford Dictionary of UK English ,
(formerly the Oxford Dictionary of World English, and AFAIK, authoritative
throughout the English-speaking world, outside the sphere of influence of the
USA), *nor* [www.merriam-webster.com/dictionary Merriam-Webster],
(authoritative in the US English-speaking world), offers *any* definition for
the term "decimal separator"; *both* define "decimal point", (with a more
comprehensive definition in Merriam-Webster).

POSIX.1-2017

consistently uses the "decimal point" terminology, (with "separator" *only*
applied to thousands digit grouping).

Nonetheless, if you wish to engender a impression of utter technical
ineptitude, by all means adopt this asinine change in terminology ... I really
couldn't care less, any more.

___

Reply to this item at:

  

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




[bug #58946] [ms] adapt to use the facilities of pdfmark

2021-11-02 Thread Keith Marshall
Update of bug #58946 (project groff):

 Assigned to:   keithmarshall => None   


___

Reply to this item at:

  

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




Re: [groff] 05/14: tbl(1): Say decimal "separator", not "point".

2021-11-01 Thread Keith Marshall
On 01/11/2021 13:19, G. Branden Robinson wrote:
> gbranden pushed a commit to branch master
> in repository groff.
> 
> commit a0ec5ffd258b9f54daa46b88471ec837e8213ad1
> Author: Bjarni Ingi Gislason 
> AuthorDate: Sun Oct 31 00:42:09 2021 +
> 
> tbl(1): Say decimal "separator", not "point".

Surely, the correct English-language terminology is "radix point", (and
where the radix is "decimal", this becomes "decimal point").  It is
irrelevant whether the prevailing convention, of the user's locale, is
to represent the radix point by a comma, or a period, we do *not* refer
to a "decimal comma", or a "decimal period", (or a "decimal dot"); the
correct terminology is "decimal point".

This change introduces invalid terminology, and should be reverted.



Re: Git, where zombie branches shamble again

2021-11-01 Thread Keith Marshall
On 01/11/2021 14:01, G. Branden Robinson wrote:
> At 2021-10-24T18:53:52-0700, Larry McVoy wrote:
>> On Mon, Oct 25, 2021 at 11:58:55AM +1100, G. Branden Robinson wrote:
>>> Since I am now accused four times over of rewriting history, and
>>> moreover of violating an "absolute taboo", I must insist upon the
>>> presentation of particulars.
>>
>> Hi, I'm the BitKeeper guy, nobody knows who I am but BitKeeper was
>> the first distributed source management system, hg, git, etc are
>> copies, I'm the guy that figured this model out.
> 
> Fear not!  I've known your name and (some of) your work for many years.
> 
>> If you did not rewrite history, which means you changed things so
>> that a pull won't work or will create a massive merge mess, then
>> you are fine.
> 
> As far as _I_ can tell, neither of these has taken place.

Seriously?  You absolutely _did_ rewrite history ... not just once, but
twice!  You deleted an _entire branch_ of published development history,
then after my subsequent push had reinstated it, you deleted it once
again!  If that isn't rewriting history, then I'd like to know what you
would call it.

Now, I'm sure you made this mistake in ignorance, rather than with any
malicious intent, but it was a history rewriting mistake nonetheless.
Two things which you should never do, after anything has been pushed to
a public repository: you should not rebase any of it; neither should you
delete any of it.

>> The taboo is once you have some history, don't change that because
>> all of the clones of your public repository depend on that history.
> 
> Agreed, and this is consistent with everything I've learned about
> distributed revision control.

Yet you ignored what you suggest you have learned; you _did_ change some
of that (published) history, by deleting an entire branch of it.

>> I'd be happy to get on the phone with you if I could help.  While
>> I may be an SCM guy, I've been a groff fan for decades.  Love to
>> help.
> 
> I appreciate the offer.  I let this issue lie for a few days so Keith
> could lay out the particulars of my cardinal sin, but none have proven
> forthcoming.

Frankly, I thought you might have been smart enough to work it out for
yourself.

> Without an accurate description of damage done (if any) to the
> repository, there is no way anyone can repair it.  And if there is none,
> then charges of rewriting history are overblown, unwarranted, and
> unfriendly.

Claims that you have not done what you so clearly have, are frankly
disingenuous.  The damage done may not be critical, insofar as we may be
able to live without that deleted branch, but a possibility remains,
that it could find its own way back at some future date; indeed, I still
have a local clone, in which that history remains ... 54 commits, per
attached deleted-history.log, (produced by 'hg outgoing' from that ...
now outdated ... clone).comparing with git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
searching for changes
changeset:   4451:aa614de6cbd7
user:Bertrand Garrigues 
date:Sat Apr 03 01:35:46 2021 +0200
summary: Add Deri James'extension to gropdf to draw boxes and sboxes macros.

changeset:   4452:26a3eeeca527
user:G. Branden Robinson 
date:Sun Apr 04 19:19:24 2021 +1000
summary: doc/groff.texi: Remove stray word from recast.

changeset:   4453:6de33277812e
user:G. Branden Robinson 
date:Sun Apr 04 19:20:46 2021 +1000
summary: doc/ms.ms: Fix style nits.

changeset:   4454:a4d08bdbf325
user:G. Branden Robinson 
date:Sun Apr 04 20:43:23 2021 +1000
summary: [docs]: Improve hyphenation discussion.

changeset:   4455:1b6b08cc0806
user:G. Branden Robinson 
date:Mon Apr 05 11:12:26 2021 +1000
summary: doc/groff.texi: Remove unnecessary command.

changeset:   4456:2ec5537895d5
user:G. Branden Robinson 
date:Tue Apr 06 14:50:08 2021 +1000
summary: [docs]: Revise hyphenation discussion.

changeset:   4457:c8c5fbb97eec
user:Dave Kemper 
date:Tue Apr 06 10:48:33 2021 +
summary: [nroff]: Support and document -k and -K options.

changeset:   4458:889e0caf1781
user:G. Branden Robinson 
date:Wed Apr 07 17:07:05 2021 +1000
summary: ChangeLog: Log Dave's fix for Savannah #60349.

changeset:   4459:bffdf9b90c1a
user:G. Branden Robinson 
date:Wed Apr 07 17:58:07 2021 +1000
summary: doc/groff.texi: Fix content and style nits.

changeset:   4460:4c61f307235d
user:G. Branden Robinson 
date:Fri Apr 09 09:37:37 2021 +1000
summary: doc/groff.texi: Fix content nits.

changeset:   4461:eb94463e8aca
user:G. Branden Robinson 
date:Fri Apr 09 10:17:34 2021 +1000
summary: [ms]: Update footnote documentation.

changeset:   4462:3f8b00ff6bd7
user:G. Branden Robinson 
date:Fri Apr 09 12:14:27 2021 +1000
summary: doc/groff.texi (I/O): Shift sentence.

changeset:   4463:9f4f825eec09

Re: Git, where zombie branches shamble again

2021-11-01 Thread Keith Marshall via Groff-commit
On 01/11/2021 14:01, G. Branden Robinson wrote:
> At 2021-10-24T18:53:52-0700, Larry McVoy wrote:
>> On Mon, Oct 25, 2021 at 11:58:55AM +1100, G. Branden Robinson wrote:
>>> Since I am now accused four times over of rewriting history, and
>>> moreover of violating an "absolute taboo", I must insist upon the
>>> presentation of particulars.
>>
>> Hi, I'm the BitKeeper guy, nobody knows who I am but BitKeeper was
>> the first distributed source management system, hg, git, etc are
>> copies, I'm the guy that figured this model out.
> 
> Fear not!  I've known your name and (some of) your work for many years.
> 
>> If you did not rewrite history, which means you changed things so
>> that a pull won't work or will create a massive merge mess, then
>> you are fine.
> 
> As far as _I_ can tell, neither of these has taken place.

Seriously?  You absolutely _did_ rewrite history ... not just once, but
twice!  You deleted an _entire branch_ of published development history,
then after my subsequent push had reinstated it, you deleted it once
again!  If that isn't rewriting history, then I'd like to know what you
would call it.

Now, I'm sure you made this mistake in ignorance, rather than with any
malicious intent, but it was a history rewriting mistake nonetheless.
Two things which you should never do, after anything has been pushed to
a public repository: you should not rebase any of it; neither should you
delete any of it.

>> The taboo is once you have some history, don't change that because
>> all of the clones of your public repository depend on that history.
> 
> Agreed, and this is consistent with everything I've learned about
> distributed revision control.

Yet you ignored what you suggest you have learned; you _did_ change some
of that (published) history, by deleting an entire branch of it.

>> I'd be happy to get on the phone with you if I could help.  While
>> I may be an SCM guy, I've been a groff fan for decades.  Love to
>> help.
> 
> I appreciate the offer.  I let this issue lie for a few days so Keith
> could lay out the particulars of my cardinal sin, but none have proven
> forthcoming.

Frankly, I thought you might have been smart enough to work it out for
yourself.

> Without an accurate description of damage done (if any) to the
> repository, there is no way anyone can repair it.  And if there is none,
> then charges of rewriting history are overblown, unwarranted, and
> unfriendly.

Claims that you have not done what you so clearly have, are frankly
disingenuous.  The damage done may not be critical, insofar as we may be
able to live without that deleted branch, but a possibility remains,
that it could find its own way back at some future date; indeed, I still
have a local clone, in which that history remains ... 54 commits, per
attached deleted-history.log, (produced by 'hg outgoing' from that ...
now outdated ... clone).comparing with git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
searching for changes
changeset:   4451:aa614de6cbd7
user:Bertrand Garrigues 
date:Sat Apr 03 01:35:46 2021 +0200
summary: Add Deri James'extension to gropdf to draw boxes and sboxes macros.

changeset:   4452:26a3eeeca527
user:G. Branden Robinson 
date:Sun Apr 04 19:19:24 2021 +1000
summary: doc/groff.texi: Remove stray word from recast.

changeset:   4453:6de33277812e
user:G. Branden Robinson 
date:Sun Apr 04 19:20:46 2021 +1000
summary: doc/ms.ms: Fix style nits.

changeset:   4454:a4d08bdbf325
user:G. Branden Robinson 
date:Sun Apr 04 20:43:23 2021 +1000
summary: [docs]: Improve hyphenation discussion.

changeset:   4455:1b6b08cc0806
user:G. Branden Robinson 
date:Mon Apr 05 11:12:26 2021 +1000
summary: doc/groff.texi: Remove unnecessary command.

changeset:   4456:2ec5537895d5
user:G. Branden Robinson 
date:Tue Apr 06 14:50:08 2021 +1000
summary: [docs]: Revise hyphenation discussion.

changeset:   4457:c8c5fbb97eec
user:Dave Kemper 
date:Tue Apr 06 10:48:33 2021 +
summary: [nroff]: Support and document -k and -K options.

changeset:   4458:889e0caf1781
user:G. Branden Robinson 
date:Wed Apr 07 17:07:05 2021 +1000
summary: ChangeLog: Log Dave's fix for Savannah #60349.

changeset:   4459:bffdf9b90c1a
user:G. Branden Robinson 
date:Wed Apr 07 17:58:07 2021 +1000
summary: doc/groff.texi: Fix content and style nits.

changeset:   4460:4c61f307235d
user:G. Branden Robinson 
date:Fri Apr 09 09:37:37 2021 +1000
summary: doc/groff.texi: Fix content nits.

changeset:   4461:eb94463e8aca
user:G. Branden Robinson 
date:Fri Apr 09 10:17:34 2021 +1000
summary: [ms]: Update footnote documentation.

changeset:   4462:3f8b00ff6bd7
user:G. Branden Robinson 
date:Fri Apr 09 12:14:27 2021 +1000
summary: doc/groff.texi (I/O): Shift sentence.

changeset:   4463:9f4f825eec09

[bug #55107] PDFPIC: .psbb: support extraction of MediaBox from pdf files

2021-10-30 Thread Keith Marshall
Follow-up Comment #12, bug #55107 (project groff):

Deri,

[comment #10 comment #10:]
> If you read the email referenced by Branden in comment #4
> You will see that I have answered your question, I apologise if
> you had difficulty understanding my answer regarding CropBox,
> I'm happy to try and explain it again, if needed.
Sorry, but I never saw that e-mail, and I certainly don't see an answer to my
question, or indeed any reference to CropBox, in what Branden quoted in
comment #4.  You confused me, when you omitted an appropriate link in comment
#3; I will look at the reference Branden suggested, when I have time.
> My proposal (D) was never intended to be a .pdfbb replacement (nor .psbb),
remember this ticket concerns problems with .PDFPIC
No, it doesn't ... it relates to an original suggestion, from four years ago,
to extend the functionality of the built-in psbb request, so that it could
return bounding box co-ordinates from single image PDF files, just as it
originally did for just EPS files, and so that an eventual implementation of
PDFPIC could avoid unsafe forks of third party tools, such as pdfinfo.
> If accusing someone on a public forum of holding you up by not answering
your question (when they have helpfully done so), is considered disgusting
language, perhaps we can be a bit less perl!
I accused you of nothing of the sort!  1) You are not holding me up in any
way, because this ticket is of only minor interest to me; I have plenty of
other tasks to occupy my time, and 2) it wasn't your apparent failure to
answer my question, (because I never saw your e-mail), that I considered to be
disgusting ... it is the perl language itself, to which I attribute that
description.

___

Reply to this item at:

  

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




[bug #55107] PDFPIC: .psbb: support extraction of MediaBox from pdf files

2021-10-30 Thread Keith Marshall
Follow-up Comment #9, bug #55107 (project groff):

Branden,

[comment #7 comment #7:]
> > but troff then incurs the overhead of setting up an IPC pipeline, to
capture the preprocessor output, then fork the preprocessor,
> 
> groff already handles all of this.
I don't think that it does...
> Some of the most important bits are:
> 
>
https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/groff/groff.cpp#n54
>
https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/groff/groff.cpp#n576
> https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/groff/pipeline.c
> 
> ...or I am badly misunderstanding you.
Consider pre-grohtml; that *isn't* run within groff's normal pipeline; it is
forked, with its own subsidiary pipeline, as and when required.  One of my
earliest contributions to groff was to make that subsidiary pipeline setup,
and the associated fork, MS-Windows compatible, and I would anticipate a
similar overhead, if psbb were to be delegated to a preprocessor.


___

Reply to this item at:

  

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




[bug #55107] PDFPIC: .psbb: support extraction of MediaBox from pdf files

2021-10-30 Thread Keith Marshall
Follow-up Comment #8, bug #55107 (project groff):

[comment #5 comment #5:]
> Am I correct in guessing that a bounding box/MediaBox extractor would have a
lot of shared logic for PS and PDF?
No.  I wrote my proposed extractor as a lex/yacc parser; from its initial
state, it diverges into two entirely distinct branches of execution, on the
basis of whether the first few bytes of the image file are '%!PS-Adobe-' or
'%PDF-', (and aborts, if anything else); the two branches converge only at the
bitter end, when the yacc terminal rule (ultimately) assigns the troff
bounding box registers.

FWIW, my EPS parsing code is feature complete.  OTOH, the PDF parsing for PDF
works only for PDF-1.4 conformant files, (it lacks rules for interpretation of
XRefStm objects, Object streams, and deflated content).  The "significant
development", to which I referred, is extend the existing lex pattern set, and
yacc grammar, to support those additional features, (if required).

Personally, I don't see a justification for implementing psbb as a
preprocessor.  I am willing to pursue an extended lex/yacc implementation,
(subject to Deri actually answering the question I've now asked twice, without
a response: should CropBoxes, or any of PDF's other bounding box attributes,
have precedence over the MediaBox attributes?), but if you insist on pursuing
a solution in Perl ... a disgusting language, IMO ... then I'm out.

___

Reply to this item at:

  

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




[bug #55107] PDFPIC: .psbb: support extraction of MediaBox from pdf files

2021-10-30 Thread Keith Marshall
Follow-up Comment #6, bug #55107 (project groff):

Branden,

[comment #2 comment #2:]
> I have [an] historical question.
> 
> Does anyone know why `psbb` wasn't made a preprocessor in the first place? 
...
Sorry, I don't know; the choice was made, w.r.t. EPS files, before my
association with the project began.  I can imagine, however, it may be a
matter of convenience, because by having the psbb parsing code accessible as
linked in functions, the assignment to troff's internal registers is
straightforward, whereas, if the parsing is delegated to a preprocessor, not
only does that preprocessor have to implement the same parsing logic, but
troff then incurs the overhead of setting up an IPC pipeline, to capture the
preprocessor output, then fork the preprocessor, and ultimately, reinterpret
the preprocessor output to assign the requisite register values.

___

Reply to this item at:

  

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




[groff] 01/01: Remove duplicate ChangeLog entries.

2021-10-24 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch master
in repository groff.

commit 7e6bd6008a8f96287ed83bd6b90311319bad1188
Author: Keith Marshall 
AuthorDate: Sun Oct 24 22:06:56 2021 +0100

Remove duplicate ChangeLog entries.
---
 ChangeLog |  8 
 contrib/pdfmark/ChangeLog | 18 --
 2 files changed, 26 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 48da2de..b5e97b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,14 +16,6 @@
indentation as preceding .DEVTAG-NH statement, but is overindented;
fix it.
 
-2021-10-24  Keith Marshall  
-
-   [ms]: Fix misleading NH macro indentation.
-
-   * tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
-   indentation as preceding .DEVTAG-NH statement, but is overindented;
-   fix it.
-
 2021-10-23  Keith Marshall  
 
[ms]: Defend against uncontrolled page trap recursion.
diff --git a/contrib/pdfmark/ChangeLog b/contrib/pdfmark/ChangeLog
index ad9fb44..3a4bdd0 100644
--- a/contrib/pdfmark/ChangeLog
+++ b/contrib/pdfmark/ChangeLog
@@ -9,24 +9,6 @@
(XH-REPLACEMENT, XN-REPLACEMENT): Define these, rather than...
(XH, XN): ...these, respectively.
 
-2021-10-24  Keith Marshall  
-
-   [ms]: Provide global default XH and XN implementations.
-
-   cf. <https://savannah.gnu.org/bugs/?58946#comment13>
-
-   * tmac/s.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC)
-   (XH, XN, XH-REPLACEMENT, XN-REPLACEMENT): Implement them, and...
-   * tmac/groff_ms.7.man: ...document them.
-
-2021-10-24  Keith Marshall  
-
-   [ms]: Fix misleading NH macro indentation.
-
-   * tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
-   indentation as preceding .DEVTAG-NH statement, but is overindented;
-   fix it.
-
 2021-10-02  Keith Marshall  
 
Make a minor layout adjustment.

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 02/03: [ms]: Provide global default XH and XN implementations.

2021-10-24 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch master
in repository groff.

commit a50942f656386f04ec91be3e8813ab75fc56519f
Author: Keith Marshall 
AuthorDate: Sun Oct 24 21:53:47 2021 +0100

[ms]: Provide global default XH and XN implementations.

cf. <https://savannah.gnu.org/bugs/?58946#comment13>

* tmac/s.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC)
(XH, XN, XH-REPLACEMENT, XN-REPLACEMENT): Implement them, and...
* tmac/groff_ms.7.man: ...document them.
---
 ChangeLog   |  18 ++
 tmac/groff_ms.7.man | 157 
 tmac/s.tmac |  49 
 3 files changed, 224 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 3d3ef44..48da2de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2021-10-24  Keith Marshall  
 
+   [ms]: Provide global default XH and XN implementations.
+
+   cf. <https://savannah.gnu.org/bugs/?58946#comment13>
+
+   * tmac/s.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC)
+   (XH, XN, XH-REPLACEMENT, XN-REPLACEMENT): Implement them, and...
+   * tmac/groff_ms.7.man: ...document them.
+
+2021-10-24  Keith Marshall  
+
+   [ms]: Fix misleading NH macro indentation.
+
+   * tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
+   indentation as preceding .DEVTAG-NH statement, but is overindented;
+   fix it.
+
+2021-10-24  Keith Marshall  
+
[ms]: Fix misleading NH macro indentation.
 
* tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
diff --git a/tmac/groff_ms.7.man b/tmac/groff_ms.7.man
index 135c76d..e4138f9 100644
--- a/tmac/groff_ms.7.man
+++ b/tmac/groff_ms.7.man
@@ -1960,6 +1960,163 @@ The width of the page number field is stored in the
 register.
 .
 .
+.P
+When creating a table of contents,
+incorporating content derived from headings specified by
+.B .NH
+and
+.B .SH ,
+traditional
+.I ms
+implementations provide no convenient mechanism
+for duplication of the heading text into the table of contents;
+.I groff ms
+mitigates this limitation,
+by providing the following pair of macros,
+(for use after
+.B .NH
+and
+.B .SH
+respectively):
+.
+.TP
+.BI .XN\~ text\ ...
+.TQ
+.BI .XH\~ outline\-level\ text\ ...
+Duplicate
+.I text\~...
+added to the body ot the document,
+to create a table of contents entry,
+(which may be indented in accordance with
+.IR outline\-level ).
+.
+.P
+Either,
+or both of
+.B XN
+and
+.B XH
+may be redefined by the user,
+(preferably by definition of the replacement hook macros,
+.BR \%XN\-REPLACEMENT ,
+and
+.B \%XH\-REPLACEMENT
+respectively);
+in their default implementations,
+both emit their
+.I text
+arguments into the body of the document,
+as heading text;
+they also pass this same text to the callback macro:
+.
+.TP
+.BI \%.XH\-UPDATE\-TOC\~ \%outline\-level\ text\ ...
+Encapsulate
+.I text
+within
+.BR \%.XS ... XE ,
+to create a table of contents entry.
+This macro is called by both
+.B .XN
+and
+.B .XH
+(no complementary
+.B \%XN\-UPDATE\-TOC
+macro is required),
+and may be redefined by the user;
+in its default implementation,
+its
+.I \%outline\-level
+argument,
+(which is inferred from the last\[hy]specified
+.B .NH
+heading level,
+when called by
+.BR .XN ),
+is simply ignored,
+but may be used by any user\[hy]defined replacement,
+for example,
+to control indentation of the table of contents.
+.
+.IP
+When called by
+.BR .XN ,
+in addition to the inference of the
+.I \%outline\-level
+argument,
+the
+.I text
+arguments are augmented,
+by prefixing the current section number,
+(which is also deduced from the last preceding use of
+.BR .NH ).
+.
+.P
+In addition to
+.BR \%XH\-UPDATE\-TOC ,
+the default
+.B XN
+and
+.B XH
+implementations support the following pair of callback macros:
+.
+.TP
+.B \%.XN\-INIT
+.TQ
+.B \%.XH\-INIT
+Called by
+.BR .XN ,
+and by
+.B .XH
+respectively,
+.I before
+.B \%.XH\-UPDATE\-TOC
+is called;
+in their default implementations,
+neither does anything,
+but either,
+or both,
+may be redefined by the user.
+.
+.P
+If the user has chosen to redefine
+.BR \%XH\-UPDATE\-TOC ,
+in some fashion which requires descrimination
+between the cases of having been called by
+.BR .XN ,
+or by
+.BR .XH ,
+then it may also be appropriate to redefine
+.BR \%XN\-INIT ,
+or
+.BR \%XH\-INIT ,
+or both,
+to handle the required discriminatory effect.
+.
+.P
+It should be noted that,
+whereas
+.I groff ms
+will emit an error diagnostic,
+and will
+.I not
+create any table of contents entry,
+if
+.B .XN
+is used before the first use of
+.BR .NH ,
+no such restriction is imposed on the use of
+.BR .XH .
+Thus,
+while it is nominally intended for use after
+.BR .SH ,
+.B .XH
+may be used in any context,
+in which use of
+.BR \%.XS ... XE
+is permitted.
+.
+.
 .\" 
 .SH "Differences from AT \f[I]ms\f[]"
 .\" ==

[groff] 01/03: [ms]: Fix misleading NH macro indentation.

2021-10-24 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch master
in repository groff.

commit f383d977f1b2d9ed518a9a2bb49e05faeb7bea2b
Author: Keith Marshall 
AuthorDate: Sun Oct 24 21:25:38 2021 +0100

[ms]: Fix misleading NH macro indentation.

* tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
indentation as preceding .DEVTAG-NH statement, but is overindented;
fix it.
---
 ChangeLog   | 8 
 tmac/s.tmac | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0de438e..3d3ef44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-10-24  Keith Marshall  
+
+   [ms]: Fix misleading NH macro indentation.
+
+   * tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
+   indentation as preceding .DEVTAG-NH statement, but is overindented;
+   fix it.
+
 2021-10-23  Keith Marshall  
 
[ms]: Defend against uncontrolled page trap recursion.
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 735e50e..ebc5817 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1701,7 +1701,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .nr sh*psincr (\\n[GROWPS]-\\n[nh*hl])*\\n[PSINCR]
 .SH-NO-TAG
 .DEVTAG-NH "\\$1"
-.  if '\*(.T'html' .nr s@devtag-needs-end-of-heading 1
+.if '\*(.T'html' .nr s@devtag-needs-end-of-heading 1
 \\*[SN-STYLE]
 ..
 .\" 

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 03/03: Adapt to accommodate global XH and XN implementations.

2021-10-24 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch master
in repository groff.

commit dde4dc8a12cd0bc68ac0fd42151a934a7806c463
Author: Keith Marshall 
AuthorDate: Sun Oct 24 21:54:22 2021 +0100

Adapt to accommodate global XH and XN implementations.

cf. <https://savannah.gnu.org/bugs/?58946#comment13>

* spdf.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC): Delete definitions;
the defaults, provided by s.tmac, are now sufficient.
(XH-REPLACEMENT, XN-REPLACEMENT): Define these, rather than...
(XH, XN): ...these, respectively.
---
 contrib/pdfmark/ChangeLog | 29 +
 contrib/pdfmark/spdf.tmac | 30 +++---
 2 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/contrib/pdfmark/ChangeLog b/contrib/pdfmark/ChangeLog
index cafe0a0..ad9fb44 100644
--- a/contrib/pdfmark/ChangeLog
+++ b/contrib/pdfmark/ChangeLog
@@ -1,3 +1,32 @@
+2021-10-24  Keith Marshall  
+
+   Adapt to accommodate global XH and XN implementations.
+
+   cf. <https://savannah.gnu.org/bugs/?58946#comment13>
+
+   * spdf.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC): Delete definitions;
+   the defaults, provided by s.tmac, are now sufficient.
+   (XH-REPLACEMENT, XN-REPLACEMENT): Define these, rather than...
+   (XH, XN): ...these, respectively.
+
+2021-10-24  Keith Marshall  
+
+   [ms]: Provide global default XH and XN implementations.
+
+   cf. <https://savannah.gnu.org/bugs/?58946#comment13>
+
+   * tmac/s.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC)
+   (XH, XN, XH-REPLACEMENT, XN-REPLACEMENT): Implement them, and...
+   * tmac/groff_ms.7.man: ...document them.
+
+2021-10-24  Keith Marshall  
+
+   [ms]: Fix misleading NH macro indentation.
+
+   * tmac/s.tmac (@NH) [.T is html]: .if statement should exhibit same
+   indentation as preceding .DEVTAG-NH statement, but is overindented;
+   fix it.
+
 2021-10-02  Keith Marshall  
 
Make a minor layout adjustment.
diff --git a/contrib/pdfmark/spdf.tmac b/contrib/pdfmark/spdf.tmac
index c590498..130d8bd 100644
--- a/contrib/pdfmark/spdf.tmac
+++ b/contrib/pdfmark/spdf.tmac
@@ -135,10 +135,14 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .\"   TOC  entry is determined by the definition
 .\"   of this macro.
 .\"
-.\" Both XH, and XN macros, share a common entry point.
-.\"
-.de XH als
-.als XN XH
+.\" Our replacements for both XH, and XN macros share a common entry
+.\" point; we map both to their respective replacement hooks, so that
+.\" we may continue to take advantage of setup logic in s.tmac.  When
+.\" these are eventually invoked, they will have been renamed so that
+.\" they replace XH, and XH respectively.
+.\"
+.de XH-REPLACEMENT als
+.als XN-REPLACEMENT XH-REPLACEMENT
 .\" FIXME: within s.tmac, the heading level established by the most
 .\" recent prior invocation of the NH macro is tracked by the "nh*hl"
 .\" private register; perhaps s.tmac could expose this more publicly,
@@ -158,22 +162,18 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 ..
 .aln .NH spdf:nh*hl
 .
-.\" The user is expected to furnish the XH-INIT, XH-UPDATE-TOC, and
-.\" XN-INIT handlers.  (Note that the XH-UPDATE-TOC hook serves both
-.\" XH and XN; there is no separate XN-UPDATE-TOC).  These stubs are
-.\" provided to avoid possible "undefined macro" warnings; each is
-.\" implemented as a no-op.
-.\"
-.de XH-INIT de
-.de XH-UPDATE-TOC de
-.de XN-INIT
-..
 .\" The common entry point for both XH, and XN, handles initialization,
 .\" and interpretation of any specified options, before handing over to
 .\" one of two distinct formatting helper macros, which are specific to
 .\" the XH, and XN implementations respectively.
 .\"
-.am XH \" and also XN
+.am XH-REPLACEMENT \" thus serving as implementation for both XH and XN
+.\"
+.\" The user is expected to furnish the XH-INIT, XH-UPDATE-TOC, and
+.\" XN-INIT handlers.  (Note that the XH-UPDATE-TOC hook serves both
+.\" XH and XN; there is no separate XN-UPDATE-TOC).  A suitable stub
+.\" for each is provided by s.tmac; we have no need to replace them.
+.\"
 .   \\$0-INIT
 .   rm spdf:refname
 .   als spdf:bm.define spdf:bm.basic

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


Re: Git, where zombie branches shamble again

2021-10-24 Thread Keith Marshall via Groff-commit
On 24/10/2021 03:16, G. Branden Robinson wrote:
> [Here's another long email; Ralph may want to skip it.]
> At 2021-10-23T22:07:27+0100, Keith Marshall via Groff-commit wrote:
>> Well, I pulled, and updated my local tree, to capture Brandon's most
>> recent commits, then applied _one_ trivial ms patch, (which _should_
>> have affected only tmac/s.tmac, and ChangeLog); how this push has
>> regurgitated around 50 of Branden's old commits is beyond me.
> 
> It looks like you had a local, remote-tracking branch for
> dev-gropdf-boxes (which Bertrand created back in April or so).

I guess so; what's more, it will not go away, (see below).

> [...snip...]
> 
> You probably "git --pull --rebase"d, and implicitly pulled all
> branches.  You did your work and pushed...implicitly, _all_
> branches.

Nope.  I don't use git ... its user interface — or rather its *complete
lack* of any coherently designed UI — is just too repulsive (for me) to
even contemplate!  I actually did:

  $ hg qpop -a
  $ hg pull -u

to shelve all of my locally pending changes, and capture your latest
round of public changes, (and you are correct in assuming that my local
working copy incorporates *all* git branches, because that's just the
way mercurial clones of git repositories work), then:

  $ hg qpush
  $ hg qchlog --rewrite ChangeLog
  $ hg qrefresh
  $ hg qfinish -a
  $ hg push

to push the first change in my local patch queue ... and incidentally,
(and unexpectedly), restore the public repository history, which you had
(IMO inadvisedly) rewritten.

> [...snip...]
> 
> Today, after your mail, I have done this:
> 
> $ git push --delete origin dev-gropdf-boxes
> To git.sv.gnu.org:/srv/git/groff.git
>  - [deleted] dev-gropdf-boxes

That seems like *really* antisocial behaviour!  We had a similar
discussion on MinGW, several years ago, when Earnie Boyd *proposed*
rewriting history on a public repository server; Chuck Wilson and I
persuaded him not to do so, because it really screws up collaborative
effort ... even git's commit documentation *strongly* discourages it!

> It _seems_ to be truly dead:

On the server, yes, but in my local *mercurial* clone, it is still
present!  There is (apparently) nothing I can pull:

  $ hg pull
  pulling from
  git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
  no changes found

but ... the 54 commits, which managed to have themselves regurgitated
yesterday, have done so again, today:

  $ hg outgoing | grep -c '^changeset:'
  54

(inspection of the actual "hg outgoing" output, without the grep
filtering, shows that these *do* correspond to your rewritten history):

  $ hg outgoing -B
  comparing with
  git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
  searching for changed bookmarks
 dev-gropdf-boxes  a1f569c9318c

I can delete the dev-gropdf-boxes bookmark, locally, but that *doesn't*
remove the associated commits; they remain in my local working copy of
the public repository, as orphans:

  $ hg bookmarks --delete dev-gropdf-boxes
  $ hg outgoing -B
  comparing with
  git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
  searching for changed bookmarks
  no changed bookmarks found
  $ hg outgoing | grep -c '^changeset:'
  54

> But the problem was mainly (1); that is, me.  Sorry about that.

What you describe may be a manifest *effect* of the problem; the *real*
problem is that, contrary to established wisdom, you've abused git's
ability to rewrite history, within a public repository — that should be
an absolute taboo.  The only way *I* (and I guess, other collaborators)
can recover from the adverse consequences of such history rewriting is
to abandon my current working copy of the repository, clone a fresh
copy, and forward port my outstanding patch queue to the newly cloned
working copy.

I have now cloned a fresh working copy of the public repository, so it
is unlikely that *I* will be pushing a resurrection of this particular
unwanted branch, but unless everyone else does likewise, perhaps we
shouldn't be too surprised if it reappears again.

-- 
Regards,
Keith.

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


Re: Git, where zombie branches shamble again

2021-10-24 Thread Keith Marshall
On 24/10/2021 03:16, G. Branden Robinson wrote:
> [Here's another long email; Ralph may want to skip it.]
> At 2021-10-23T22:07:27+0100, Keith Marshall via Groff-commit wrote:
>> Well, I pulled, and updated my local tree, to capture Brandon's most
>> recent commits, then applied _one_ trivial ms patch, (which _should_
>> have affected only tmac/s.tmac, and ChangeLog); how this push has
>> regurgitated around 50 of Branden's old commits is beyond me.
> 
> It looks like you had a local, remote-tracking branch for
> dev-gropdf-boxes (which Bertrand created back in April or so).

I guess so; what's more, it will not go away, (see below).

> [...snip...]
> 
> You probably "git --pull --rebase"d, and implicitly pulled all
> branches.  You did your work and pushed...implicitly, _all_
> branches.

Nope.  I don't use git ... its user interface — or rather its *complete
lack* of any coherently designed UI — is just too repulsive (for me) to
even contemplate!  I actually did:

  $ hg qpop -a
  $ hg pull -u

to shelve all of my locally pending changes, and capture your latest
round of public changes, (and you are correct in assuming that my local
working copy incorporates *all* git branches, because that's just the
way mercurial clones of git repositories work), then:

  $ hg qpush
  $ hg qchlog --rewrite ChangeLog
  $ hg qrefresh
  $ hg qfinish -a
  $ hg push

to push the first change in my local patch queue ... and incidentally,
(and unexpectedly), restore the public repository history, which you had
(IMO inadvisedly) rewritten.

> [...snip...]
> 
> Today, after your mail, I have done this:
> 
> $ git push --delete origin dev-gropdf-boxes
> To git.sv.gnu.org:/srv/git/groff.git
>  - [deleted] dev-gropdf-boxes

That seems like *really* antisocial behaviour!  We had a similar
discussion on MinGW, several years ago, when Earnie Boyd *proposed*
rewriting history on a public repository server; Chuck Wilson and I
persuaded him not to do so, because it really screws up collaborative
effort ... even git's commit documentation *strongly* discourages it!

> It _seems_ to be truly dead:

On the server, yes, but in my local *mercurial* clone, it is still
present!  There is (apparently) nothing I can pull:

  $ hg pull
  pulling from
  git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
  no changes found

but ... the 54 commits, which managed to have themselves regurgitated
yesterday, have done so again, today:

  $ hg outgoing | grep -c '^changeset:'
  54

(inspection of the actual "hg outgoing" output, without the grep
filtering, shows that these *do* correspond to your rewritten history):

  $ hg outgoing -B
  comparing with
  git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
  searching for changed bookmarks
 dev-gropdf-boxes  a1f569c9318c

I can delete the dev-gropdf-boxes bookmark, locally, but that *doesn't*
remove the associated commits; they remain in my local working copy of
the public repository, as orphans:

  $ hg bookmarks --delete dev-gropdf-boxes
  $ hg outgoing -B
  comparing with
  git+ssh://keithmarsh...@git.savannah.gnu.org/srv/git/groff.git
  searching for changed bookmarks
  no changed bookmarks found
  $ hg outgoing | grep -c '^changeset:'
  54

> But the problem was mainly (1); that is, me.  Sorry about that.

What you describe may be a manifest *effect* of the problem; the *real*
problem is that, contrary to established wisdom, you've abused git's
ability to rewrite history, within a public repository — that should be
an absolute taboo.  The only way *I* (and I guess, other collaborators)
can recover from the adverse consequences of such history rewriting is
to abandon my current working copy of the repository, clone a fresh
copy, and forward port my outstanding patch queue to the newly cloned
working copy.

I have now cloned a fresh working copy of the public repository, so it
is unlikely that *I* will be pushing a resurrection of this particular
unwanted branch, but unless everyone else does likewise, perhaps we
shouldn't be too surprised if it reappears again.

-- 
Regards,
Keith.



[bug #61294] [ms]: Stuck in recursive page trap loop at short page length

2021-10-23 Thread Keith Marshall
Update of bug #61294 (project groff):

  Status:None => Fixed  
 Assigned to:None => keithmarshall  
 Open/Closed:Open => Closed 

___

Follow-up Comment #2:

Fixed by commit #8830820


___

Reply to this item at:

  

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




Re: [groff] 02/54: doc/groff.texi: Remove stray word from recast.

2021-10-23 Thread Keith Marshall via Groff-commit
Guys,

I have no idea what's happened here!

On 23/10/2021 21:57, Keith Marshall via Groff-commit wrote:
> keithmarshall pushed a commit to branch dev-gropdf-boxes
> in repository groff.
> 
> commit 2995aadecfadcda9e0db3412fea41bbfbd6d0d70
> Author: G. Branden Robinson 
> AuthorDate: Sun Apr 4 19:19:24 2021 +1000

Well, I pulled, and updated my local tree, to capture Brandon's most
recent commits, then applied _one_ trivial ms patch, (which _should_
have affected only tmac/s.tmac, and ChangeLog); how this push has
regurgitated around 50 of Branden's old commits is beyond me.

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 51/54: tmac/s.tmac: Make FAM string work more sensibly.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit fd15f9f61f199f51559195546e3abcc827023331
Author: G. Branden Robinson 
AuthorDate: Wed Apr 21 04:28:52 2021 +1000

tmac/s.tmac: Make FAM string work more sensibly.

* tmac/s.tmac: Make the FAM string work more sensibly; it now applies to
  headers, footers, and footnotes only if set before the first call of a
  sectioning, paragraphing, or (non-date) document description macro.

  (PT, BT): Set the font family to that saved for titles.

  (fn*do-FS): Set the font family to that saved for footnotes.

  (par@init): Copy the document font family to independent strings for
  titles and footnotes.

  (par@reset): If in a footnote environment, set the font family to that
  saved for footnotes; otherwise use \*[FAM].

* tmac/groff_ms.7.man (Differences from troff ms/Text settings):
  Describe placement-dependent effect of FAM string setting.

* doc/groff.texi (Highlighting in ms):
* doc/ms.ms (Highlighting): As above, and suggest different occasions in
  which ".ds FAM C" and "CW" are convenient.

Fixes .
---
 ChangeLog   | 22 ++
 doc/groff.texi  | 17 -
 doc/ms.ms   | 52 ++--
 tmac/groff_ms.7.man | 15 +--
 tmac/s.tmac |  8 +++-
 5 files changed, 92 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 86be337..ce6085b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2021-04-21  G. Branden Robinson 
+
+   * tmac/s.tmac: Make the FAM string work more sensibly; it now
+   applies to headers, footers, and footnotes only if set
+   before the first call of a sectioning, paragraphing, or
+   {non-date} document description macro.
+   (PT, BT): Set the font family to that saved for titles.
+   (fn*do-FS): Set the font family to that saved for footnotes.
+   (par@init): Copy the document font family to independent strings
+   for titles and footnotes.
+   (par@reset): If in a footnote environment, set the font family
+   to that saved for footnotes; otherwise use \*[FAM].
+
+   * tmac/groff_ms.7.man (Differences from troff ms/Text settings):
+   Describe placement-dependent effect of FAM string setting.
+
+   * doc/groff.texi (Highlighting in ms):
+   * doc/ms.ms (Highlighting): As above, and suggest different
+   occasions in which ".ds FAM C" and "CW" are convenient.
+
+   Fixes .
+
 2021-04-19  G. Branden Robinson 
 
* src/roff/troff/input.cpp (source, source_quietly,
diff --git a/doc/groff.texi b/doc/groff.texi
index d8f5552..9925568 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -3241,11 +3241,6 @@ Sets its first argument in a @code{constant-width} 
(monospaced)
 roman typeface.  It operates similarly to the @code{B}@tie{}macro
 otherwise.  This is a Version@tie{}10 Research Unix extension.
 @c possibly V9, but definitely not Berkeley
-
-In @code{groff} @file{ms} you might prefer to change the font family to
-Courier, which is monospaced, by setting the @code{FAM} string to
-@samp{C}.  You can then use all four style macros above, returning to
-the default family (Times) with @samp{.ds FAM T}.
 @endDefmac
 
 @Defmac {BX, [@Var{txt}], ms}
@@ -3289,6 +3284,18 @@ superscript.
 Text enclosed with @code{\*<} and @code{\*>} is printed as a subscript.
 @endDefstr
 
+Rather than calling the @code{CW} macro, in @code{groff} @file{ms} you
+might prefer to change the font family to Courier---a monospaced
+typeface---by setting the @code{FAM} string to @samp{C}.  You can then
+use all four style macros above, returning to the default family (Times)
+with @samp{.ds FAM T}.  If you set @code{FAM} before the first call of a
+sectioning, paragraphing, or (non-date) document description macro, it
+also applies to headers, footers, and footnotes (as well as the body
+text).  A change to @code{FAM} takes effect at the next paragraph, so
+@code{CW} remains useful to ``inline'' a change to the font family,
+similarly to the practice of this document in noting syntactical
+elements of @file{ms} and @code{groff}.
+
 @c -
 
 @node Lists in ms, Indented regions in ms, Highlighting in ms, ms Body Text
diff --git a/doc/ms.ms b/doc/ms.ms
index d5518c3..0bbcf5f 100644
--- a/doc/ms.ms
+++ b/doc/ms.ms
@@ -1207,20 +1207,6 @@ macro otherwise.
 .
 This is a Version\~10 Research Unix extension.
 .\" possibly V9, but definitely not Berkeley
-.
-.
-.sp \n[PD]u
-In
-.I "groff ms"
-you might prefer to change the font family to Courier\[em]a monospaced
-typeface\[em]by setting
-.CW \[rs]*[FAM]
-to
-.CW C \[rq]. \[lq]
-.
-You can then use all four style macros above,
-returning to the default family (Times) 

[groff] 53/54: contrib/sboxes/msboxes.ms: Fix non-body font.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 1c74ce20666bc6ac026db72cf0fc519ba13b0c3b
Author: G. Branden Robinson 
AuthorDate: Wed Apr 21 04:53:40 2021 +1000

contrib/sboxes/msboxes.ms: Fix non-body font.

Take advantage of fix to Savannah #60422.  Set FAM string earlier, but
at last possible opportunity such that it will affect headers, footers,
and footnote text.  The document now uses Helevetica consistently except
where switched to Courier for code examples.
---
 BRANCH-TODO   | 2 --
 contrib/sboxes/msboxes.ms | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/BRANCH-TODO b/BRANCH-TODO
index 98eeced..e6ca956 100644
--- a/BRANCH-TODO
+++ b/BRANCH-TODO
@@ -9,8 +9,6 @@ Resolve the following issues.
   - Use BI in title.
   - Recast language to time-proof it (avoid "recent").
   - Use correct \[aq] glyphs in code literals.
-  - The font is wrong outside the box once the document source is
-presented (headers and footnotes are in Courier on pp. 3-4).
 * Get the BX=x chatter out of stderr.
 * Update gropdf(1) to document \X'pdf: background'.
 * Decide on a place in the existing ms name space definition for the new
diff --git a/contrib/sboxes/msboxes.ms b/contrib/sboxes/msboxes.ms
index e715c7e..84fcc5a 100644
--- a/contrib/sboxes/msboxes.ms
+++ b/contrib/sboxes/msboxes.ms
@@ -16,6 +16,7 @@
 .EF 
 .OH 'Using PDF boxes with the \f[I]ms\f[] macros''%'
 .OF 
+.ds FAM H
 .TL
 Using PDF boxes with the \f[I]ms\f[] macros
 .AU
@@ -23,7 +24,6 @@ Deri James
 .AI
 d...@chuzzlewit.myzen.co.uk
 .\" .AB no
-.ds FAM H
 .LP
 A recent extension to the Groff PDF driver allows coloured rectangles to be
 created beneath any output created by groff. The extension is a new "\eX'pdf:'"
@@ -161,6 +161,7 @@ The above was produced by the following code.
 \&.EF 
 \&.OH 'Using PDF boxes with the \ef[I]ms\ef[] macros''%'
 \&.OF 
+\&.ds FAM H
 \&.TL
 Using PDF boxes with the \ef[I]ms\ef[] macros
 \&.AU
@@ -168,7 +169,6 @@ Deri James
 \&.AI
 d...@chuzzlewit.myzen.co.uk
 \&.\" .AB no
-\&.ds FAM H
 \&.LP
 A recent extension to the Groff PDF driver allows coloured rectangles to be
 created beneath any output created by groff. The extension is a new "\eX'pdf:'"

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 50/54: src/roff/troff/input.cpp: Use Boolean literals.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit fea5e653f57041422f743d13d66bb57ff758d8f3
Author: G. Branden Robinson 
AuthorDate: Tue Apr 20 01:56:14 2021 +1000

src/roff/troff/input.cpp: Use Boolean literals.

* src/roff/troff/input.cpp (source, source_quietly, macro_source,
  macro_source_quietly): Use idiomatic Boolean literals.
---
 ChangeLog| 6 ++
 src/roff/troff/input.cpp | 8 
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ddef1f1..86be337 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-19  G. Branden Robinson 
+
+   * src/roff/troff/input.cpp (source, source_quietly,
+   macro_source, macro_source_quietly): Use idiomatic Boolean
+   literals.
+
 2021-04-17  G. Branden Robinson 
 
* doc/groff.texi: Drop workarounds for Texinfo pre-5.0 versions;
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 80733d1..c2b2910 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -5981,7 +5981,7 @@ void do_source(bool quietly)
 
 void source()
 {
-  do_source(0 /* not quietly*/ );
+  do_source(false /* not quietly*/ );
 }
 
 // .soquiet: like .so, but silently ignore files that can't be opened
@@ -5989,7 +5989,7 @@ void source()
 
 void source_quietly()
 {
-  do_source(1 /* quietly */ );
+  do_source(true /* quietly */ );
 }
 
 // like .so but use popen()
@@ -7844,7 +7844,7 @@ void do_macro_source(bool quietly)
 
 void macro_source()
 {
-  do_macro_source(0 /* not quietly (if WARN_FILE enabled) */ );
+  do_macro_source(false /* not quietly (if WARN_FILE enabled) */ );
 }
 
 // .msoquiet: like .mso, but silently ignore files that can't be opened
@@ -7852,7 +7852,7 @@ void macro_source()
 
 void macro_source_quietly()
 {
-  do_macro_source(1 /* quietly */ );
+  do_macro_source(true /* quietly */ );
 }
 
 static void process_input_file(const char *name)

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 41/54: {ChangeLog, NEWS}: Report localization change.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit e0536d285fd744eab69a30becba2190b74c5a609
Author: G. Branden Robinson 
AuthorDate: Thu Apr 15 19:46:36 2021 +1000

{ChangeLog, NEWS}: Report localization change.

Fixes .
---
 ChangeLog | 63 +++
 NEWS  | 18 ++
 2 files changed, 81 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index dbc5063..113a5ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,66 @@
+2021-04-15  G. Branden Robinson 
+
+   [tmac]: Adjust editor file encoding hints.
+
+   * tmac/cs.tmac: Tell Vim the file is "iso-8859-2" (ISO Latin-2).
+   * tmac/en.tmac: Stop telling Emacs the file is "latin-1"; it's
+   ASCII.
+   * tmac/fr.tmac: Tell Vim file is "iso-8859-15" (ISO Latin-9).
+
+   Vim users may need to use ":e ++enc=iso-8859-2", for instance,
+   to see correct glyphs.
+
+2021-04-15  G. Branden Robinson 
+
+   Determine the groff locale (default input language) using the
+   system locale.  Use the environment if possible.  Try LC_ALL
+   first, then LANG.  "C" means English (en).  Otherwise, only the
+   first two characters of the locale name are used.
+
+   Unrecognized locales (those without a supporting xx.tmac file)
+   are ignored, and groff falls back to English.
+
+   Those who want groff's default locale to differ from LC_ALL/LANG
+   should edit the troffrc file to source the appropriate groff
+   locale macro file (cs.tmac, de.tmac, den.tmac, fr.tmac, ja.tmac,
+   sv.tmac, zh.tmac).
+
+   The first-order determinant of hyphenation points is language,
+   not territory.  Use ISO 639 2-letter language codes for
+   hyphenation and exception patterns instead of ISO 3166 2-letter
+   territory codes.
+
+   * tmac/*.us: Rename *.us files to *.en.
+   * tmac/troffrc: Change hyphenation language "us" to "en".
+   * tmac/en.tmac: Add English localization file.  Set hyphenation
+   mode to 4.
+   * tmac/troffrc: Derive groff locale from system.
+
+   * doc/groff.texi (Manipulating Hyphenation):
+   * man/groff.7.man (Hyphenation):
+   * man/groff_diff.7.man (Implementation differences): Refer to
+   "U.S. English" hyphenation patterns as simply "English"; they
+   will be mostly correct for Commonwealth English as well, and no
+   alternative English hyphenation patterns for other territories
+   are available.
+
+   * doc/groff.texi (Manipulating Hyphenation):
+   * man/groff_diff.7.man (New requests): Note that default
+   hyphenation mode depends on the language used on the system.
+   Add concept index entry for localization.  Add file index
+   entries for the locale macro files (cs.tmac, etc.).  Add
+   environment variable index entries for LANG and LC_ALL.
+   Describe how groff's idea of the locale is determined.  Update
+   to reflect rename of English hyphenation patterns and .hla
+   identifier from "us" to "en".
+
+   * src/roff/groff/tests/localization_works.sh: Add 10 test cases.
+   * src/roff/groff/groff.am (groff_TESTS): Run test.
+
+   * tmac/LOCALIZATION: Rewrite.
+
+   Fixes .
+
 2021-04-12  Dave Kemper 
 
* doc/meref.me: Correct various small issues.
diff --git a/NEWS b/NEWS
index 4a726cf..f0da9f3 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,24 @@ VERSION 1.23.0
 troff
 -
 
+o The groff locale (the default input language) is now determined using
+  the system locale.  The LC_ALL and LANG environment variables are
+  checked, in that order.  If set, the value's first two characters
+  determine the groff locale.  If these variables are not set, if the
+  first one found is set to "C", or if no groff localization file exists
+  for the language, groff falls back to English, loading en.tmac.
+
+  Those who want groff's default locale to differ from LC_ALL/LANG
+  should edit the troffrc file to source the appropriate groff locale
+  macro file (cs.tmac, de.tmac, den.tmac, fr.tmac, ja.tmac, sv.tmac,
+  zh.tmac).
+
+  The default hyphenation mode (as used by the .hy request) for users of
+  English is thus changed from "1", which was inappropriate for the
+  TeX-based hyphenation patterns groff has used since at least 1991, to
+  "4".  However, calling .hy without an argument remains synonymous with
+  ".hy 1".
+
 o A new read-only register ".cp" is implemented.  Within a .do request,
   "\n[.cp]" holds the saved value of compatibility mode.  See
   groff_diff(7) or the groff Texinfo manual for rationale, use case, and

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 39/54: tmac/LOCALIZATION: Rewrite.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 464eb35d1d69d90f155ae2c2bdfa9bb34e42c367
Author: G. Branden Robinson 
AuthorDate: Tue Apr 13 18:25:55 2021 +1000

tmac/LOCALIZATION: Rewrite.
---
 tmac/LOCALIZATION | 79 +--
 1 file changed, 41 insertions(+), 38 deletions(-)

diff --git a/tmac/LOCALIZATION b/tmac/LOCALIZATION
index cf01a03..3f8a1cb 100644
--- a/tmac/LOCALIZATION
+++ b/tmac/LOCALIZATION
@@ -1,54 +1,57 @@
-
 Localization
 
 
-The localization process involves two files.
-
-  - A locale dependent file (for example, fr.tmac for French) where all
-locale specific strings are (re)defined.
-
-  - A locale independent file (trans.tmac) responsible for activating those
-localized strings.
+The localization process involves two groff files and zero or more
+hyphenation pattern files.
 
-All you have to do is to create a new file named 'LL.tmac' where 'LL' is
-your country code ('de' for Germany, 'el' for Greece, ...), maybe using
-'fr.tmac' as a template.
+1.  A locale-dependent file (for example, fr.tmac for French) does one
+or several of the following.
 
-The first thing to do is to redefine the string 'locale' to your language.
+A.  A string identifying the groff locale (e.g., "english") is set.
+B.  Locale-specific strings used by macro packages are (re)defined.
+C.  The "trans.tmac" file is loaded with the .mso request to
+activate the strings set up in the previous item.
+C.  Other tweaks to macro package configuration are peformed, such
+as altering the ordering of the components of a date string.
+D.  Additional inter-sentence space is set to a language-appropriate
+amount with the .ss request.
+E.  A hyphenation mode appropriate to the hyphenation pattern files
+for the locale is set with the .hy request.
+F.  Hyphenation codes appropriate to the hyphenation pattern files
+for the locale are set with the .hcode request.
+G.  The hyphenation language is set with the .hla request.
+H.  Hyphenation pattern and exception files are loaded with the .hpf
+and .hpfa requests.
+I.  Support for a character encoding approriate to the locale is
+loaded with the .mso request.
 
-  .ds locale german\"
+2.  A locale-independent file (trans.tmac) activates the localized
+strings set up in item B above.
 
-Then change all the translations in the predefined strings.  Don't forget
-the \" at the end of each string, preventing spaces from lurking around.
+See the groff Texinfo manual in doc/groff.texi for descriptions of the
+requests referred to above.
 
-After 'trans.tmac' has been called by
+Localization files are named using ISO 639-1 language identifiers.
+Further specialization of locales by ISO 3166 territory codes is
+tentatively planned as of groff 1.23.0, awaiting expressions of demand.
 
-  .mso trans.tmac
+After 'trans.tmac' has been loaded, you must redefine the date strings
+in order to use the day and month names translated earlier.  The date
+format also may need to be changed.
 
-you must redefine the date strings in order to use the day and month names
-translated earlier.  If you don't feel comfortable with groff maybe you
-should use the definitions used in 'fr.tmac'.  Nevertheless, you should take
-care of the order of the date elements.
+- If the locale's date format is MM/DD/, use the following.
 
-  - If your date format is MM/DD/YY:
+for ms: .ds DY \*[MO] \n[dy] \n[year]\"
+for mm: .ds cov*new-date \\*[MO\\n[mo]] \\n[dy] \\n[year]\"
+for me: .ds td \*(mo \n(dy \n(y4\"
 
-  for ms: .ds DY \*[MO] \n[dy] \n[year]
-  for mm: .ds cov*new-date \\*[MO\\n[mo]] \\n[dy] \\n[year]
-  for me: .ds td \*(mo \n(dy \n(y4
+- If the locale's date format is DD/MM/, use the following.
 
-  - If your date format is DD/MM/YY:
-
-  for ms: .ds DY \n[dy] \*[MO] \n[year]
-  for mm: .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] \\n[year]
-  for me: .ds td \n(dy \*(mo \n(y4
+for ms: .ds DY \n[dy] \*[MO] \n[year]\"
+for mm: .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] \\n[year]\"
+for me: .ds td \n(dy \*(mo \n(y4\"
 
 Other date formats can be handled similarly.
 
-NOTE: For the mm package, in the 'ISODATE' macro, only the first definition
-  of 'cov*new-date' must be changed (see 'fr.tmac').
-
-Finally, change groff behaviour in order to comply with your locale.  For
-example, 'fr.tmac' changes the default encoding, sets the sentence spaces,
-and final activates hyphenation, provided there are hyphenation patterns
-available (which should be put into files named 'hyphen.LL' for
-consistency).
+Note: For the mm package, in the 'ISODATE' macro, only the first
+definition of 'cov*new-date' must be changed (see 'fr.tmac').

___
Groff-commit mailing list
Groff-commit@gnu.org

[groff] 29/54: doc/groff.texi: Fix more "current environment"s.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 0a281c771b093220af5430148e2028d336d9b6d2
Author: G. Branden Robinson 
AuthorDate: Tue Apr 13 19:12:01 2021 +1000

doc/groff.texi: Fix more "current environment"s.
---
 doc/groff.texi | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 9ca7e79..f876f6e 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7706,10 +7706,10 @@ register @samp{.hla}; it is associated with the 
environment
 @cindex hyphenated lines, consecutive (@code{hlm})
 Set the maximum number of consecutive hyphenated lines to @var{n}.  If
 @var{n} is negative, there is no maximum.  If omitted, @var{n}
-is@tie{}@minus{}1.  This value is associated with the current
-environment (@pxref{Environments}).  Only lines output from a given
-environment count towards the maximum associated with that environment.
-Hyphens resulting from @code{\%} are counted; explicit hyphens are not.
+is@tie{}@minus{}1.  This value is associated with the environment
+(@pxref{Environments}).  Only lines output from a given environment
+count towards the maximum associated with that environment.  Hyphens
+resulting from @code{\%} are counted; explicit hyphens are not.
 
 @cindex hyphenation consecutive line limit register (@code{.hlm})
 @cindex hyphenation consecutive line count register (@code{.hlc})
@@ -7727,8 +7727,8 @@ Set the (right) hyphenation margin to @var{length}.  If 
the adjustment
 mode is not @samp{b} or @samp{n}, the line is not hyphenated if it is
 shorter than @var{length}.  Without an argument, the hyphenation margin
 is reset to its default value, 0.  The default scaling indicator is
-@samp{m}.  The hyphenation margin is associated with the current
-environment (@pxref{Environments}).
+@samp{m}.  The hyphenation margin is associated with the environment
+(@pxref{Environments}).
 
 A negative argument resets the hyphenation margin to zero, emitting a
 warning of type @samp{range}.
@@ -7748,7 +7748,7 @@ Suppress hyphenation of the line in adjustment modes 
@samp{b} or
 @var{hyphenation-space} extra space to each inter-word space.  Without
 an argument, the hyphenation space adjustment threshold is set to its
 default value, 0.  The default scaling indicator is @samp{m}.  The
-hyphenation space adjustment threshold is associated with the current
+hyphenation space adjustment threshold is associated with the
 environment (@pxref{Environments}).
 
 A negative argument resets the hyphenation space adjustment threshold to
@@ -8822,7 +8822,7 @@ Temporarily indent the next output line by @var{offset}.  
If an
 increment or decrement value is specified, adjust the temporary
 indentation relative to the value set by the @code{in} request.
 
-This request causes a break; its value is associated with the current
+This request causes a break; its value is associated with the
 environment (@pxref{Environments}).  The default scaling indicator is
 @samp{m}.  A call of @code{ti} without an argument is ignored.
 
@@ -8987,7 +8987,7 @@ An intervening control line that causes a break is 
stronger than
 
 @cindex interrupted line register (@code{.int})
 The @code{.int} register contains a positive value if the last output
-line was interrupted with @code{\c}; this is associated with the current
+line was interrupted with @code{\c}; this is associated with the
 environment (@pxref{Environments}).
 @endDefesc
 

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 28/54: doc/groff.texi (Manipulating Hyphenation): Tweak.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit feba7d2115211a9d61a4ba61f496e38358c0639d
Author: G. Branden Robinson 
AuthorDate: Tue Apr 13 08:14:42 2021 +1000

doc/groff.texi (Manipulating Hyphenation): Tweak.

- Shift some material into the lead sentence.
- : Document request default in lead paragraph.
- : Drop redundant statement of inapplicability of placement
  restrictions to exceptions defined with .hw.
- : Tighten wording and consolidate paragraphs.
---
 doc/groff.texi | 31 +++
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index e9cef7d..9ca7e79 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7266,7 +7266,8 @@ If @emph{undiscardable} space is required, use the 
@code{\h} escape.
 
 @cindex hyphenation, automatic
 @cindex automatic hyphenation
-GNU @code{troff} normally hyphenates words where necessary.  The
+When filling, GNU @code{troff} hyphenates words as needed at
+user-specified and automatically determined hyphenation points.  The
 machine-driven determination of hyphenation points in words requires
 algorithms and data, and is susceptible to conventions and preferences.
 Before tackling such @dfn{automatic hyphenation}, let us consider how
@@ -7277,11 +7278,11 @@ hyphenation points can be set manually.
 @cindex hyphenation, manual
 @cindex manual hyphenation
 Explicitly hyphenated words such as ``mother-in-law'' are eligible for
-breaking after each of their hyphens when GNU @code{troff} fills lines.
-Relatively few words in a language offer such obvious break points,
-however, and automatic hyphenation is not perfect, particularly for
-unusual words found in technical literature.  We may wish to instruct
-GNU @code{troff} how to hyphenate specific words if the need arises.
+breaking after each of their hyphens.  Relatively few words in a
+language offer such obvious break points, however, and automatic
+hyphenation is not perfect, particularly for unusual words found in
+technical literature.  We may wish to instruct GNU @code{troff} how to
+hyphenate specific words if the need arises.
 
 @cindex hyphenation exceptions
 @Defreq {hw, word @dots{}}
@@ -7424,9 +7425,9 @@ with up to a certain amount of additional inter-word 
space (@code{hys}).
 @DefreqList {hy, [@Var{mode}]}
 @DefregListEndx {.hy}
 Set automatic hyphenation mode to @var{mode}, an integer encoding
-conditions for hyphenation.  The hyphenation mode is available in the
-read-only register @samp{.hy}; it is associated with the environment
-(@pxref{Environments}).
+conditions for hyphenation; if omitted, 1 is implied.  The hyphenation
+mode is available in the read-only register @samp{.hy}; it is associated
+with the environment (@pxref{Environments}).
 
 Typesetting practice generally does not avail itself of every
 opportunity for hyphenation, but the details differ by language and site
@@ -7545,9 +7546,8 @@ the @cite{groff_tmac@r{(5)}} man page for more 
information on GNU
 @end multitable
 
 Hyphenation exceptions within pattern files (i.e., the words within a
-@TeX{} @code{\hyphenation} group) also obey the hyphenation restrictions
-given by @code{hy}.  However, exceptions specified with @code{hw} do
-not.
+@TeX{} @code{\hyphenation} group) obey the hyphenation restrictions
+given by @code{hy}.
 @endDefreq
 
 @Defreq {nh, }
@@ -7561,11 +7561,10 @@ remembered.
 @DefreqListEndx {hpfcode, a b [c d] @dots{}}
 @cindex hyphenation patterns (@code{hpf})
 @cindex patterns for hyphenation (@code{hpf})
-Read hyphenation patterns from @var{pattern-file}.  This file is sought
+Read hyphenation patterns from @var{pattern-file}, which is sought
 in the same way that macro files are with the @code{mso} request or the
-@option{-m@var{name}} command-line option to @code{groff}.
-
-The @var{pattern-file} should have the same format as (simple) @TeX{}
+@option{-m@var{name}} command-line option to @code{groff}.  The
+@var{pattern-file} should have the same format as (simple) @TeX{}
 pattern files.  More specifically, the following scanning rules are
 implemented.
 

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 24/54: groff(7): Drop discussion of Y2K issues.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit fae62043e63ebb17d7d705d9232e80e2e0e32c02
Author: Dave Kemper 
AuthorDate: Sun Apr 11 10:48:45 2021 +

groff(7): Drop discussion of Y2K issues.

Fixes .
---
 ChangeLog   | 7 +++
 man/groff.7.man | 8 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fc1d744..6ccc633 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-04-12  Dave Kemper 
+
+   * man/groff.7.man (Registers/Writable registers) :
+   Drop discussion of Y2K issues.
+
+   Fixes .
+
 2021-04-11  G. Branden Robinson 
 
* doc/groff.texi (Setting Registers) : Fix error; the
diff --git a/man/groff.7.man b/man/groff.7.man
index 27a1c98..0a826c4 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -4883,15 +4883,11 @@ image (set by
 .
 .TPx
 .REG year
-The current year (year 2000 compliant).
+The current year.
 .
 .TPx
 .REG yr
-Current year minus 1900.
-.
-For Y2K compliance use
-.register year
-instead.
+The current year minus 1900.
 .
 .PD
 .

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 23/54: doc/groff.texi: Make small clarifications.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 02aacdf717f6a6de6bc503dfc2fb0dca9694dd57
Author: G. Branden Robinson 
AuthorDate: Mon Apr 12 00:06:02 2021 +1000

doc/groff.texi: Make small clarifications.
---
 doc/groff.texi | 82 ++
 1 file changed, 42 insertions(+), 40 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 813bbb8..1cfcfae 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -4496,16 +4496,16 @@ not interested in details.
 
 @acronym{AT} @code{troff} was designed to take input as it would be
 composed on a typewriter, including the teletypewriters used as early
-computer terminals, and relieve the user of having to be concerned with
-the precise line length that the final version of the document would
-use, where words should be hyphenated, and how to achieve straight
-margins on both the left and right sides of the page.  Early in its
-development, the program gained the ability to prepare output for a
-phototypesetter; a document could then be prepared for output to either
-a teletypewriter, a phototypesetter, or both.  GNU @code{troff}
-continues this tradition of permitting an author to compose a single
-master version of a document which can then be rendered for a variety of
-output formats or devices.
+computer terminals, and relieve the user of having to be concerned
+during the drafting process with the precise line length that the final
+version of the document would use, where words should be hyphenated, and
+how to achieve straight margins on both the left and right sides of the
+page.  Early in its development, the program gained the ability to
+prepare output for a phototypesetter; a document could then be prepared
+for output to either a teletypewriter, a phototypesetter, or both.  GNU
+@code{troff} continues this tradition of permitting an author to compose
+a single master version of a document which can then be rendered for a
+variety of output formats or devices.
 
 @code{roff} input files contain text interspersed with instructions to
 control the formatter.  Even in the absence of such instructions, GNU
@@ -4655,11 +4655,11 @@ the advice presented in @ref{Input Conventions}.
 @cindex special characters
 @cindex characters, special
 Normally, the occurrence of a visible non-end-of-sentence character (as
-opposed to a space or tab) after an end-of-sentence character cancels
-detection of the end of a sentence.  For example, it would be incorrect
-for GNU @code{troff} to infer the end of a sentence after the dot in
-@samp{3.14159}.  However, several characters are treated
-@emph{transparently} after the occurence of an end-of-sentence
+opposed to a space or tab) immediately after an end-of-sentence
+character cancels detection of the end of a sentence.  For example, it
+would be incorrect for GNU @code{troff} to infer the end of a sentence
+after the dot in @samp{3.14159}.  However, several characters are
+treated @emph{transparently} after the occurence of an end-of-sentence
 character.  That is, GNU @code{troff} does not cancel end-of-sentence
 detection when it processes them.  This is because such characters are
 often used as footnote markers or to close quotations and
@@ -4724,8 +4724,8 @@ on a different output line; this is called a @dfn{break}. 
 In this
 manual and in @code{roff} discussions generally, a ``break'' if not
 further qualified always refers to the termination of an output line.
 When the formatter is filling text, it introduces breaks automatically
-to keep output lines from exceeding the current line length.  After an
-automatic break, GNU @code{troff} adjusts the line if applicable (see
+to keep output lines from exceeding the configured line length.  After
+an automatic break, GNU @code{troff} adjusts the line if applicable (see
 below), and then resumes collecting and filling text on the next output
 line.
 
@@ -4861,12 +4861,12 @@ name and each other by spaces) that specify details of 
the action GNU
 @code{troff} is expected to perform.  If a request is meaningless
 without arguments, it is typically ignored.
 
-GNU @code{troff} requests, combined with its escape sequences, comprise
-the control language of the formatter.  Of key importance are the
-requests that define macros.  Macros are invoked like requests, enabling
-the request repertoire to be extended or overridden.@footnote{Argument
-handling in macros is more flexible but also more complex.
-@xref{Request and Macro Arguments}.}
+GNU @code{troff}'s requests and escape sequences comprise the control
+language of the formatter.  Of key importance are the requests that
+define macros.  Macros are invoked like requests, enabling the request
+repertoire to be extended or overridden.@footnote{Argument handling in
+macros is more flexible but also more complex.  @xref{Request and Macro
+Arguments}.}
 
 @cindex macro
 @cindex calling a macro
@@ -4985,13 +4985,13 @@ We could have defined 

[groff] 22/54: doc/groff.texi (Manipulating Hyphenation): Tweak.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 62373e779f0ca76aeb8c5ed62385cc6ebc28b89a
Author: G. Branden Robinson 
AuthorDate: Sun Apr 11 10:40:44 2021 +1000

doc/groff.texi (Manipulating Hyphenation): Tweak.

- Clarify forward reference within node.
- Shift description of .hy register and environment association to lead
  paragraph of .hy request description since over a page and a half is
  given over to discussion of the semantics of the argument and its
  interaction with hyphenation pattern files.
- Recast forward reference to table since it has a tendency to end up on
  the next page.
- Note that .hy value 2 applies even to manual hyphenation points.
- Follow "U.S." with Texinfo @: command since the Texinfo manual
  recommends it.
- Add forward reference within node.
- Adjust wording of hcode example.
---
 doc/groff.texi | 70 --
 1 file changed, 34 insertions(+), 36 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 9118886..813bbb8 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7300,9 +7300,9 @@ within-word placement restrictions imposed by the 
@code{hy} request (see
 below).
 
 Hyphenation exceptions specified with the @code{hw} request are
-associated with the hyphenation language (see below) and environment
-(@pxref{Environments}); calling the @code{hw} request in the absence of
-a hyphenation language is an error.
+associated with the hyphenation language (see the @code{hla} request
+below) and environment (@pxref{Environments}); calling the @code{hw}
+request in the absence of a hyphenation language is an error.
 
 The request is ignored if there are no parameters.
 @endDefreq
@@ -7411,10 +7411,13 @@ lines have been hyphenated (@code{hlm}), the line has 
not reached a
 certain minimum length (@code{hym}), or the line can instead be adjusted
 with up to a certain amount of additional inter-word space (@code{hys}).
 
+@cindex hyphenation mode register (@code{.hy})
 @DefreqList {hy, [@Var{mode}]}
 @DefregListEndx {.hy}
-Set automatic hyphenation mode to @var{mode}.  The optional numeric
-argument @var{mode} encodes conditions for hyphenation.
+Set automatic hyphenation mode to @var{mode}, an integer encoding
+conditions for hyphenation.  The hyphenation mode is available in the
+read-only register @samp{.hy}; it is associated with the environment
+(@pxref{Environments}).
 
 Typesetting practice generally does not avail itself of every
 opportunity for hyphenation, but the details differ by language and site
@@ -7429,9 +7432,9 @@ sought.@footnote{The mode is a vector of booleans encoded 
as an integer.
 To a programmer, this fact is easily deduced from the exclusive use of
 powers of two for the configuration parameters; they are computationally
 easy to ``mask off'' and compare to zero.  To almost everyone else, the
-arrangement seems recondite and unfriendly.}  The entries in the table
-below are termed @dfn{values}, and the sum of the desired values is the
-@dfn{mode}.
+arrangement seems recondite and unfriendly.}  The entries in the
+following table are termed @dfn{values}; the sum of the desired
+values is the @dfn{mode}.
 
 @table @code
 @item 0
@@ -7449,14 +7452,14 @@ restrictions relative to that basis.
 
 @table @code
 @item 2
-disables hyphenation of the last word on a page.@footnote{This value
-prevents hyphenation if the next page location trap is closer than the
-next text baseline would be.  GNU @code{troff} automatically inserts an
-implicit vertical position trap at the end of each page to cause a page
+disables hyphenation of the last word on a page,@footnote{Hyphenation is
+prevented if the next page location trap is closer than the next text
+baseline would be.  GNU @code{troff} automatically inserts an implicit
+vertical position trap at the end of each page to cause a page
 transition.  Users or macro packages can set such traps explicitly to
 prevent hyphenation of the last word in a column in multi-column page
-layouts or before floating figures or tables.
-@xref{Page Location Traps}.}
+layouts or before floating figures or tables.  @xref{Page Location
+Traps}.} even for manually hyphenated words.
 
 @item 4
 disables hyphenation before the last two characters of a word.
@@ -7510,12 +7513,12 @@ s- plit- t- in- g
 @endExample
 
 @noindent
-instead of the correct `split- ting'.  U.S. English patterns as
+instead of the correct `split- ting'.  U.S.@: English patterns as
 distributed with GNU @code{troff} need two characters at the beginning
 and three characters at the end; this means that value@tie{}4 of
 @code{hy} is mandatory.  Value@tie{}8 is possible as an additional
 restriction, but values@tie{}16 and@tie{}32 should be avoided, as should
-mode@tie{}1 (the default!).  Modes@tie{}4 and@tie{}6 are typical.
+mode@tie{}1.  Modes@tie{}4 and@tie{}6 are typical.
 
 A table of left and right minimum character 

[groff] 17/54: doc/groff.texi (I/O): Tweak content.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 7b2079738aa02759442146752fbc0de399e43f5b
Author: G. Branden Robinson 
AuthorDate: Sun Apr 11 09:23:36 2021 +1000

doc/groff.texi (I/O): Tweak content.

The qualifying clause is not necessary; file warnings are enabled by
default.
---
 doc/groff.texi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 911d6dd..9e6368d 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -14298,8 +14298,7 @@ The search path for @var{file} can be controlled with 
the @option{-I}
 command-line option.
 
 @code{soquiet} works the same way, except that no warning diagnostic
-is issued if @var{file} does not exist, even if warnings of type
-@samp{file} are enabled.
+is issued if @var{file} does not exist.
 @endDefreq
 
 @Defreq {pso, command}

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 13/54: groff(7): Fix style nits.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit cfbbaa81840315bcef010580de045d193285559a
Author: G. Branden Robinson 
AuthorDate: Fri Apr 9 12:19:11 2021 +1000

groff(7): Fix style nits.

- (mso): Set "tmac" in italics.  Tighten wording.
- (so): Say "interpolate" instead of "include"; the latter is something
  of a C-language-ism.  Recast sense of "source" to serve more as a
  mnemonic for the request name than a taxonomic description of the
  argument.
---
 man/groff.7.man | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/man/groff.7.man b/man/groff.7.man
index 43a15f5..e799629 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -2200,13 +2200,16 @@ or in an internal register used by
 .B .rt
 if no argument.
 .
+.
 .TPx
 .REQ .mso "file"
-The same as
-.request .so
+As
+.request .so ,
 except that
 .I file
-is searched in the tmac directories.
+is sought in the
+.I tmac
+directories.
 .
 .
 .TPx
@@ -2540,9 +2543,12 @@ command in a
 .I DESC
 file.
 .
+.
 .TPx
-.REQ .so "filename"
-Include source file.
+.REQ .so file
+Interpolate (\[lq]source\[rq])
+.IR file .
+.
 .
 .TPx
 .REQ .sp

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 12/54: doc/groff.texi (I/O): Shift sentence.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit f616943b9f50b9dc5b091ba90aa34b24587c7073
Author: G. Branden Robinson 
AuthorDate: Fri Apr 9 12:14:27 2021 +1000

doc/groff.texi (I/O): Shift sentence.

Move explanation of "file" warning behavior from .mso to .so
description, since it applies to .so and .mso incorporates .so's
behavior by reference.
---
 doc/groff.texi | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index e72f3bd..0a1fbf0 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -14273,9 +14273,11 @@ The fill color is associated with the current 
environment
 @cindex including a file (@code{so})
 @cindex file, inclusion (@code{so})
 Read in the specified @var{file} and include it in place of the
-@code{so} request.  This is quite useful for large documents, e.g.@:
-keeping each chapter in a separate file.  @xref{gsoelim}, for more
-information.
+@code{so} request.  If @var{file} does not exist, a warning of type
+@samp{file} is emitted and the request has no other effect.
+@xref{Debugging}, for information about warnings.  This is quite useful
+for large documents, e.g.@: keeping each chapter in a separate file.
+@xref{gsoelim}, for more information.
 
 Since @code{gtroff} replaces the @code{so} request with the contents of
 @code{file}, it makes a difference whether the data is terminated with a
@@ -14312,13 +14314,12 @@ for @code{pso} also.
 @endDefreq
 
 @Defreq {mso, file}
-Identical to the @code{so} request except that @code{gtroff} searches
-for the specified @var{file} in the same directories as macro files for
-the @option{-m} command-line option.  If the file name to be included
-has the form @file{@var{name}.tmac} and it isn't found, @code{mso} tries
-to include @file{tmac.@var{name}} and vice versa.  If the file does not
-exist, a warning of type @samp{file} is emitted.  @xref{Debugging}, for
-information about warnings.
+Identical to the @code{so} request
+except that @code{gtroff} searches for the specified @var{file} in the
+same directories as macro files for the @option{-m} command-line option.
+If the file name to be included has the form @file{@var{name}.tmac} and
+it isn't found, @code{mso} tries to include @file{tmac.@var{name}} and
+vice versa.
 @endDefreq
 
 @DefreqList {trf, file}

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 49/54: Fix building with "make distcheck".

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 4ca4618d36dc5623d9b27c6eb1e6d57065e27325
Author: G. Branden Robinson 
AuthorDate: Sun Apr 18 15:40:18 2021 +1000

Fix building with "make distcheck".

Lo and behold, a new application of "test-groff" arises...
---
 BRANCH-TODO  | 1 -
 contrib/sboxes/sboxes.am | 7 +--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/BRANCH-TODO b/BRANCH-TODO
index ea6f3dc..d24e76b 100644
--- a/BRANCH-TODO
+++ b/BRANCH-TODO
@@ -5,7 +5,6 @@ $ git rebase master
 
 Resolve the following issues.
 
-* Get it building with 'make distcheck'.
 * Style-tweak the new document msboxes.pdf.
   - Use BI in title.
   - Recast language to time-proof it (avoid "recent").
diff --git a/contrib/sboxes/sboxes.am b/contrib/sboxes/sboxes.am
index e362467..01bc0ce 100644
--- a/contrib/sboxes/sboxes.am
+++ b/contrib/sboxes/sboxes.am
@@ -15,6 +15,7 @@ dist_sboxesexample_DATA = $(SBOXES_EXAMPLEFILES)
 SBOXES_PROCESSEDEXAMPLEFILES = contrib/sboxes/msboxes.pdf
 sboxesprocessedexampledir = $(exampledir)/sboxes
 nodist_sboxesprocessedexample_DATA = $(SBOXES_PROCESSEDEXAMPLEFILES)
+MOSTLYCLEANFILES += $(SBOXES_PROCESSEDEXAMPLEFILES)
 else
 EXTRA_DIST += $(SBOXES_EXAMPLEFILES)
 endif
@@ -22,9 +23,11 @@ endif
 $(SBOXES_PROCESSEDEXAMPLEFILES): $(SBOXES_NORMAL_FILES) \
   groff troff gropdf font/devpdf/build_font_files
 
-contrib/sboxes/msboxes.pdf:
+TEST_GROFF=$(top_builddir)/test-groff
+
+contrib/sboxes/msboxes.pdf: $(sboxes_srcdir)/msboxes.ms $(TEST_GROFF)
mkdir -p $(top_builddir)/contrib/sboxes/
-   $(top_builddir)/groff $(SBOXES_FLAGS) $(sboxes_srcdir)/msboxes.ms > $@
+   $(TEST_GROFF) $(SBOXES_FLAGS) $(sboxes_srcdir)/msboxes.ms > $@
 
 uninstall_groffdirs: uninstall_sboxes
 uninstall_sboxes:

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 48/54: BRANCH-TODO: Add "acceptance criteria".

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit f5d37ff4337eafda031838ff213c2747941ac55f
Author: G. Branden Robinson 
AuthorDate: Sun Apr 18 15:26:29 2021 +1000

BRANCH-TODO: Add "acceptance criteria".
---
 BRANCH-TODO | 36 
 1 file changed, 36 insertions(+)

diff --git a/BRANCH-TODO b/BRANCH-TODO
new file mode 100644
index 000..ea6f3dc
--- /dev/null
+++ b/BRANCH-TODO
@@ -0,0 +1,36 @@
+Keep this branch up to date with 'master'.
+
+$ git checkout $THIS_BRANCH
+$ git rebase master
+
+Resolve the following issues.
+
+* Get it building with 'make distcheck'.
+* Style-tweak the new document msboxes.pdf.
+  - Use BI in title.
+  - Recast language to time-proof it (avoid "recent").
+  - Use correct \[aq] glyphs in code literals.
+  - The font is wrong outside the box once the document source is
+presented (headers and footnotes are in Courier on pp. 3-4).
+* Update gropdf(1) to document \X'pdf: background'.
+* Decide on a place in the existing ms name space definition for the new
+  macros.  "BoxStart" and "BoxStop" are in the part we say we won't use.
+  Maybe "BOXSTART" and "BOXSTOP" or "BOX1" and "BOX2".  ("B1" and "B2"
+  already exist and are similar, with much less functionality.)
+* Does sboxes need to be in contrib?  gropdf isn't.  Can we put it in
+  tmac?
+* Should we opportunistically load sboxes.tmac from s.tmac?  The user
+  would then not need to specify an "-msboxes" argument to groff.
+  (AT troff did this to modularize ms with
+  tmac.s{cover,disp,keep,refs}.)
+* Fix copyright notices.  This is piping fresh 2021 stuff.
+
+When commits have been to the branch resolving all of the above, delete
+this file and rebase the branch onto master.
+
+$ git checkout master
+$ git rebase $THIS_BRANCH
+
+If this branch was kept up to date, there should be no problems.
+
+GBR, 2021-04-18

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 46/54: doc/me{intro,ref}.me: Use "point size" correctly.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 5e46b038e35d990ec3ef18dc0d8fb04031d2fe87
Author: Dave Kemper 
AuthorDate: Fri Apr 16 11:50:37 2021 +

doc/me{intro,ref}.me: Use "point size" correctly.

Fixes .
---
 ChangeLog  |  8 
 doc/meintro.me | 12 ++--
 doc/meref.me   | 36 ++--
 3 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b63f0c8..871d46c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-04-17  Dave Kemper 
+
+   * doc/meintro.me:
+   * doc/meref.me: Correct and make consistent usage of the term
+   "point size".
+
+   Fixes .
+
 2021-04-17  G. Branden Robinson 
 
* tmac/an-old.tmac (SS): Add devtags support.  Set a subsection
diff --git a/doc/meintro.me b/doc/meintro.me
index 2b0e91b..3514492 100644
--- a/doc/meintro.me
+++ b/doc/meintro.me
@@ -2108,7 +2108,7 @@ The default point size
 is 10 points
 for most text,
 8 points for footnotes.
-To change the pointsize,
+To change the point size,
 type:
 .(b
 \&.sz \c
@@ -2126,20 +2126,20 @@ between adjacent lines)
 is set to be proportional
 to the type size.
 .pp
-These pointsize changes are
+These point-size changes are
 .i temporary !!!
 For example,
-to reset the pointsize of basic text to twelve point, use:
+to reset the point size of basic text to twelve point, use:
 .(b
 \&.nr pp 12
 \&.nr sp 12
 \&.nr tp 12
 .)b
-to reset the default pointsize of
+to reset the default point size of
 paragraphs,
 section headers,
 and titles respectively.
-If you only want to set the names of sections in a larger pointsize,
+If you only want to set the names of sections in a larger point size,
 use:
 .(b
 \&.nr sp 11
@@ -2150,7 +2150,7 @@ alone \*- this sets section titles
 above)
 in a larger font than the default.
 .pp
-A single word or phrase can be set in a smaller pointsize
+A single word or phrase can be set in a smaller point size
 than the surrounding text
 using the
 .b .sm
diff --git a/doc/meref.me b/doc/meref.me
index 359dd67..73ea081 100644
--- a/doc/meref.me
+++ b/doc/meref.me
@@ -96,7 +96,7 @@ Specifically,
 the reader should understand
 breaks,
 fonts,
-pointsizes,
+point sizes,
 the use and definition of number registers
 and strings,
 how to define macros,
@@ -1115,11 +1115,11 @@ on the current page.
 .b .sz
 .i +P
 .DE
-The pointsize is set to
+The point size is set to
 .i P
 [10p],
 and the line spacing is set proportionally.
-The line spacing as a percentage of the pointsize expressed in units
+The line spacing as a percentage of the point size expressed in units
 is stored in
 .NR ($v .
 The percentage used internally
@@ -1133,8 +1133,8 @@ This size is
 sticky beyond many macros:
 in particular,
 .NR (pp
-(paragraph pointsize)
-modifies the pointsize every time a new paragraph is begun
+(paragraph point size)
+modifies the point size every time a new paragraph is begun
 using the
 .b \&.pp ,
 .b \&.lp ,
@@ -1145,15 +1145,15 @@ or
 macros.
 Also,
 .NR (fp
-(footnote pointsize),
+(footnote point size),
 .NR (qp
-(quote pointsize),
+(quote point size),
 .NR (sp
-(section header pointsize),
+(section header point size),
 and
 .NR (tp
-(title pointsize)
-may modify the pointsize.
+(title point size)
+may modify the point size.
 .TL
 .b .r
 .i W
@@ -1270,7 +1270,7 @@ it is safe in nofill mode only.
 .DE
 Sets
 .i W
-in a smaller pointsize,
+in a smaller point size,
 with
 .i X
 appended.
@@ -2108,7 +2108,7 @@ NAME  TYPEDESCRIPTION
 \en(fi R   footnote indent (first line only)
 \en(fm R   footer margin
 \&.fo  M   set footer
-\en(fp R   footnote pointsize
+\en(fp R   footnote point size
 \en(fs R   footnote prespace
 \en(fu R   footnote undent (from right margin)
 \eh\'\fI\\fP\'   F\(sc   local horizontal motion for distance \fI\\fP
@@ -2162,13 +2162,13 @@ NAMETYPEDESCRIPTION
 \&.po  M\(sc   page offset
 \en(po R   simulated page offset
 \&.pp  M   begin paragraph
-\en(pp R   paragraph pointsize
+\en(pp R   paragraph point size
 \en(ps R   paragraph prespace
 \&.q   M   quoted
 \e*(qa S   for all
 \e*(qe S   there exists
 \en(qi R   quote indent (also shortens line)
-\en(qp R   quote pointsize
+\en(qp R   quote point size
 \en(qs R   quote pre/post space
 \&.r   M   roman font
 \&.rb  M   real bold font
@@ -2185,14 +2185,14 @@ NAMETYPEDESCRIPTION
 \&.sh  M   begin numbered section
 \en(si R   relative base indent per section depth
 \&.sk  M   skip next page
-\&.sm  M   set argument in a smaller pointsize
+\&.sm  M   set argument in a smaller point size
 \&.so  M\(sc   source input file
 \en(so R   additional section title offset
 \&.sp  M\(sc   vertical space (except at top of page, in contrast to .bl)
-\en(sp R   section title pointsize
+\en(sp R  

[groff] 45/54: tmac/an-old.tmac (SS): Add devtags support.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 7c1303ff9ad77d121ae1afcad3fa156f8e8310c3
Author: G. Branden Robinson 
AuthorDate: Sat Apr 17 11:43:36 2021 +1000

tmac/an-old.tmac (SS): Add devtags support.

Set a subsection title as a second-level heading and add it to a table
of contents, if any.  Prompted by a query from Hans Unzner to the groff
mailing list.  Thanks, Hans!
---
 ChangeLog| 7 +++
 tmac/an-old.tmac | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index be37277..b63f0c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-04-17  G. Branden Robinson 
 
+   * tmac/an-old.tmac (SS): Add devtags support.  Set a subsection
+   title as a second-level heading and add it to a table of
+   contents, if any.  Prompted by a query from Hans Unzner to the
+   groff mailing list.  Thanks, Hans!
+
+2021-04-17  G. Branden Robinson 
+
* tmac/an-old.tmac (SH): Fix apparent thinko.  Pass the devtags
macro a literal "1" argument.  Passing it \n[an-level] wasn't
correct (it stores the relative inset level, not a sectioning
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 96ce559..ad13147 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -337,6 +337,8 @@
 .  fi
 .  in \\n[IN]u
 .  ti \\n[SN]u
+.  nr need_eo_h 1
+.  DEVTAG-SH 2
 .  itc 1 an-trap
 .  nr an-no-space-flag 1
 .  nr an-break-flag 1

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 43/54: groff_char(7): Add tab to fundamental charset.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 8f8106b03b9ca364ec3fd0bc87e6df56f07930bc
Author: G. Branden Robinson 
AuthorDate: Fri Apr 16 12:25:41 2021 +1000

groff_char(7): Add tab to fundamental charset.
---
 man/groff_char.7.man | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/man/groff_char.7.man b/man/groff_char.7.man
index b5ce186..6dc31d2 100644
--- a/man/groff_char.7.man
+++ b/man/groff_char.7.man
@@ -226,7 +226,9 @@ which is one reason it does not support UTF-8 natively.
 .\" 
 .
 The ninety-four characters catalogued above,
-plus the space and the newline,
+plus the space,
+tab,
+and newline,
 form the fundamental character
 set for
 .I groff

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 36/54: tmac/en.tmac: Set hyphenation mode to 4.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 0907d730894da5e34bc27f15680f8b13cc7ab1ba
Author: G. Branden Robinson 
AuthorDate: Fri Jan 15 03:27:15 2021 +1100

tmac/en.tmac: Set hyphenation mode to 4.
---
 tmac/en.tmac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tmac/en.tmac b/tmac/en.tmac
index 6aae40d..0bc4196 100644
--- a/tmac/en.tmac
+++ b/tmac/en.tmac
@@ -22,6 +22,9 @@
 .
 .ds locale english\"
 .
+.\" Set the minimum hyphenation mode that works with the patterns.
+.hy 4
+.
 .\" Set the hyphenation language to English.
 .do hla en
 .

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 35/54: tmac/troffrc: Derive groff locale from system.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 4a639b37fc6ce331f4ca4d12cf320ec4c20cd783
Author: G. Branden Robinson 
AuthorDate: Mon Jan 4 17:53:05 2021 +1100

tmac/troffrc: Derive groff locale from system.

Determine the groff locale (default input language) using the system
locale.  Use the environment if possible.  Try LC_ALL first, then LANG.
"C" means English (en).  Otherwise, only the first two characters of the
locale name are used.

Unrecognized locales (those without a supporting xx.tmac file) are
ignored, and groff falls back to English.

Those who want groff's default locale to differ from LC_ALL/LANG should
edit this troffrc to source the appropriate groff locale macro file
(cs.tmac, de.tmac, den.tmac, fr.tmac, ja.tmac, sv.tmac, zh.tmac).
---
 tmac/troffrc | 27 ++-
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/tmac/troffrc b/tmac/troffrc
index d0d54b8..3ab545f 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -54,12 +54,29 @@ troffrc!html
 .el \
 .  do tr \[char65]\~
 .
-.\" Set the hyphenation language to English.
-.do hla en
 .
-.\" Load hyphenation patterns and exceptions.
-.do hpf hyphen.en
-.do hpfa hyphenex.en
+.\" Determine the groff locale from the environment if possible.  Try
+.\" LC_ALL first, then LANG.  "C" means English (en).  Otherwise, only
+.\" the first two characters of the locale name are used.
+.do ds troffrc!language \V[LC_ALL]
+.do if '\*[troffrc!language]'' \{\
+.  do ds troffrc!language \V[LANG]
+.  do if '\*[troffrc!language]'' \
+.  do ds troffrc!language C
+.\}
+.do if '\*[troffrc!language]'C' \
+.  do ds troffrc!language en
+.do length troffrc!lang_length \*[troffrc!language]
+.do if (\n[troffrc!lang_length] > 2) \
+.  do substring troffrc!language 0 1
+.do msoquiet \*[troffrc!language].tmac
+.do rm troffrc!language
+.do rr troffrc!lang_length
+.\" If the configured system locale has no groff localization, fall back
+.\" to English.
+.do if !d locale \
+.  do mso en.tmac
+.
 .
 .\" Handle paper formats.
 .do mso papersize.tmac

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 33/54: [troffrc]: Change hyphenation language us to en.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 2051302b96b17c339dc126c2e1eff2ca802605a3
Author: G. Branden Robinson 
AuthorDate: Mon Jan 4 17:10:20 2021 +1100

[troffrc]: Change hyphenation language us to en.
---
 tmac/troffrc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tmac/troffrc b/tmac/troffrc
index 2ba343e..d0d54b8 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -54,12 +54,12 @@ troffrc!html
 .el \
 .  do tr \[char65]\~
 .
-.\" Set the hyphenation language to 'us'.
-.do hla us
+.\" Set the hyphenation language to English.
+.do hla en
 .
 .\" Load hyphenation patterns and exceptions.
-.do hpf hyphen.us
-.do hpfa hyphenex.us
+.do hpf hyphen.en
+.do hpfa hyphenex.en
 .
 .\" Handle paper formats.
 .do mso papersize.tmac

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 32/54: [tmac]: Rename *.us to *.en.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit d104ae8074a0f36fa90b57f653b329489a1daaff
Author: G. Branden Robinson 
AuthorDate: Mon Jan 4 16:59:03 2021 +1100

[tmac]: Rename *.us to *.en.

The first-order determinant of hyphenation points is language, not
territory.  Use ISO 639 2-letter language codes for hyphenation and
exception patterns instead of ISO 3166 2-letter territory codes.
---
 tmac/{hyphen.us => hyphen.en} | 0
 tmac/{hyphenex.us => hyphenex.en} | 0
 tmac/tmac.am  | 4 ++--
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tmac/hyphen.us b/tmac/hyphen.en
similarity index 100%
rename from tmac/hyphen.us
rename to tmac/hyphen.en
diff --git a/tmac/hyphenex.us b/tmac/hyphenex.en
similarity index 100%
rename from tmac/hyphenex.us
rename to tmac/hyphenex.en
diff --git a/tmac/tmac.am b/tmac/tmac.am
index c4d0ed5..9583210 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -77,8 +77,8 @@ TMACNORMALFILES = \
   tmac/troffrc \
   tmac/troffrc-end \
   tmac/trans.tmac \
-  tmac/hyphen.us \
-  tmac/hyphenex.us \
+  tmac/hyphen.en \
+  tmac/hyphenex.en \
   tmac/fr.tmac \
   tmac/hyphen.fr \
   tmac/sv.tmac \

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 47/54: doc/groff.texi: Drop Texinfo pre-5.0 workarounds.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit e3563bd9ccef5734b1a67ee7a32cb23de5d6c1c1
Author: G. Branden Robinson 
AuthorDate: Sat Apr 17 21:38:00 2021 +1000

doc/groff.texi: Drop Texinfo pre-5.0 workarounds.

Our local macros produced many warnings during generation of our Texinfo
manual.

* doc/groff.texi (Langlemacro):
  (Ranglemacro):
  (Lparenmacro):
  (Rparenmacro):
  (Lbrackmacro):
  (Rbrackmacro): Delete.  Replace call sites with literals.
  (Lbracemacro):
  (Rbracemacro): Delete.  Replace call sites with @lbracechar{} and
  @rbracechar{}.
  (angles): Reimplement in terms of @guilsinglleft{} and
  @guilsinglright{}.  Flesh out comment.

Fixes remainder of .

I tested Info (text) and PDF generation only with Texinfo 6.7 but in
implementing the changes I used only features documented in the Texinfo
5.0 manual.  I am not certain that the cosmetic/rendering problems (such
as font choice) noted in the now-deleted comments were all fixed by the
time of Texinfo 5.0, but they seem to be now.
---
 ChangeLog  |  19 
 doc/groff.texi | 138 +++--
 2 files changed, 55 insertions(+), 102 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 871d46c..ddef1f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2021-04-17  G. Branden Robinson 
+
+   * doc/groff.texi: Drop workarounds for Texinfo pre-5.0 versions;
+   our local macros produced many warnings during generation of our
+   Texinfo manual.
+   (Langlemacro):
+   (Ranglemacro):
+   (Lparenmacro):
+   (Rparenmacro):
+   (Lbrackmacro):
+   (Rbrackmacro): Delete.  Replace call sites with literals.
+   (Lbracemacro):
+   (Rbracemacro): Delete.  Replace call sites with @lbracechar{}
+   and @rbracechar{}.
+   (angles): Reimplement in terms of @guilsinglleft{} and
+   @guilsinglright{}.  Flesh out comment.
+
+   Fixes remainder of .
+
 2021-04-17  Dave Kemper 
 
* doc/meintro.me:
diff --git a/doc/groff.texi b/doc/groff.texi
index c4600a1..d8f5552 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -404,76 +404,10 @@ developing GNU and promoting software freedom.''
 @end macro
 
 
-@c 
-
-@tex
-\gdef\Langlemacro{\angleleft}
-\gdef\Ranglemacro{\angleright}
-@end tex
-
-@iftex
-@set Langlemacro @Langlemacro
-@set Ranglemacro @Ranglemacro
-@end iftex
-
-@ifnottex
-@set Langlemacro <
-@set Ranglemacro >
-@end ifnottex
+@c Render text with angle brackets around it, as in .
 
 @macro angles{text}
-@value{Langlemacro}@r{\text\}@value{Ranglemacro}
-@end macro
-
-
-@c Special care is required with parentheses, brackets, and braces:
-@c
-@c . Real parentheses in @deffn produce an error while compiling with
-@c   TeX.
-@c . Real brackets use the wrong font in @deffn, overriding @t{}.
-@c
-@c . @{ and @} fail with info if used in a macro.
-@c
-@c Since macros aren't expanded in @deffn during -E, the following
-@c definitions are for non-TeX only.
-@c
-@c This is true for texinfo 4.0 and above.
-
-@iftex
-@set Lparenmacro @lparen
-@set Rparenmacro @rparen
-@set Lbrackmacro @lbrack
-@set Rbrackmacro @rbrack
-@set Lbracemacro @{
-@set Rbracemacro @}
-@end iftex
-
-@ifnottex
-@set Lparenmacro (
-@set Rparenmacro )
-@set Lbrackmacro [
-@set Rbrackmacro ]
-@set Lbracemacro @{
-@set Rbracemacro @}
-@end ifnottex
-
-@macro Lparen{}
-@value{Lparenmacro}
-@end macro
-@macro Rparen{}
-@value{Rparenmacro}
-@end macro
-@macro Lbrack{}
-@value{Lbrackmacro}
-@end macro
-@macro Rbrack{}
-@value{Rbrackmacro}
-@end macro
-@macro Lbrace{}
-@value{Lbracemacro}
-@end macro
-@macro Rbrace{}
-@value{Rbracemacro}
+@guilsinglleft{}@r{\text\}@guilsinglright{}
 @end macro
 
 
@@ -3344,8 +3278,8 @@ Prints all text following in the normal point size (that 
is, the value
 of the @code{PS} register).
 @endDefmac
 
-@DefstrList {@Lbrace{}, ms}
-@DefstrListEndx {@Rbrace{}, ms}
+@DefstrList {@lbracechar{}, ms}
+@DefstrListEndx {@rbracechar{}, ms}
 Text enclosed with @code{\*@{} and @code{\*@}} is printed as a
 superscript.
 @endDefstr
@@ -6504,8 +6438,8 @@ contents do not become inaccessible until it has no more 
names.
 Numeric registers can be accessed via the @code{\n} escape.
 
 @DefescList {\\n, , i, }
-@DefescItem {\\n, @Lparen{}, id, }
-@DefescListEnd {\\n, @Lbrack{}, ident, @Rbrack{}}
+@DefescItem {\\n, (, id, }
+@DefescListEnd {\\n, [, ident, ]}
 @cindex nested assignments
 @cindex assignments, nested
 @cindex indirect assignments
@@ -6558,10 +6492,10 @@ form.
 
 @DefescList {\\n, +, i, }
 @DefescItem {\\n, -, i, }
-@DefescItem {\\n, +@Lparen{}, id, }
-@DefescItem {\\n, -@Lparen{}, id, }
-@DefescItem {\\n, +@Lbrack{}, ident, @Rbrack{}}
-@DefescListEnd {\\n, -@Lbrack{}, ident, @Rbrack{}}
+@DefescItem {\\n, +(, id, }
+@DefescItem {\\n, -(, id, }

[groff] 54/54: contrib/sboxes/msboxes.ms: Use BI in title.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 99f01219a34a7c3ed826bedc8194cc4cbed60b93
Author: G. Branden Robinson 
AuthorDate: Wed Apr 21 04:59:39 2021 +1000

contrib/sboxes/msboxes.ms: Use BI in title.

Use bold italics for italics in the (bold) document title for consistent
weight.
---
 BRANCH-TODO   | 1 -
 contrib/sboxes/msboxes.ms | 8 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/BRANCH-TODO b/BRANCH-TODO
index e6ca956..6c67cdf 100644
--- a/BRANCH-TODO
+++ b/BRANCH-TODO
@@ -6,7 +6,6 @@ $ git rebase master
 Resolve the following issues.
 
 * Style-tweak the new document msboxes.pdf.
-  - Use BI in title.
   - Recast language to time-proof it (avoid "recent").
   - Use correct \[aq] glyphs in code literals.
 * Get the BX=x chatter out of stderr.
diff --git a/contrib/sboxes/msboxes.ms b/contrib/sboxes/msboxes.ms
index 84fcc5a..e346b3d 100644
--- a/contrib/sboxes/msboxes.ms
+++ b/contrib/sboxes/msboxes.ms
@@ -18,7 +18,9 @@
 .OF 
 .ds FAM H
 .TL
-Using PDF boxes with the \f[I]ms\f[] macros
+Using PDF boxes with the
+.BI ms
+macros
 .AU
 Deri James
 .AI
@@ -163,7 +165,9 @@ The above was produced by the following code.
 \&.OF 
 \&.ds FAM H
 \&.TL
-Using PDF boxes with the \ef[I]ms\ef[] macros
+Using PDF boxes with the
+\&.BI ms
+macros
 \&.AU
 Deri James
 \&.AI

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 52/54: BRANCH-TODO: Add item.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 1400cd34eb6a3c81cd5a0e79d3fe525501bb76f4
Author: G. Branden Robinson 
AuthorDate: Wed Apr 21 04:38:27 2021 +1000

BRANCH-TODO: Add item.
---
 BRANCH-TODO | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BRANCH-TODO b/BRANCH-TODO
index d24e76b..98eeced 100644
--- a/BRANCH-TODO
+++ b/BRANCH-TODO
@@ -11,6 +11,7 @@ Resolve the following issues.
   - Use correct \[aq] glyphs in code literals.
   - The font is wrong outside the box once the document source is
 presented (headers and footnotes are in Courier on pp. 3-4).
+* Get the BX=x chatter out of stderr.
 * Update gropdf(1) to document \X'pdf: background'.
 * Decide on a place in the existing ms name space definition for the new
   macros.  "BoxStart" and "BoxStop" are in the part we say we won't use.

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 25/54: doc/groff.texi (Built-in registers): Revise.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 178439303c4e7542e210ee0dc306b0919ae8f0b6
Author: G. Branden Robinson 
AuthorDate: Mon Apr 12 19:12:11 2021 +1000

doc/groff.texi (Built-in registers): Revise.

* doc/groff.texi (Built-in registers):
  - Say "GNU troff" instead of "gtroff".
  - Stop saying that registers "return" things; they are not functions.
  - Add footnote explaining constant value of `.R` register.
  - Standardize description of boolean-valued registers.
  - Note that month, day, and year registers are (also) initialized at
program start.
  - Add CSTR #54 erratum index entries for its mis-description of `yr`
register.  Recast description of the problem with it.  Convert
colon-terminated sentence fragments to grammatical prose.
  - Make minor clarifications.
  - Move @codequote* commands to mark this node as reviewed for correct
grave accent and apostrophe glyph usage.

* man/groff_diff.7.man (Language/New number registers) : Sync with
  doc/groff.texi.
---
 doc/groff.texi   | 129 +++
 man/groff_diff.7.man |   7 ++-
 2 files changed, 71 insertions(+), 65 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 1cfcfae..e9cef7d 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -6698,37 +6698,41 @@ returned.
 
 @c -
 
+@codequotebacktick on
+@codequoteundirected on
+
 @node Built-in Registers,  , Assigning Formats, Registers
 @subsection Built-in Registers
 @cindex built-in registers
 @cindex registers, built-in
 
 The following lists some built-in registers that are not described
-elsewhere in this manual.  Any register that begins with a @samp{.} is
-read-only.  A complete listing of all built-in registers can be found in
-@ref{Register Index}.
+elsewhere in this manual.  Any register name that begins with a @samp{.}
+is read-only.  A complete listing of all built-in registers can be found
+in @ref{Register Index}.
 
 @table @code
 @item \n[.F]
 @cindex current input file name register (@code{.F})
 @cindex input file name, current, register (@code{.F})
 @vindex .F
-This read-only string-valued register returns the current input file
-name.
+This read-only string-valued register stores the name of the file being
+formatted.
 
 @item \n[.H]
 @cindex horizontal resolution register (@code{.H})
 @cindex resolution, horizontal, register (@code{.H})
 @vindex .H
-Number of basic units per horizontal unit of output device resolution.
-@xref{Measurements}.
+Number of basic units in a unit of horizontal resolution of the output
+device.  @xref{Measurements}.
 
 @item \n[.R]
 @cindex number of registers register (@code{.R})
 @cindex registers, number of, register (@code{.R})
 @vindex .R
-The number of registers available.  This is always 1 in
-GNU@tie{}@code{troff}; it exists for backward compatibility.
+Number of registers available.  This is always 1 in GNU
+@code{troff};@footnote{GNU @code{troff} dynamically allocates memory for
+as many registers as required.} it exists for backward compatibility.
 
 @item \n[.U]
 @cindex safer mode
@@ -6736,16 +6740,15 @@ GNU@tie{}@code{troff}; it exists for backward 
compatibility.
 @cindex unsafe mode
 @cindex mode, unsafe
 @vindex .U
-If @code{gtroff} is called with the @option{-U} command-line option to
-activate unsafe mode, the register @code{.U} is set to@tie{}1, and to
-zero otherwise.  @xref{Groff Options}.
+1 if GNU @code{troff} is called with the @option{-U} command-line option
+to activate unsafe mode, and zero otherwise.  @xref{Groff Options}.
 
 @item \n[.V]
 @cindex vertical resolution register (@code{.V})
 @cindex resolution, vertical, register (@code{.V})
 @vindex .V
-Number of basic units per vertical unit of output device resolution.
-@xref{Measurements}.
+Number of basic units in a unit of vertical resolution of the output
+device.  @xref{Measurements}.
 
 @item \n[seconds]
 @cindex seconds, current time (@code{seconds})
@@ -6754,7 +6757,7 @@ Number of basic units per vertical unit of output device 
resolution.
 @vindex seconds
 The number of seconds after the minute, normally in the range@tie{}0
 to@tie{}59, but can be up to@tie{}61 to allow for leap seconds.
-Initialized at start-up of @code{gtroff}.
+Initialized at start-up of GNU @code{troff}.
 
 @item \n[minutes]
 @cindex minutes, current time (@code{minutes})
@@ -6762,7 +6765,7 @@ Initialized at start-up of @code{gtroff}.
 @cindex current time, minutes (@code{minutes})
 @vindex minutes
 The number of minutes after the hour, in the range@tie{}0 to@tie{}59.
-Initialized at start-up of @code{gtroff}.
+Initialized at start-up of GNU @code{troff}.
 
 @item \n[hours]
 @cindex hours, current time (@code{hours})
@@ -6770,55 +6773,57 @@ Initialized at start-up of @code{gtroff}.
 @cindex current time, hours (@code{hours})
 @vindex hours

[groff] 44/54: tmac/an-old.tmac (SH): Fix apparent thinko.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit c0193e5cd7be6f6eb19b8e30ff61f4b62a9ecdaa
Author: G. Branden Robinson 
AuthorDate: Sat Apr 17 11:38:00 2021 +1000

tmac/an-old.tmac (SH): Fix apparent thinko.

Pass the devtags macro a literal "1" argument.  Passing it \n[an-level]
wasn't correct (it stores the relative inset level, not a sectioning
level), and was useless anyway: SH has already called .an-set-margin by
this point, which resets \n[an-level] to 1.  man(7) does not support
nesting of SH macros.  Also call .DEVTAG-NH by its alias .DEVTAG-SH
since section headings are not numbered in man(7).
---
 ChangeLog| 11 +++
 tmac/an-old.tmac |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 113a5ff..be37277 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2021-04-17  G. Branden Robinson 
+
+   * tmac/an-old.tmac (SH): Fix apparent thinko.  Pass the devtags
+   macro a literal "1" argument.  Passing it \n[an-level] wasn't
+   correct (it stores the relative inset level, not a sectioning
+   level), and was useless anyway: SH has already called
+   .an-set-margin by this point, which resets \n[an-level] to 1.
+   man(7) does not support nesting of SH macros.  Also call
+   .DEVTAG-NH by its alias .DEVTAG-SH since section headings are
+   not numbered in man(7).
+
 2021-04-15  G. Branden Robinson 
 
[tmac]: Adjust editor file encoding hints.
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index ba1ad64..96ce559 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -317,7 +317,7 @@
 .  in \\n[an-margin]u
 .  ti 0
 .  nr need_eo_h 1
-.  DEVTAG-NH \\n[an-level]
+.  DEVTAG-SH 1
 .  itc 1 an-trap
 .  nr an-no-space-flag 1
 .  nr an-break-flag 1

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 38/54: Test localization refactor.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 3052e2f31c4bca107be6cddb6c1c1761c45bdcb4
Author: G. Branden Robinson 
AuthorDate: Tue Apr 13 15:35:51 2021 +1000

Test localization refactor.

* src/roff/groff/tests/localization_works.sh: Add 10 test cases.
* src/roff/groff/groff.am (groff_TESTS): Run test.
---
 src/roff/groff/groff.am|  1 +
 src/roff/groff/tests/localization_works.sh | 92 ++
 2 files changed, 93 insertions(+)

diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 42fb983..faf8406 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -45,6 +45,7 @@ groff_TESTS = \
   src/roff/groff/tests/do_not_loop_infinitely_when_breaking_cjk.sh \
   src/roff/groff/tests/dot-cp_register_works.sh \
   src/roff/groff/tests/dot-nm_register_works.sh \
+  src/roff/groff/tests/localization_works.sh \
   src/roff/groff/tests/msoquiet_works.sh \
   src/roff/groff/tests/on_latin1_device_oq_is_0x27.sh \
   src/roff/groff/tests/recognize_end_of_sentence.sh \
diff --git a/src/roff/groff/tests/localization_works.sh 
b/src/roff/groff/tests/localization_works.sh
new file mode 100755
index 000..3418c34
--- /dev/null
+++ b/src/roff/groff/tests/localization_works.sh
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+set -e
+
+export LC_ALL LANG
+
+DOC='\*[locale]'
+
+# Test fallback/conflicting cases.
+
+echo "testing that LC_ALL= LANG= loads English localization" >&2
+LC_ALL=
+LANG=
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx english
+
+echo "testing that LC_ALL=en_US loads English localization" >&2
+LC_ALL=en_US
+LANG=
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx english
+
+echo "testing that LC_ALL=en_US LANG=fr_FR loads English localization" \
+  >&2
+LC_ALL=en_US
+LANG=fr_FR
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx english
+
+# Test straightforward cases.
+
+echo "testing that LC_ALL= LANG=cs_CZ loads Czech localization" >&2
+LC_ALL=
+LANG=cs_CZ
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx czech
+
+echo "testing that LC_ALL= LANG=de_DE loads German localization" >&2
+LC_ALL=
+LANG=de_DE
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx german
+
+echo "testing that LC_ALL= LANG=en_US loads English localization" >&2
+LC_ALL=
+LANG=en_US
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx english
+
+echo "testing that LC_ALL= LANG=fr_FR loads French localization" >&2
+LC_ALL=
+LANG=fr_FR
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx french
+
+echo "testing that LC_ALL= LANG=ja_JP loads Japanese localization" >&2
+LC_ALL=
+LANG=ja_JP
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx japanese
+
+echo "testing that LC_ALL= LANG=sv_SE loads Swedish localization" >&2
+LC_ALL=
+LANG=sv_SE
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx swedish
+
+echo "testing that LC_ALL= LANG=zh_ZH loads Chinese localization" >&2
+LC_ALL=
+LANG=zh_ZH
+OUTPUT=$(echo "$DOC" | "$groff" -Tascii)
+echo "$OUTPUT" | grep -qx chinese

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 20/54: doc/groff.texi: Drop example.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 85b193632616bcf018dd71b813d4b301d4af6242
Author: G. Branden Robinson 
AuthorDate: Sun Apr 11 09:13:45 2021 +1000

doc/groff.texi: Drop example.

It wasn't illustrating anything particular about the .hla register, and
could be misleading--you don't need to copy a string-valued register
into a string to interpolate it.
---
 doc/groff.texi | 6 --
 1 file changed, 6 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 541dda1..4279eca 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7688,12 +7688,6 @@ usually invoked by the @file{troffrc} or 
@file{troffrc-end} files;
 The hyphenation language is available in the read-only string-valued
 register @samp{.hla}; it is associated with the environment
 (@pxref{Environments}).
-
-@Example
-.ds curr_language \n[.hla]
-\*[curr_language]
-@result{} us
-@endExample
 @endDefreq
 
 @DefreqList {hlm, [@Var{n}]}

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 42/54: doc/groff.texi: Tweak style.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 6a8226e1fc8c23fe1c81f9124ee8942a9dcac838
Author: G. Branden Robinson 
AuthorDate: Fri Apr 16 22:47:31 2021 +1000

doc/groff.texi: Tweak style.

(Hyphenation): Explicitly note availability of manual hyphenation in
lead paragraph.  Will the quest to explain *roff hyphenation lucidly
ever end?

(Tab Stops): Clarify context when WYSIWYG formatting is misleading.

(Manipulating Hyphenation) : Remove restrictive appositive; we just
told the reader in the previous paragraph that the hyphenation character
is configurable.
---
 doc/groff.texi   | 34 +-
 man/groff_diff.7.man |  3 +--
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 4dc29ce..c4600a1 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -4699,10 +4699,10 @@ collected from the input to exactly fill 
it---typically, there is room
 left over only for part of the next word.  The process of splitting a
 word so that it appears partially on one line (with a hyphen to indicate
 to the reader that the word has been broken) with the remainder of the
-word on the next is @dfn{hyphenation}.  GNU @code{troff} uses a
-hyphenation algorithm and language-specific pattern files (based on but
-simplified from those used in @TeX{}) to decide which words can be
-hyphenated and where.
+word on the next is @dfn{hyphenation}.  Hyphenation points can be
+manually specified; GNU @code{troff} also uses a hyphenation algorithm
+and language-specific pattern files (based on those used in @TeX{}) to
+decide which words can be hyphenated and where.
 
 Hyphenation does not always occur even when the hyphenation rules for a
 word allow it; it can be disabled, and when not disabled there are
@@ -4804,9 +4804,9 @@ These tab stops are by default located every half inch 
across the page.
 With them, simple tables can be made easily.@footnote{``Tab'' is short
 for ``tabulation'', revealing the term's origin as a spacing mechanism
 for table arrangement.}  However, this method can be deceptive as the
-appearance (and width) of the text on a terminal and the results from
-GNU @code{troff} can vary greatly, particularly when proportional
-typefaces are used.
+appearance (and width) of the text in an editor and the results from GNU
+@code{troff} can vary greatly, particularly when proportional typefaces
+are used.
 
 A tab character does not cause a break and therefore does not interrupt
 filling.  We use an arrow @arrow{} below to indicate an input tab
@@ -7394,16 +7394,16 @@ The hyphenation character is associated with the 
environment
 @cindex @code{tr} request, and soft hyphen character
 Set the @dfn{soft hyphen character},@footnote{``Soft hyphen
 @emph{character}'' is a misnomer since it is an output glyph.} inserted
-when a word is hyphenated automatically or at a hyphenation character
-@code{\%}, to@tie{}@var{glyph}.@footnote{It is ``soft'' because it only
-appears in output where hyphenation is actually performed; a ``hard''
-hyphen, as in ``long-term'', always appears.}  If the argument is
-omitted, the soft hyphen glyph is set to the default, @code{\[hy]}.  If
-the selected glyph does not exist in the font in use at a potential
-hyphenation point, then the line is not broken at that point.  Neither
-character definitions (specified with the @code{char} and similar
-requests) nor translations (specified with the @code{tr} request) are
-considered when assigning the soft hyphen glyph.
+when a word is hyphenated automatically or at a hyphenation character,
+to@tie{}@var{glyph}.@footnote{It is ``soft'' because it only appears in
+output where hyphenation is actually performed; a ``hard'' hyphen, as in
+``long-term'', always appears.}  If the argument is omitted, the soft
+hyphen glyph is set to the default, @code{\[hy]}.  If the selected glyph
+does not exist in the font in use at a potential hyphenation point, then
+the line is not broken at that point.  Neither character definitions
+(specified with the @code{char} and similar requests) nor translations
+(specified with the @code{tr} request) are considered when assigning the
+soft hyphen glyph.
 @endDefreq
 
 @cindex hyphenation parameters, automatic
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 8d8bde6..d580c97 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -2803,8 +2803,7 @@ request but before the mounted special fonts.
 .BI .shc\~ glyph
 Set the soft hyphen glyph,
 inserted when a word is hyphenated automatically or at a hyphenation
-character
-.BR \[rs]% ,
+character,
 .RI to\~ glyph .
 .
 If the argument is omitted,

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 40/54: [tmac]: Adjust editor file encoding hints.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 3f6cc9d5280f8c267bf558f61918e4955e354009
Author: G. Branden Robinson 
AuthorDate: Tue Apr 13 18:26:27 2021 +1000

[tmac]: Adjust editor file encoding hints.

* tmac/cs.tmac: Tell Vim the file is "iso-8859-2" (ISO Latin-2).
* tmac/en.tmac: Stop telling Emacs the file is "latin-1"; it's ASCII.
* tmac/fr.tmac: Tell Vim the file is "iso-8859-15" (ISO Latin-9).

Vim users may need to use ":e ++enc=iso-8859-2", for instance, to see
correct glyphs.
---
 tmac/cs.tmac | 2 +-
 tmac/en.tmac | 1 -
 tmac/fr.tmac | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tmac/cs.tmac b/tmac/cs.tmac
index b59e0a3..17ae8a7 100644
--- a/tmac/cs.tmac
+++ b/tmac/cs.tmac
@@ -176,4 +176,4 @@
 .\" coding: latin-2
 .\" fill-column: 72
 .\" End:
-.\" vim: set filetype=groff textwidth=72:
+.\" vim: set fileencoding=iso-8859-2 filetype=groff textwidth=72:
diff --git a/tmac/en.tmac b/tmac/en.tmac
index 0bc4196..5dbcf68 100644
--- a/tmac/en.tmac
+++ b/tmac/en.tmac
@@ -35,7 +35,6 @@
 .
 .\" Local Variables:
 .\" mode: nroff
-.\" coding: latin-1
 .\" fill-column: 72
 .\" End:
 .\" vim: set filetype=groff textwidth=72:
diff --git a/tmac/fr.tmac b/tmac/fr.tmac
index 90ec202..205ec80 100644
--- a/tmac/fr.tmac
+++ b/tmac/fr.tmac
@@ -196,4 +196,4 @@
 .\" coding: latin-9
 .\" fill-column: 72
 .\" End:
-.\" vim: set filetype=groff textwidth=72:
+.\" vim: set fileencoding=iso-8859-15 filetype=groff textwidth=72:

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 14/54: groff_diff(7): Resync mso with our Texinfo manual.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 92421bd0b388589980f8d2f8a4af32dbfea64ada
Author: G. Branden Robinson 
AuthorDate: Fri Apr 9 12:23:43 2021 +1000

groff_diff(7): Resync mso with our Texinfo manual.
---
 man/groff_diff.7.man | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 096718c..384897b 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -2570,11 +2570,14 @@ tries to include
 .BI tmac. name
 instead and vice versa.
 .
-A warning of type
-.B file
-is generated if
+If
 .I file
-can't be loaded, and the request is ignored.
+does not exist,
+a warning of type
+.RB \[lq] file \[rq]
+is emitted
+and the request has no other effect.
+.
 .
 .TP
 .BI .nop \~anything

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 37/54: [docs]: Update hyphenation and localization stuff.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 3811c1a833f939d1b7d3c13e7909b13f45d19c77
Author: G. Branden Robinson 
AuthorDate: Fri Jan 15 03:38:11 2021 +1100

[docs]: Update hyphenation and localization stuff.

* doc/groff.texi (Manipulating Hyphenation):
* man/groff.7.man (Hyphenation):
* man/groff_diff.7.man (Implementation differences):
  - Refer to "U.S. English" hyphenation patterns as simply "English";
they will be mostly correct for Commonwealth English as well, and no
alternative English hyphenation patterns for other territories are
available.

* doc/groff.texi (Manipulating Hyphenation):
* man/groff_diff.7.man (New requests):
  - Note that default hyphenation mode depends on the language used on
the system.
  - Add concept index entry for localization.
  - Add file index entries for the locale macro files (cs.tmac, etc.).
  - Add environment variable index entries for LANG and LC_ALL.
  - Describe how groff's idea of the locale is determined.
  - Update to reflect rename of English hyphenation patterns and
.hla identifier from "us" to "en".
---
 doc/groff.texi   | 68 
 man/groff.7.man  |  2 +-
 man/groff_diff.7.man | 61 --
 3 files changed, 86 insertions(+), 45 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 96bb6c0..4dc29ce 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7427,7 +7427,9 @@ with up to a certain amount of additional inter-word 
space (@code{hys}).
 Set automatic hyphenation mode to @var{mode}, an integer encoding
 conditions for hyphenation; if omitted, 1 is implied.  The hyphenation
 mode is available in the read-only register @samp{.hy}; it is associated
-with the environment (@pxref{Environments}).
+with the environment (@pxref{Environments}).  The default hyphenation
+mode depends on the language in use on the system; see the @code{hpf}
+request below.
 
 Typesetting practice generally does not avail itself of every
 opportunity for hyphenation, but the details differ by language and site
@@ -7452,8 +7454,7 @@ disables hyphenation.
 
 @item 1
 enables hyphenation except after the first and before the last character
-of a word; this is the default if @var{mode} is omitted and also the
-start-up value of GNU @code{troff}.
+of a word.
 @end table
 
 The remaining values ``imply'' 1; that is, they enable hyphenation
@@ -7523,12 +7524,12 @@ s- plit- t- in- g
 @endExample
 
 @noindent
-instead of the correct `split- ting'.  U.S.@: English patterns as
-distributed with GNU @code{troff} need two characters at the beginning
-and three characters at the end; this means that value@tie{}4 of
-@code{hy} is mandatory.  Value@tie{}8 is possible as an additional
-restriction, but values@tie{}16 and@tie{}32 should be avoided, as should
-mode@tie{}1.  Modes@tie{}4 and@tie{}6 are typical.
+instead of the correct `split- ting'.  English patterns as distributed
+with GNU @code{troff} need two characters at the beginning and three
+characters at the end; this means that value@tie{}4 of @code{hy} is
+mandatory.  Value@tie{}8 is possible as an additional restriction, but
+values@tie{}16 and@tie{}32 should be avoided, as should mode@tie{}1.
+Modes@tie{}4 and@tie{}6 are typical.
 
 A table of left and right minimum character counts for hyphenation as
 needed by the patterns distributed with GNU @code{troff} follows; see
@@ -7538,7 +7539,7 @@ the @cite{groff_tmac@r{(5)}} man page for more 
information on GNU
 @multitable {German traditional}{pattern name}{left min}{right min}
 @headitemlanguage   @tab pattern name @tab left min @tab right min
 @itemCzech  @tab cs   @tab 2@tab 2
-@itemU.S. English   @tab us   @tab 2@tab 3
+@itemEnglish@tab en   @tab 2@tab 3
 @itemFrench @tab fr   @tab 2@tab 3
 @itemGerman traditional @tab det  @tab 2@tab 2
 @itemGerman reformed@tab den  @tab 2@tab 2
@@ -7617,25 +7618,39 @@ Character codes that would otherwise be invalid in GNU 
@code{troff} can
 be used.  By default, every code maps to itself except those for letters
 `A' to `Z', which map to those for `a' to `z'.
 
+@cindex localization
 @pindex troffrc
 @pindex troffrc-end
-@pindex hyphen.us
-@pindex hyphenex.us
+@pindex cs.tmac
+@pindex de.tmac
+@pindex en.tmac
+@pindex fr.tmac
+@pindex ja.tmac
+@pindex sv.tmac
+@pindex zh.tmac
+@tindex LC_ALL
+@tindex LANG
 The set of hyphenation patterns is associated with the language set by
 the @code{hla} request (see below).  The @code{hpf} request is usually
-invoked by the @file{troffrc} or @file{troffrc-end} file; by default,
-@file{troffrc} loads hyphenation patterns and exceptions for U.S.@:
-English (in 

[groff] 30/54: doc/groff.texi: Fix style nit.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 9fe6a74d7d9c9d596135d3bf3baeb5b59b924866
Author: G. Branden Robinson 
AuthorDate: Tue Apr 13 19:12:29 2021 +1000

doc/groff.texi: Fix style nit.
---
 doc/groff.texi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index f876f6e..96bb6c0 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7484,10 +7484,10 @@ enables hyphenation before the last character of a word.
 enables hyphenation after the first character of a word.
 @end table
 
-Apart from value 2, restrictions imposed by the hyphenation mode are
-@emph{not} respected for words whose hyphenations have been explicitly
-specified with the hyphenation character (@samp{\%} by default) or the
-@code{hw} request.
+Apart from value@tie{}2, restrictions imposed by the hyphenation mode
+are @emph{not} respected for words whose hyphenations have been
+explicitly specified with the hyphenation character (@samp{\%} by
+default) or the @code{hw} request.
 
 The nonzero values in the previous table are additive.  For example,
 value@tie{}12 causes GNU @code{troff} to hyphenate neither the last two

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 10/54: doc/groff.texi: Fix content nits.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit fd4c325ae8934c15a40dd48d41fbfd570c345ec3
Author: G. Branden Robinson 
AuthorDate: Fri Apr 9 09:37:37 2021 +1000

doc/groff.texi: Fix content nits.

* doc/groff.texi (Filling): Characterize some escapes as "word
  separators" rather than "word-separating space"; \:, for instance, is
  not a "space".
  (Hyphenation): Recast lead sentence for clarity; it's challenging to
  pivot between byte-at-a-time finite state parsing to the more gestalt
  view of text taken by most human readers.
  (Requests and Macros): Parenthesize a phrase to disambiguate the
  antecedent of a subsequent "that".
---
 doc/groff.texi | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 4a00462..ceaf427 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -4528,10 +4528,10 @@ it can---this is known as @dfn{filling}.  To GNU 
@code{troff}, a
 @dfn{word} is any sequence of one or more characters that aren't spaces,
 tabs, or newlines.  Words are separated by spaces, tabs, newlines, or
 file boundaries.@footnote{There are also @emph{escape sequences} which
-can function as word characters, word-separating space, or neither---the
-last simply have no effect on GNU @code{troff}'s idea of whether its
-input is within a word or not.}  To disable filling, see
-@ref{Manipulating Filling and Adjustment}.
+can function as word characters, word separators, or neither---the last
+simply have no effect on GNU @code{troff}'s idea of whether its input is
+within a word or not.}  To disable filling, see @ref{Manipulating
+Filling and Adjustment}.
 
 @Example
 It is a truth universally acknowledged
@@ -4678,15 +4678,15 @@ Adjustment}.
 @subsection Hyphenation
 @cindex hyphenation
 
-When an output line is nearly full, it is uncommon for the most recent
-word collected from the input to exactly fill it---typically, there is
-enough room left over for part of the next word.  The process of
-splitting a word so that it appears partially on one line (with a hyphen
-to indicate to the reader that the word has been broken) with the
-remainder of the word on the next is @dfn{hyphenation}.  GNU
-@code{troff} uses a hyphenation algorithm and language-specific pattern
-files (based on but simplified from those used in @TeX{}) to decide
-which words can be hyphenated and where.
+When an output line is nearly full, it is uncommon for the next word
+collected from the input to exactly fill it---typically, there is room
+left over only for part of the next word.  The process of splitting a
+word so that it appears partially on one line (with a hyphen to indicate
+to the reader that the word has been broken) with the remainder of the
+word on the next is @dfn{hyphenation}.  GNU @code{troff} uses a
+hyphenation algorithm and language-specific pattern files (based on but
+simplified from those used in @TeX{}) to decide which words can be
+hyphenated and where.
 
 Hyphenation does not always occur even when the hyphenation rules for a
 word allow it; it can be disabled, and when not disabled there are
@@ -4840,8 +4840,8 @@ line}.@footnote{The @key{\RET} escape can alter how an 
input line is
 classified; see @ref{Line Control}.}
 
 @cindex argument
-Requests often take @dfn{arguments}, words separated from the request
-name and each other by spaces that specify details of the action GNU
+Requests often take @dfn{arguments}, words (separated from the request
+name and each other by spaces) that specify details of the action GNU
 @code{troff} is expected to perform.  If a request is meaningless
 without arguments, it is typically ignored.
 

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 34/54: tmac/en.tmac: Add English localization file.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 128073b59cb768cd4ff4b773175b08fa592212ff
Author: G. Branden Robinson 
AuthorDate: Mon Jan 4 17:44:57 2021 +1100

tmac/en.tmac: Add English localization file.
---
 tmac/en.tmac | 38 ++
 tmac/tmac.am |  1 +
 2 files changed, 39 insertions(+)

diff --git a/tmac/en.tmac b/tmac/en.tmac
new file mode 100644
index 000..6aae40d
--- /dev/null
+++ b/tmac/en.tmac
@@ -0,0 +1,38 @@
+.\" English localization for groff
+.\"
+.\" Copyright (C) 2021 Free Software Foundation, Inc.
+.\"
+.\" This file is part of groff.
+.\"
+.\" groff is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation, either version 3 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" groff is distributed in the hope that it will be useful, but WITHOUT
+.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+.\" License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program.  If not, see
+.\" .
+.\"
+.\" Please send comments to gr...@gnu.org.
+.
+.ds locale english\"
+.
+.\" Set the hyphenation language to English.
+.do hla en
+.
+.\" Load hyphenation patterns and exceptions.
+.do hpf hyphen.en
+.do hpfa hyphenex.en
+.
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" coding: latin-1
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 9583210..080415d 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -77,6 +77,7 @@ TMACNORMALFILES = \
   tmac/troffrc \
   tmac/troffrc-end \
   tmac/trans.tmac \
+  tmac/en.tmac \
   tmac/hyphen.en \
   tmac/hyphenex.en \
   tmac/fr.tmac \

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 27/54: groff_diff(7): Protect "U.S." from bad spacing.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 7690ca1927793131e8419d1f3154cb638c7ba1b0
Author: G. Branden Robinson 
AuthorDate: Tue Apr 13 08:13:00 2021 +1000

groff_diff(7): Protect "U.S." from bad spacing.
---
 man/groff_diff.7.man | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index edcf69a..1a56f78 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -2148,7 +2148,7 @@ or
 files;
 .I troffrc
 sets the default language to \[lq]us\[rq]
-(U.S. English).
+(U.S.\& English).
 .
 .
 .IP
@@ -2297,7 +2297,7 @@ or
 file;
 by default,
 .I troffrc
-loads hyphenation patterns and exceptions for U.S. English from the
+loads hyphenation patterns and exceptions for U.S.\& English from the
 files
 .I hyphen.us
 and
@@ -4545,8 +4545,8 @@ does not always hyphenate words as
 .RI AT\~ troff
 does.
 .
-The AT implementation uses a set of hard-coded rules specific to U.S.
-English,
+The AT implementation uses a set of hard-coded rules specific to
+U.S.\& English,
 while
 .I groff
 uses language-specific hyphenation pattern files derived from \*[tx].

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 08/54: ChangeLog: Log Dave's fix for Savannah #60349.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 9f05f423ea6bb3db99b602e8824d7b7fedae6eba
Author: G. Branden Robinson 
AuthorDate: Wed Apr 7 17:07:05 2021 +1000

ChangeLog: Log Dave's fix for Savannah #60349.
---
 ChangeLog | 8 
 1 file changed, 8 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index d0157f1..c12a321 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-04-06  Dave Kemper 
+
+   * src/roff/nroff/nroff.sh: Recognize -k and -K options and pass
+   them through to troff.  Document them in usage message.
+   * src/roff/nroff/nroff.1.man: Document new -k and -K options.
+
+   Fixes .
+
 2021-04-06  G. Branden Robinson 
 
* doc/groff.texi (Manipulating Hyphenation):

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 19/54: doc/groff.texi: Fix "current environment" nit.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 1343e1a6df75285e523a340c7871c23010e0e9cd
Author: G. Branden Robinson 
AuthorDate: Sun Apr 11 08:45:37 2021 +1000

doc/groff.texi: Fix "current environment" nit.

Nearly every use of the word "current" before "environment" is
superfluous; only the requests .evc and .pev alter or observe any
environment other than the current one.

Also merge many single-sentence paragraphs about environmental
associativity of various properties into their neighbors.
Single-sentence paragraphs should be used sparingly, for statements of
great note or Faulkernesque length.  Ours subsitute for the "E"
annotation in CSTR #54.
---
 doc/groff.texi | 159 +++--
 1 file changed, 65 insertions(+), 94 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index b9fefde..541dda1 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -6968,10 +6968,8 @@ the @code{fi} request.
 @cindex fill mode (@code{fi})
 @cindex mode, fill (@code{fi})
 Activate fill mode; a pending output line is broken.  The read-only
-register @code{.u} is set to@tie{}1.
-
-Fill mode enablement status is associated with the current environment
-(@pxref{Environments}).
+register @code{.u} is set to@tie{}1.  The fill mode enablement status is
+associated with the environment (@pxref{Environments}).
 
 See @ref{Line Control}, for interaction with the @code{\c} escape.
 @endDefreq
@@ -6982,10 +6980,8 @@ See @ref{Line Control}, for interaction with the 
@code{\c} escape.
 Activate no-fill mode: the output line length (@pxref{Line Layout}) is
 ignored and output lines are broken where the input lines are.  A
 pending output line is broken and adjustment is suppressed.  The
-register @code{.u} is set to@tie{}0.
-
-Fill mode enablement status is associated with the current environment
-(@pxref{Environments}).
+register @code{.u} is set to@tie{}0.  The fill mode enablement status is
+associated with the environment (@pxref{Environments}).
 
 See @ref{Line Control}, for interaction with the @code{\c} escape.
 @endDefreq
@@ -7066,9 +7062,8 @@ left
 @cindex adjustment mode register (@code{.j})
 The current adjustment mode is available in the read-only register
 @code{.j}; it can be stored and subsequently used to set adjustment.
-
 The adjustment mode and enablement status are associated with the
-current environment (@pxref{Environments}).
+environment (@pxref{Environments}).
 
 The value of @code{.j} for any adjustment mode is an implementation
 detail and should not be relied upon as a programmer's interface.
@@ -7077,10 +7072,8 @@ detail and should not be relied upon as a programmer's 
interface.
 @Defreq {na, }
 Disable adjustment.  This produces the same output as adjustment to the
 left margin, but the value of the adjustment mode register @code{.j} is
-altered differently.
-
-The adjustment mode and enablement status are associated with the
-current environment (@pxref{Environments}).
+altered differently.  The adjustment mode and enablement status are
+associated with the environment (@pxref{Environments}).
 @endDefreq
 
 @DefreqList {brp, }
@@ -7121,7 +7114,7 @@ This is an uninteresting sentence.
 @cindex lines, centering (@code{ce})
 Center the next @var{nnn} input text lines without filling them.  A
 pending output line is broken.  The number of lines still to be centered
-is associated with the current environment (@pxref{Environments}).
+is associated with the environment (@pxref{Environments}).
 
 @cindex @code{ce} request, difference from @w{@samp{.ad c}}
 While the @w{@samp{.ad c}} request also centers text, it fills the text
@@ -7174,7 +7167,7 @@ Align the next @var{nnn} input text lines to the right 
margin without
 filling them.  A pending output line is broken.  The @code{.rj}
 read-only register is the number of lines to be right-justified as set
 by the @code{rj} request.  The number of lines still to be
-right-justified is associated with the current environment
+right-justified is associated with the environment
 (@pxref{Environments}).
 @endDefreq
 
@@ -7211,9 +7204,9 @@ is set to @var{word-space-size}.
 
 The read-only registers @code{.ss} and @code{.sss} hold the values of
 minimal inter-word space and additional inter-sentence space,
-respectively.  These parameters are associated with the current
-environment (@pxref{Environments}), and rounded down to the nearest
-multiple of@tie{}12 on terminal output devices.
+respectively.  These parameters are associated with the environment
+(@pxref{Environments}), and rounded down to the nearest multiple
+of@tie{}12 on terminal output devices.
 
 @cindex fill mode, and inter-sentence space
 @cindex mode, fill, and inter-sentence space
@@ -7378,8 +7371,7 @@ works as the @code{\%} escape normally does, and thus no 
longer appears
 in the output.@footnote{@code{\%} itself stops marking hyphenation
 points but still produces no 

[groff] 06/54: [docs]: Revise hyphenation discussion.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit fc719bf85667c605d53591949dc04d895128c40d
Author: G. Branden Robinson 
AuthorDate: Tue Apr 6 14:50:08 2021 +1000

[docs]: Revise hyphenation discussion.

* doc/groff.texi (Manipulating Hyphenation):
  - Recast introductory paragraph to better distinguish between the
automatic breaking of words and placement of hyphens at
user-specified hyphenation points (done with the \% escape) and
automatic determination of hyphenation points within words (what the
pattern files and most of the hyphenation mode parameters are for).
Clarify that what our manual calls "automatic hyphenation" pertains
only to the latter.
  - Tweak narrative motivating manual hyphenation.
  -  Correct over-general claim; hyphenation exceptions defined with
the .hw request _do_ honor .hy value 2 (don't break a word at the
bottom of a page), but none of the others.
  - <\:> Clarify that escape is an input word boundary.
  -  Reorganize discussion of soft hyphen glyph-setting request.
Recast; "hyphenation" as defined in this manual always implies a
break.  Clarify that the soft hyphen glyph is applied to manual as
well as automatically-determined hyphenation points.  (This further
distinguishes such points from "explicit" hyphens, as in
"mother-in-law".)  Change more uses of soft hyphen "character" to
"glyph".  Tighten wording.
  - Move concept index entry for "automatic hyphenation" to first
discussion of the concept instead of immediately prior to the .hy
request entry.
  - Add concept index entries for "automatic hyphenation parameters",
"explicit hyphenation", "manual hyphenation", and altenate orderings
of these words.
  -  Recharacterize as setting the _automatic_ hyphenation mode.
Tighten wording in footnote regarding vertical location traps.  Note
that restrictions apart from value 2 are not applied to words with
manually-assigned hyphenation points.

* man/groff_diff.7.man (Language/Escape sequences) <\:>: Drop example.

* man/groff.7.man (Hyphenation): Mention .hw request and its purpose in
  introductory paragraph.  Contrast with default of automatic
  determination of hyphenation points.

* man/groff_diff.7.man (Language/New requests) :
* man/groff.7.man (Hyphenation): Resync with our Texinfo manual.

Continues addressing .
---
 ChangeLog| 37 --
 doc/groff.texi   | 87 +++-
 man/groff.7.man  | 39 +++
 man/groff_diff.7.man | 47 +---
 4 files changed, 114 insertions(+), 96 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4f6d0ef..d0157f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,31 @@
-2021-03-24  G. Branden Robinson 
-
-   * doc/groff.texi (Manipulating Hyphenation): Recast description
-   of \% escape to emphasize independence of its two uses (e.g.,
-   "\%pseudo\%unununium" is hyphenated only after "pseudo-", if at
-   all).  Add example.  Note that .nh affects only automatic
-   hyphenation.
-   * man/groff.7.man (Requests/Request short reference) <.nh>:
-   Clarify that the request disables only _automatic_ hyphenation.
+2021-04-06  G. Branden Robinson 
+
+   * doc/groff.texi (Manipulating Hyphenation):
+   Recast introductory paragraph to better distinguish between the
+   automatic breaking of words and placement of hyphens at
+   user-specified hyphenation points (done with the \% escape) and
+   automatic determination of hyphenation points within words (what
+   the pattern files and most of the hyphenation mode parameters
+   are for).  Clarify that what our manual calls "automatic
+   hyphenation" pertains only to the latter.
+Correct over-general claim; hyphenation exceptions defined
+   with the .hw request _do_ honor .hy value 2 (don't break a word
+   at the bottom of a page), but none of the others.
+   <\%> Recast description of escape to emphasize independence of
+   its two uses (e.g., "\%pseudo\%unununium" is hyphenated only
+   after "pseudo-", if at all).
+   <\:> Clarify that escape is an input word boundary.
+Clarify that the soft hyphen glyph is applied to manual as
+   well as automatically-determined hyphenation points.
+Recharacterize as setting the _automatic_ hyphenation mode.
+   Note that restrictions apart from value 2 are not applied to
+   words with manually-assigned hyphenation points.
+Note that request affects only automatic hyphenation.
+
+   * man/groff.7.man (Requests/Request short reference) <.hy,.nh>:
+   Clarify that requests deal with 

[groff] 21/54: doc/groff.texi: Fix error in .rnn description.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 136ca62525660b44cc46faaf1ed7906bc861c737
Author: G. Branden Robinson 
AuthorDate: Sun Apr 11 09:45:35 2021 +1000

doc/groff.texi: Fix error in .rnn description.

* doc/groff.texi (Setting Registers) : Fix error; the request is
  not ignored if the second argument (the new name) does not exist.
  Problem dates back to 52a6d12a (11 May 2000).
* man/groff_diff.7.man (Language/New requests) : Sync with above.

Input:
.rr b
.nr a 1
.rnn a b
.tm \nb

Output (stderr):
1
---
 ChangeLog| 6 ++
 doc/groff.texi   | 4 ++--
 man/groff_diff.7.man | 7 +++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a21e856..fc1d744 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-11  G. Branden Robinson 
+
+   * doc/groff.texi (Setting Registers) : Fix error; the
+   request is not ignored if the second argument (the new name)
+   does not exist.  Problem dates back to 52a6d12a (11 May 2000).
+
 2021-04-09  G. Branden Robinson 
 
Implement new .soquiet and .msoquiet requests.
diff --git a/doc/groff.texi b/doc/groff.texi
index 4279eca..9118886 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -6470,8 +6470,8 @@ any.
 @Defreq {rnn, ident1 ident2}
 @cindex renaming a register (@code{rnn})
 @cindex register, renaming (@code{rnn})
-Rename register @var{ident1} to @var{ident2}.  If either @var{ident1} or
-@var{ident2} doesn't exist, the request is ignored.
+Rename register @var{ident1} to @var{ident2}.  If @var{ident1} doesn't
+exist, the request is ignored.
 @endDefreq
 
 @Defreq {aln, new old}
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index a5e263c..44d838e 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -2769,6 +2769,7 @@ The
 request implicitly does
 .BR .rj\~0 .
 .
+.
 .TP
 .BI .rnn \~xx\~yy
 Rename number register
@@ -2776,6 +2777,12 @@ Rename number register
 to
 .IR yy .
 .
+If
+.I xx
+doesn't exist,
+the request is ignored.
+.
+.
 .TP
 .BI .schar\~ c\~string
 Define global fallback character (or glyph)\~\c

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 26/54: doc/meref.me: Correct various small issues.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit f04b84052c60a581f889fbdbd2a124c05dc06ad8
Author: Dave Kemper 
AuthorDate: Mon Apr 12 03:57:12 2021 +

doc/meref.me: Correct various small issues.

- Change names of two diacritical marks to match Unicode usage: "circle"
  to "ring," "Czech" to "caron"
- Correct description of caron from "inverted" to "raised" v
- Correct description of string \*- from "3/4 em dash" to "em dash"
- Remove some excess verbiage
- Correct some minor typos and punctuation

Fixes .
---
 ChangeLog|  6 ++
 doc/meref.me | 32 ++--
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6ccc633..dbc5063 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2021-04-12  Dave Kemper 
 
+   * doc/meref.me: Correct various small issues.
+
+   Fixes .
+
+2021-04-12  Dave Kemper 
+
* man/groff.7.man (Registers/Writable registers) :
Drop discussion of Y2K issues.
 
diff --git a/doc/meref.me b/doc/meref.me
index edc7b8f..359dd67 100644
--- a/doc/meref.me
+++ b/doc/meref.me
@@ -665,7 +665,7 @@ End this page,
 but do not begin the next page.
 Useful for forcing out footnotes,
 but other than
-that hardly every used.
+that hardly ever used.
 Must be followed by a
 .b .bp
 or the end of input.
@@ -1456,8 +1456,7 @@ ends the header portion of the table.
 .b .TE
 .DE
 Table end.
-Note that this table
-does not float,
+This table does not float;
 in fact,
 it is not even guaranteed to stay on one page
 if you use requests such as
@@ -1678,7 +1677,7 @@ If there are any spaces in it,
 the entire header must be quoted.
 If you want the header to have the chapter number
 in it,
-Use the string
+use the string
 .b "\e\e\e\en(ch" .
 For example, to number appendixes
 .b A.1
@@ -1690,8 +1689,7 @@ Each section
 should be preceded by the
 .b .+c
 macro.
-It should be mentioned
-that it is easier when using
+It is easier when using
 \*T to put the front material
 at the end of the paper,
 so that the table of contents
@@ -1872,9 +1870,7 @@ Right quote.
 .TL
 .ST \-
 .DE
-.ie \w'\(34'>0 \(34
-.el 3/4
-em dash.
+Em dash.
 .sh 1 "Special Characters and Marks"
 .pp
 There are a number of special characters
@@ -1890,8 +1886,8 @@ Umlaut\e*:u\e*:   u\*:
 Tilde  \e*~n\e*~   n\*~
 Caret  \e*^e\e*^   e\*^
 Cedilla\e*,c\e*,   c\*,
-Czech  \e*ve\e*v   e\*v
-Circle \e*oA\e*o   A\*o
+Caron  \e*ve\e*v   e\*v
+Ring   \e*oA\e*o   A\*o
 There exists   \e*(qe  \*(qe
 For all\e*(qa  \*(qa
 .fi
@@ -2038,7 +2034,7 @@ NAME  TYPEDESCRIPTION
 \&.+c  M   begin chapter
 \e*,   S   cedilla
 \e\-   F\(sc   minus sign
-\e*\-  S   3/4 em dash
+\e*\-  S   em dash
 \e0F\(sc   unpaddable digit-width space
 \&.1c  M   revert to single column output
 \&.2c  M   begin two column output
@@ -2099,8 +2095,8 @@ NAME  TYPEDESCRIPTION
 \e*(dw S   current day of week
 \en(dy R\(sc   day of month
 \eeF\(sc   printable version of \e
-\&.ef  M   set footer (even numbered pages only)
-\&.eh  M   set header (even numbered pages only)
+\&.ef  M   set footer (even-numbered pages only)
+\&.eh  M   set header (even-numbered pages only)
 \&.el  M\(sc   else part of conditional
 \&.ep  M   end page
 \en(es R   equation pre/post space
@@ -2154,9 +2150,9 @@ NAME  TYPEDESCRIPTION
 \&.np  M   begin numbered paragraph
 \&.nr  M\(sc   set number register
 \&.ns  M\(sc   no space mode
-\e*o   S   circle (e.g., for Norse A\*o)
-\&.of  M   set footer (odd numbered pages only)
-\&.oh  M   set header (odd numbered pages only)
+\e*o   S   ring (e.g., for Norse A\*o)
+\&.of  M   set footer (odd-numbered pages only)
+\&.oh  M   set header (odd-numbered pages only)
 \&.pa  M   begin page
 \&.pd  M   print delayed text
 \en(pf R   paragraph font
@@ -2211,7 +2207,7 @@ NAME  TYPEDESCRIPTION
 \&.uh  M   unnumbered section
 \&.ul  M\(sc   underline next line
 \ev\'\fI\\fP\'   F\(sc   local vertical motion for distance \fI\\fP
-\e*v   S   inverted `v' for czeck ``e\*v''
+\e*v   S   raised `v' for caron ``e\*v''
 \ew\'\fI\\fP\'   F\(sc   return width of string \fI\\fP
 \&.xl  M   set line length (local)
 \&.xp  M   print index

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 05/54: doc/groff.texi: Remove unnecessary command.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 5e1b6c48b8d4a256eee3bcdf8b507f70363785e5
Author: G. Branden Robinson 
AuthorDate: Mon Apr 5 11:12:26 2021 +1000

doc/groff.texi: Remove unnecessary command.
---
 doc/groff.texi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 687c534..9a4b739 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7274,7 +7274,6 @@ in the word indicating a hyphenation point.  For example, 
the request
 marks potential hyphenation points in ``insalubrious'', and prevents
 ``alpha'' from being hyphenated at all.
 
-@noindent
 Besides the space character, any character whose hyphenation code is
 zero can be used to separate the arguments of @code{hw} (see the
 @code{hcode} request below).  In addition, this request can be used more

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 18/54: doc/groff.texi: Fix style nit.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit f968b97b4d48f8857e8fa3f5fc8260eea376f659
Author: G. Branden Robinson 
AuthorDate: Fri Apr 9 17:20:23 2021 +1000

doc/groff.texi: Fix style nit.

Refer to each "read-only string-valued register" consistently as such
instead of using a variety of other constructions.  ("Read-only" is
strictly redundant here because there is no way to assign an arbitrary
non-number to a register, but I judge it worth reminding the reader of
the point.)
---
 doc/groff.texi | 47 +++
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 9e6368d..b9fefde 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -6713,7 +6713,8 @@ read-only.  A complete listing of all built-in registers 
can be found in
 @cindex current input file name register (@code{.F})
 @cindex input file name, current, register (@code{.F})
 @vindex .F
-This string-valued register returns the current input file name.
+This read-only string-valued register returns the current input file
+name.
 
 @item \n[.H]
 @cindex horizontal resolution register (@code{.H})
@@ -7695,7 +7696,7 @@ The hyphenation language is associated with the current 
environment
 (@pxref{Environments}).
 
 @cindex hyphenation language register (@code{.hla})
-The hyphenation language is available as a string in the read-only
+The hyphenation language is available in the read-only string-valued
 register @samp{.hla}.
 
 @Example
@@ -9374,10 +9375,9 @@ single character as an argument) to change the font on 
the fly:
 .mc \f[I]x\f[]
 @endExample
 
-The current style name is available in the read-only register
-@samp{.sty} (this is a string-valued register); if the current font
-isn't a style, the empty string is returned.  It is associated with the
-current environment.
+The current style name is available in the read-only string-valued
+register @samp{.sty}; if the current font isn't a style, the empty
+string is returned.  It is associated with the current environment.
 
 @xref{Font Positions}, for an alternative syntax.
 @endDefreq
@@ -9491,8 +9491,8 @@ the previous font family.  Use @code{\F[]} to do this 
with the escape;
 @code{\FP} selects font family @samp{P} instead.
 
 The value at start-up is @samp{T}.  The current font family is available
-in the read-only register @samp{.fam} (this is a string-valued
-register); it is associated with the current environment.
+in the read-only string-valued register @samp{.fam}; it is associated
+with the current environment.
 
 @Example
 spam,
@@ -9516,10 +9516,10 @@ a single character as an argument) to change the font 
family on the fly.
 .mc \F[P]x\F[]
 @endExample
 
-The @samp{.fn} register contains the current @dfn{real font name} of the
-current font.  This is a string-valued register.  If the current font is
-a style, the value of @code{\n[.fn]} is the proper concatenation of
-family and style name.
+The read-only string-valued register @samp{.fn} contains the current
+@dfn{real font name} of the current font.  If the current font is a
+style, the value of @code{\n[.fn]} is the proper concatenation of family
+and style name.
 @endDefreq
 
 @Defreq {sty, n style}
@@ -10850,10 +10850,9 @@ resulting size is non-positive, it is set to 1@dmn{u}.
 
 @cindex type size registers (@code{.s}, @code{.ps})
 @cindex point size registers (@code{.s}, @code{.ps})
-The read-only register @code{.s} returns the point size in points as a
-decimal fraction.  This is a string.  To get the point size in scaled
-points, use the @code{.ps} register instead (@pxref{Fractional Type
-Sizes}).
+The read-only string-valued register @code{.s} returns the point size in
+points as a decimal fraction.  To get the point size in scaled points,
+use the @code{.ps} register instead (@pxref{Fractional Type Sizes}).
 
 @code{.s} is associated with the current environment
 (@pxref{Environments}).
@@ -13687,10 +13686,10 @@ After the diversion.
 @cindex vertical position in diversion register (@code{.d})
 @cindex position, vertical, in diversion, register (@code{.d})
 @cindex diversion, vertical position in, register (@code{.d})
-Diversions may be nested.  The read-only register @code{.z} contains the
-name of the current diversion (this is a string-valued register).  The
-read-only register @code{.d} contains the current vertical place in the
-diversion.  If not in a diversion, it is the same as register @code{nl}.
+Diversions may be nested.  The read-only string-valued register
+@code{.z} contains the name of the current diversion.  The read-only
+register @code{.d} contains the current vertical place in the diversion.
+If not in a diversion, it is the same as register @code{nl}.
 @endDefreg
 
 @Defreg {.h}
@@ -13959,8 +13958,8 @@ Switch to another environment.  The argument @var{env} 
is the name of
 the environment to switch to.  With no argument, @code{gtroff} switches
 back to 

[groff] 11/54: [ms]: Update footnote documentation.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 9faf46318e2fd4ab4d5fcc367c1a0c37bfb1560c
Author: G. Branden Robinson 
AuthorDate: Fri Apr 9 10:17:34 2021 +1000

[ms]: Update footnote documentation.

* doc/groff.texi (ms Document Control Settings) : Update description
  to cover application of footnote format to footnote markers in
  general, not just numbers.  Clarify different behavior of format 1
  with respect to automatic numbers and other markers.

  (ms Footnotes): Recast introductory paragraph to drop promotional
  language in favor of describing functionality.  Add concept index
  entry for "footnote marker".  Shift string and macro descriptions from
  sentence fragments to statements in the imperative mood.  Expand
  advice on usage of footnote markers.  Discuss configurable footnote
  parameters with link to "ms Document Control Settings" node.

  <*>: Describe string operation in more detail.

  : Describe more precisely how the optional argument is handled.

* doc/ms.ms (Footnotes): Bracket section heading and lead paragraph in a
  keep.  Synchronize with doc/groff.texi.  Add example using document's
  own text as a model.  Move paragraph discussing footnote usage in
  keeps and displays to precede (new) discussion of footnote formatting.

* tmac/groff_ms.7.man (Usage/Footnotes): Resync relevant portions with
  doc/ms.ms.

Fixes .
---
 ChangeLog   |  19 +
 doc/groff.texi  |  70 +---
 doc/ms.ms   | 226 ++--
 tmac/groff_ms.7.man | 118 ++-
 4 files changed, 290 insertions(+), 143 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c12a321..ddaed14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2021-04-08  G. Branden Robinson 
+
+   * doc/groff.texi (ms Document Control Settings) : Update
+   description to cover application of footnote format to footnote
+   markers in general, not just numbers.  Clarify different
+   behavior of format 1 with respect to automatic numbers and other
+   markers.
+   (ms Footnotes) <*>: Describe string operation in more detail.
+   : Describe more precisely how the optional argument is
+   handled.
+
+   * doc/ms.ms (Footnotes): Synchronize with doc/groff.texi.  Add
+   example using document's own text as a model.
+
+   * tmac/groff_ms.7.man (Usage/Footnotes): Resync relevant
+   portions with doc/ms.ms.
+
+   Fixes .
+
 2021-04-06  Dave Kemper 
 
* src/roff/nroff/nroff.sh: Recognize -k and -K options and pass
diff --git a/doc/groff.texi b/doc/groff.texi
index ceaf427..e72f3bd 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -2818,25 +2818,23 @@ Default: 2@dmn{n}.
 @endDefmpreg
 
 @Defmpreg {FF, ms}
-Defines the format of
-automatically numbered @c see Savannah #60227
-footnotes at the bottom of a column or page.  This is a Berkeley
-extension.
+Defines the format of automatically numbered footnotes,
+and those for which the @code{FS} request is given a marker argument, at
+the bottom of a column or page.  This is a Berkeley extension.
 @table @code
 @item 0
-Set the footnote number as a superscript; indent the footnote text
+Indent the footnote paragraph and set the marker as a superscript
 (default).
 
 @item 1
-Set the number followed by a period (that is, ``1.@:'') and indent the
-footnote text.
+Like @code{0}, but set the marker as regular text and follow an
+automatic number with a period.
 
 @item 2
-Like @code{1}, but without an indentation.
+Like @code{1}, but without indentation.
 
 @item 3
-Like @code{1}, but set the footnote text as a paragraph with the number
-hanging.
+Like @code{1}, but set the footnote paragraph with the marker hanging.
 @end table
 
 Effective: next footnote.
@@ -3764,36 +3762,54 @@ l | l .
 @cindex @code{ms} macros, footnotes
 @cindex footnotes [@code{ms}]
 
-The @file{ms} macro package has a flexible footnote system.  You can
-specify either numbered footnotes or symbolic footnotes (that is, using
-a marker such as a dagger symbol).
+@cindex footnote marker [@code{ms}]
+@cindex marker, footnote [@code{ms}]
+A footnote is typically anchored to a place in the text with a
+@dfn{marker}, which is a small integer, a symbol such as a dagger, or
+arbitrary user-specified text.  The footnote text is set at the nearest
+available ``foot'', or bottom, of a text column or page.
+
+Automatic numbering of footnotes is available.
 
 @Defstr {*, ms}
-Specifies the location of a numbered footnote marker in the text.
+Place an automatically numbered footnote marker in the text.  Each time
+this string is interpolated, the number it produces increments by one.
+Automatic footnote numbers start at 1.  This is a Berkeley extension.
 @endDefesc
 

[groff] 01/01: [ms]: Defend against uncontrolled page trap recursion.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch master
in repository groff.

commit 8830820a9a85ad52a8452017d52e67378a76c4c4
Author: Keith Marshall 
AuthorDate: Sat Oct 23 21:56:31 2021 +0100

[ms]: Defend against uncontrolled page trap recursion.

* tmac/s.tmac (pg@top) [HM+FM+.V>.p]: Diagnose insufficient page
length, and abort; cf. <https://savannah.gnu.org/bugs/?61294>
---
 ChangeLog   |  7 +++
 tmac/s.tmac | 11 ++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index a3a3f54..0de438e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-10-23  Keith Marshall  
+
+   [ms]: Defend against uncontrolled page trap recursion.
+
+   * tmac/s.tmac (pg@top) [HM+FM+.V>.p]: Diagnose insufficient page
+   length, and abort; cf. <https://savannah.gnu.org/bugs/?61294>
+
 2021-10-21  G. Branden Robinson 
 
* tmac/tmac.am: Build more quietly.
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 186951f..735e50e 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -566,8 +566,17 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .de 1C
 .MC \\n[LL]u
 ..
-.\" top of page macro
 .de pg@top
+.\" Invoked by '.wh 0' trap at the top of every page.
+.\" At short page length, recursion may occur; ensure
+.\" that page length is sufficient to avoid it.
+.if (u;\\n[HM]+\\n[FM])+\n[.V]>\\n[.p]) \{\
+.  ds pg*pl-abort-msg] "\*[@s]:\"
+.  if !'\\n[.F]'' .as pg*pl-abort-msg "\\n[.F]:\"
+.  if !'\\n[.c]'0' .as pg*pl-abort-msg "\\n[.c]:\"
+.  as pg*pl-abort-msg " abort: insufficient page length specified\"
+.  ab \\*[pg*pl-abort-msg]
+.   \}
 .ch pg*footer -\\n[FM]u/2u
 .nr pg*col-num 0
 .nr pg@fn-bottom-margin 0

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 16/54: ChangeLog: Fix misleading statement.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit ef3e66f551ce09d261ed19930107805684bed069
Author: G. Branden Robinson 
AuthorDate: Fri Apr 9 18:12:31 2021 +1000

ChangeLog: Fix misleading statement.

File warnings are, in fact, enabled by default.
---
 ChangeLog | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5b3f57b..a21e856 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,10 +6,9 @@
Savannah #59814 can use this to quietly attempt to open a
localization file.  groff only supports a few locales, so people
with LANG=es_ES, for instance, would ordinarily see warning
-   diagnostics on every groff startup if file warnings were
-   enabled; and {2} system- or site-configurable support of
-   per-user {.,}troffrc or man.local files, gracefully failing if
-   they don't exist.
+   diagnostics on every groff startup; and {2} system- or
+   site-configurable support of per-user {.,}troffrc or man.local
+   files, gracefully failing if they don't exist.
 
* src/roff/troff/input.cpp:
(do_source): Add new function, taking boolean "quietly"

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 09/54: doc/groff.texi: Fix content and style nits.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit b21d200dd8380b46b0d2cdb2daeae0c510c90915
Author: G. Branden Robinson 
AuthorDate: Wed Apr 7 17:58:07 2021 +1000

doc/groff.texi: Fix content and style nits.

* doc/groff.texi (Manipulating Hyphenation):
  - Say "breakable" instead of "broken" to reinforce the notion of break
points as circumstantial.
  - Expand passing mention of scope of hw request; it's all further
processing in a run of the formatter, not just the current
"document".
  - Fix misplaced modifier.
---
 doc/groff.texi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 7789362..4a00462 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7304,8 +7304,8 @@ matching a hyphenation exception defined with @code{hw}.
 
 Situations also arise when only a specific occurrence of a word needs
 its hyphenation altered or suppressed, or when something that is not a
-word in a natural language, like a URL, needs to be broken in sensible
-places without hyphens.
+word in a natural language, like a URL, needs to be breakable in
+sensible places without hyphens.
 
 @DefescList {\\%, , , }
 @DefescListEndx {\:, , , }
@@ -7319,7 +7319,7 @@ Each instance within a word indicates to GNU @code{troff} 
that the
 word may be hyphenated at that point, while prefixing a word with this
 escape prevents it from being otherwise hyphenated.  This mechanism
 affects only that occurrence of the word; to change the hyphenation of a
-word for the remainder of the document, use the @code{hw} request.
+word for the remainder of input processing, use the @code{hw} request.
 
 @cindex @code{\X}, followed by @code{\%}
 @cindex @code{\Y}, followed by @code{\%}
@@ -7343,7 +7343,7 @@ output if it does.  This escape is an input word 
boundary, so the
 remainder of the word is subject to hyphenation as normal.
 
 You can use @code{\:} and @code{\%} in combination to control breaking
-of a file name or URL or to permit hyphenation after only certain
+of a file name or URL or to permit hyphenation only after certain
 explicit hyphens within a word.
 
 @Example

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 07/54: [nroff]: Support and document -k and -K options.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit d71e05680e6b7843ed8da238f644888262574875
Author: Dave Kemper 
AuthorDate: Tue Apr 6 10:48:33 2021 +

[nroff]: Support and document -k and -K options.

* src/roff/nroff/nroff.sh: Recognize -k and -K options and pass them
  through to troff.  Document them in usage message.
* src/roff/nroff/nroff.1.man: Document new -k and -K options.

Fixes .
---
 NEWS   | 4 ++--
 src/roff/nroff/nroff.1.man | 7 ++-
 src/roff/nroff/nroff.sh| 7 ---
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index 684a0e3..22c4d88 100644
--- a/NEWS
+++ b/NEWS
@@ -79,8 +79,8 @@ o The new option -V emits the constructed groff command that 
nroff would
   this is a historical deficiency of the Bourne shell family not yet
   corrected by the POSIX standard.
 
-o nroff now recognizes the -b, -E, and -z options and passes them
-  through to troff.
+o nroff now recognizes the -b, -E, -k, -K, and -z options and passes
+  them through to troff.
 
 Macro Packages
 --
diff --git a/src/roff/nroff/nroff.1.man b/src/roff/nroff/nroff.1.man
index d621196..b43009d 100644
--- a/src/roff/nroff/nroff.1.man
+++ b/src/roff/nroff/nroff.1.man
@@ -35,11 +35,14 @@
 .\" 
 .
 .SY @g@nroff
-.RB [ \-bcCEhipStUVz ]
+.RB [ \-bcCEhikpStUVz ]
 [\c
 .BI \-d cs\c
 ]
 [\c
+.BI \-K arg\c
+]
+[\c
 .BI \-m name\c
 ]
 [\c
@@ -150,6 +153,8 @@ The
 .BR \-d ,
 .BR \-E ,
 .BR \-i ,
+.BR \-k ,
+.BR \-K ,
 .BR \-m ,
 .BR \-M ,
 .BR \-n ,
diff --git a/src/roff/nroff/nroff.sh b/src/roff/nroff/nroff.sh
index d0a1289..f5dcff0 100644
--- a/src/roff/nroff/nroff.sh
+++ b/src/roff/nroff/nroff.sh
@@ -72,10 +72,10 @@ do
 -[eq] | -s*)
   # ignore these options
   ;;
--[dmMnoPrTwW])
+-[dKmMnoPrTwW])
   echo "$prog: option '$1' requires an argument" >&2
   exit 1 ;;
--[bCEipStUz] | -[dMmrnoPwW]*)
+-[bCEikpStUz] | -[dKMmrnoPwW]*)
   opts="$opts $1" ;;
 -T*)
   Topt=$1 ;;
@@ -93,8 +93,9 @@ do
   echo "GNU nroff (groff) version @VERSION@"
   opts="$opts $1" ;;
 --help)
+  # Wrap usage message at 80 columns.
   cat 

[groff] 01/54: Add Deri James'extension to gropdf to draw boxes and sboxes macros.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 253d01c19256f3e6fa566f805d4757c13f9a78e4
Author: Bertrand Garrigues 
AuthorDate: Sat Apr 3 01:35:46 2021 +0200

Add Deri James'extension to gropdf to draw boxes and sboxes macros.

(see https://lists.gnu.org/archive/html/groff/2021-04/msg0.html)
---
 Makefile.am  |   1 +
 contrib/sboxes/msboxes.ms| 287 +++
 contrib/sboxes/sboxes.am |  39 ++
 contrib/sboxes/sboxes.tmac   | 116 +
 src/devices/gropdf/gropdf.pl | 140 +
 5 files changed, 583 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index aec1bae..1a3292f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -659,6 +659,7 @@ include $(top_srcdir)/contrib/mom/mom.am
 include $(top_srcdir)/contrib/pdfmark/pdfmark.am
 include $(top_srcdir)/contrib/pic2graph/pic2graph.am
 include $(top_srcdir)/contrib/rfc1345/rfc1345.am
+include $(top_srcdir)/contrib/sboxes/sboxes.am
 include $(top_srcdir)/doc/doc.am
 include $(top_srcdir)/font/devX100/devX100.am
 include $(top_srcdir)/font/devX100-12/devX100-12.am
diff --git a/contrib/sboxes/msboxes.ms b/contrib/sboxes/msboxes.ms
new file mode 100644
index 000..e715c7e
--- /dev/null
+++ b/contrib/sboxes/msboxes.ms
@@ -0,0 +1,287 @@
+.nr LL 17c
+.nr LT \n[LL]
+.nr PO 2c
+.nr PS 11
+.nr VS 13
+.nr PI 3.5n
+.nr HM 2c
+.nr FM 2c
+.nr QI 7n
+.\" .nr PD 7p
+.ll 17c
+.po 2c
+.\" .RP no
+.ND March 2021
+.EH '%''March 2021'
+.EF 
+.OH 'Using PDF boxes with the \f[I]ms\f[] macros''%'
+.OF 
+.TL
+Using PDF boxes with the \f[I]ms\f[] macros
+.AU
+Deri James
+.AI
+d...@chuzzlewit.myzen.co.uk
+.\" .AB no
+.ds FAM H
+.LP
+A recent extension to the Groff PDF driver allows coloured rectangles to be
+created beneath any output created by groff. The extension is a new "\eX'pdf:'"
+command (with a convenience command
+.B pdfbackground
+with the same parameters):-
+.QS
+.BoxStart SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+\M[floralwhite]\c
+.pdfbackground pagefill
+\M[]\c
+.B
+\eX'pdf: background
+.BI
+cmd left top right bottom weight'
+.br
+.B .pdfbackground
+.BI
+cmd left top right bottom weight'
+.LP
+Where:-
+.IP cmd 7n
+Can be any of "page|fill|box" in combination. So "pagefill" would draw a
+rectangle which covers whole current page size (in which case the rest of the
+parameters can be omitted because the box dimensions are taken from the
+current media size). "boxfill", on the other hand, requires the given
+dimensions to place the box. Including "fill" in the command will make the
+rectangle filled with the current background colour "\eM[colour]" and including
+"box" will give the rectangle a border in the current stroke colour
+"\em[colour]".
+.sp \n[PD]u
+The "cmd" may also be "off", on its own, which will terminate drawing the
+current box. If you have specified a page colour
+with
+.B ".pdfbackground pagefill
+it is always the first box in the stack, and if
+you specify it again it will replace the first entry. Be aware that the
+pagefill box renders the page opaque so tools which "watermark" pdf pages are
+unlikely to be successful. To return the background to transparent do a
+.B ".pdfbackground off
+with no other boxes open
+.sp \n[PD]u
+Finally the command may be "footnote" followed by a new value for "bottom"
+which will be used for all current boxes, just for the current page. This is
+to allow room for footnotes which grow during the page.\m[red]\**\m[]
+.FS
+If the value is negative it is used as an offset from the bottom of the page.
+.FE
+.LP
+.IP left
+.IP top
+.IP right
+.IP bottom 7n
+Are the coordinates of the box. The "top" and "bottom" coordinates are
+the minimum and maximum for the box, since the actual start of the
+box is the vertical position of groff when you issue the command and the 
bottom of
+the box is the point where you turn the box "off". The top and bottom
+coordinates are only used if the box drawing extends onto the next page, so,
+ordinarily they would be set to the header and footer margins.
+.IP weight 7n
+If "box" is included in the command then this parameter provides the line width
+for the box border.
+.BoxStop
+.QE
+More convenience can be gained by including -msboxes on the groff command line
+which includes the macros "BoxStart" and "BoxStop".
+.QS
+.BoxStart SHADED cornsilk OUTLINED brown INDENT 2n WEIGHT 1p
+.BoxStart SHADED cornsilk3 INDENT 2p
+.B .BoxStart
+.R SHADED
+.I colour
+.R OUTLINED
+.I colour
+.R INDENT
+.I size
+.R WEIGHT
+.I size
+.BoxStop
+.LP
+Where SHADED gives the fill colour and OUTLINED the border colour. Omit either
+to get a borderless filled box, or just a border with no fill. WEIGHT is used
+if the box is OUTLINED.
+.LP
+INDENT is a value which leaves a gap between the border and the contents inside
+the box.
+.BoxStop
+.QE
+Boxes can stacked, so you can start a box within another box, usually the
+later boxes would be smaller than the 

[groff] 03/54: doc/ms.ms: Fix style nits.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 032a76941b0dcb2ec06913f914b1ad425dfd4937
Author: G. Branden Robinson 
AuthorDate: Sun Apr 4 19:20:46 2021 +1000

doc/ms.ms: Fix style nits.

- Stop using font-reset escape when previous font is no longer needed.
- Fix incorrect font style used on ellipsis and comma.
---
 doc/ms.ms | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/ms.ms b/doc/ms.ms
index ae64ff4..0191d64 100644
--- a/doc/ms.ms
+++ b/doc/ms.ms
@@ -677,8 +677,7 @@ in the
 register.
 T}
 _
-\&.IP \f[R][\f[]\f[I]marker\f[] \f[R][\f[]\f[I]width\f[]\f[R]]]\f[]\
-   T{
+\&.IP \f[R][\f[I]marker\f[] [\f[I]width\f[]]]  T{
 Set a paragraph with a left indentation.
 .
 The optional
@@ -830,8 +829,8 @@ to number headings in the form
 .CW
 .I a .\c
 .I b .\c
-.I c.\|.\|.,
 .R
+.I c .\|.\|.,
 to any depth desired,
 with the numbering of each level increasing automatically and being
 reset when a more significant level is increased.

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 04/54: [docs]: Improve hyphenation discussion.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 99bd7bce53a4b4f5853b48252e9dcb1ba0a5a85e
Author: G. Branden Robinson 
AuthorDate: Sun Apr 4 20:43:23 2021 +1000

[docs]: Improve hyphenation discussion.

* doc/groff.texi (Manipulating Hyphenation): Recast description of \%
  escape to emphasize independence of its two uses (e.g.,
  "\%pseudo\%unununium" is hyphenated only after "pseudo-", if at all).
  Add example.  Note that .nh affects only automatic hyphenation.

* man/groff.7.man (Requests/Request short reference) <.nh>: Clarify that
  the request disables only _automatic_ hyphenation.

  (Hyphenation): Add new introductory paragraph summarizing manual
  hyphenation support and features, including notice that breaking at
  explicit hyphens is performed in fill mode, i.e., even if _automatic_
  hyphenation is disabled.

Thanks to Peter Schaffter for the report.

Fixes .
---
 ChangeLog   | 18 ++
 doc/groff.texi  | 23 ++-
 man/groff.7.man | 21 +++--
 3 files changed, 51 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5295c42..4f6d0ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2021-03-24  G. Branden Robinson 
+
+   * doc/groff.texi (Manipulating Hyphenation): Recast description
+   of \% escape to emphasize independence of its two uses (e.g.,
+   "\%pseudo\%unununium" is hyphenated only after "pseudo-", if at
+   all).  Add example.  Note that .nh affects only automatic
+   hyphenation.
+   * man/groff.7.man (Requests/Request short reference) <.nh>:
+   Clarify that the request disables only _automatic_ hyphenation.
+   (Hyphenation): Add new introductory paragraph summarizing manual
+   hyphenation support and features, including notice that breaking
+   at explicit hyphens is performed in fill mode, i.e., even if
+   _automatic_ hyphenation is disabled.
+
+   Thanks to Peter Schaffter for the report.
+
+   Fixes .
+
 2021-03-27  Deri James  
 
Changes to the ghostscript fontnames (9.53.3).
diff --git a/doc/groff.texi b/doc/groff.texi
index 4269855..687c534 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7310,11 +7310,11 @@ places without hyphens.
 @cindex hyphenation, disabling (@code{\%})
 To tell GNU @code{troff} how to hyphenate words as they occur in input,
 use the @code{\%} escape, also known as the @dfn{hyphenation character}.
-Preceding a word with this escape prevents it from being automatically
-hyphenated; each instance within a word indicates to GNU @code{troff}
-that the word may be hyphenated at that point.  This mechanism affects
-only that occurrence of the word; to change the hyphenation of a word
-for the remainder of the document, use the @code{hw} request.
+Each instance within a word indicates to GNU @code{troff} that the
+word may be hyphenated at that point, while prefixing a word with this
+escape prevents it from being otherwise hyphenated.  This mechanism
+affects only that occurrence of the word; to change the hyphenation of a
+word for the remainder of the document, use the @code{hw} request.
 
 @cindex @code{\X}, followed by @code{\%}
 @cindex @code{\Y}, followed by @code{\%}
@@ -7339,10 +7339,15 @@ inserted, the remainder of the (input) word is subject 
to hyphenation as
 normal.
 
 You can use @code{\:} and @code{\%} in combination to control breaking
-of a file name or URL.
+of a file name or URL or to permit hyphenation after only certain
+explicit hyphens within a word.
 
 @Example
-@dots{} check \%/var/log/\:\%httpd/\:\%access_log @dots{}
+@c Wrap example at 56 columns.
+The \%Lethbridge-Stewart-\:\%Sackville-Baggins divorce
+was, in retrospect, inevitable once the contents of
+\%/var/log/\:\%httpd/\:\%access_log on the family web
+server came to light, revealing visitors from Hogwarts.
 @endExample
 @endDefesc
 
@@ -7527,8 +7532,8 @@ The hyphenation mode can be found in the read-only 
register @samp{.hy}.
 @endDefreq
 
 @Defreq {nh, }
-Disable hyphenation; i.e., set the hyphenation mode to@tie{}0 (see
-above).  The hyphenation mode of the last call to @code{hy} is not
+Disable automatic hyphenation; i.e., set the hyphenation mode to@tie{}0
+(see above).  The hyphenation mode of the last call to @code{hy} is not
 remembered.
 @endDefreq
 
diff --git a/man/groff.7.man b/man/groff.7.man
index 7c2df5c..7080ce1 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -2228,7 +2228,7 @@ No filling or adjusting of output lines.
 .
 .TPx
 .REQ .nh
-Disable hyphenation;
+Disable automatic hyphenation;
 same as
 .RB \[lq] ".hy 0" \[rq].
 .
@@ -4870,7 +4870,24 @@ instead.
 .SH Hyphenation
 .\" 
 .
-Several requests influence hyphenation.
+Explicitly hyphenated words such as 

[groff] 02/54: doc/groff.texi: Remove stray word from recast.

2021-10-23 Thread Keith Marshall via Groff-commit
keithmarshall pushed a commit to branch dev-gropdf-boxes
in repository groff.

commit 2995aadecfadcda9e0db3412fea41bbfbd6d0d70
Author: G. Branden Robinson 
AuthorDate: Sun Apr 4 19:19:24 2021 +1000

doc/groff.texi: Remove stray word from recast.
---
 doc/groff.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 2c37e88..4269855 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -3467,8 +3467,8 @@ Firearms,
 
 Second, you could apply the @code{\p} escape to force a break.  The
 space following the escape is important; if you omit it, @code{groff}
-prints the first word of the paragraph text fits) on the same line as
-the term or label (if it fits) @emph{then} breaks the line.
+prints the first word of the paragraph text on the same line as the term
+or label (if it fits) @emph{then} breaks the line.
 
 @CartoucheExample
 .IP guns

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[bug #55107] PDFPIC: .psbb: support extraction of MediaBox from pdf files

2021-10-12 Thread Keith Marshall
Follow-up Comment #1, bug #55107 (project groff):

In this mailing-list message
[1], Deri
 offered two PDF files, namely
Picture.pdf
[2] and
croptest.pdf
[3],
from which the original prototype code
[4],
as referenced on this ticket, is unable to extract any valid MediaBox
specification.

In this follow-up message
[5], I
explained that the failure to extract the MediaBox from Picture.pdf was caused
by an omission from the groff-psbb lexer's pattern matching rules for the PDF
dictionary scanning state, resulting in mishandling of nested dictionaries;
this is readily resolved by the [file #52093 attached patch][6].

OTOH, croptest.pdf uses new PDF (post PDF-1.5) features, and lacks any trailer
dictionary, or free-standing cross reference table, (both of which are
_required_ by the current groff-psbb prototype implementation); to support
these new PDF features, substantial additions to the current implementation
will be required.

[1]: https://lists.nongnu.org/archive/html/groff/2021-09/msg00064.html
[2]: https://lists.nongnu.org/archive/html/groff/2021-09/pdf7tyGN4NLTE.pdf
[3]: https://lists.nongnu.org/archive/html/groff/2021-09/pdfBjudbNbwI2.pdf
[4]:
https://osdn.net/users/keith/pf/groff-psbb/scm/tree/e25e11c6770a3d7a2e98cbcfce66dbffd7d8b5a0/
[5]: https://lists.nongnu.org/archive/html/groff/2021-10/msg00043.html
[6]: [file #52093 patch file #52093]

___

Reply to this item at:

  

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




[bug #55107] PDFPIC: .psbb: support extraction of MediaBox from pdf files

2021-10-12 Thread Keith Marshall
Additional Item Attachment, bug #55107 (project groff):

File name: nested-dictionary.patchSize:0 KB




___

Reply to this item at:

  

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




Re: Problems with .PDFPIC caused by pdfinfo

2021-10-12 Thread Keith Marshall
Ref: https://savannah.gnu.org/bugs/index.php?55107

On 01/10/2021 01:10, Deri wrote:
> I did try to help Keith with this previously, but I was mildly "told
> off" (on list) for sending my help off list. I've learned my lesson.

Thanks, Deri.

IIRC, the reason for the "mild telling off" was that, by replying off
list, you denied us the potential benefit from other list members who
may have been willing to review the issue, and so contribute to the
debugging effort.  I am pleased that, on this occasion, you have kept
this on-list; even if the majority of list members aren't sufficiently
interested to assist, there may be some who will, and any assistance
will be gratefully accepted, and very much appreciated.

> I attach a couple of pdfs with which the current code has problems.
> 
> Picture.pdf
> 
> [derij@pip groff-psbb]$ ./psbb ../../Picture.pdf
> ../../Picture.pdf: bounding box = (0,0)..(0,0)

This is caused by the nested /Group dictionary, within the /Page object;
the current groff-psbb lexer is confused by it, and ends up in the wrong
state, when it eventually encounters the /MediaBox key.  Adding one more
rule (for "<<") to the PDF dictionary state scanning model gets us to:

   $ ./psbb Picture.pdf
   Picture.pdf: bounding box = (0,0)..(592,842)

> [derij@pip groff-psbb]$ pdfbb ../../Picture.pdf
> Processing '../../Picture.pdf'
> ../../Picture.pdf: CropBox: 162.085,623.346,340.825,716.546  (178.74,93.2)

The psbb lexer doesn't handle the /CropBox key.  Should it?  Should
/CropBox override any extant /MediaBox?

> croptest.pdf
> 
> [derij@pip groff-psbb]$ ./psbb ../../croptest.pdf
> psbb:t-psbb (t-psbb.cpp):193: PDF file '../../croptest.pdf' is
> malformed; no trailer found

Since croptest.pdf lacks both a trailer dictionary, and a free-standing
cross reference table, (both are hidden away within a /XRefStm object,
with a compressed cross reference table), croptest.pdf is _incompatible_
with applications which do not support this feature of PDF-1.5 (and
later).  The groff-psbb prototype implementation (currently) does not
offer this level of PDF-1.5 support; thus, this behaviour is expected.

> [derij@pip groff-psbb]$ pdfbb ../../croptest.pdf
> Processing '../../croptest.pdf'
> ../../croptest.pdf: MediaBox: 0,0,595,842  (595,842)

Well, this agrees with the result I've shown above, for Picture.pdf,
with groff-psbb modified to properly handle nested dictionaries; some
further (non-trivial) development effort will be required, to support
concealment of trailer dictionaries and cross reference tables within
/XRefStm objects.

-- 
Keith



[bug #58946] [ms] adapt to use the facilities of pdfmark

2021-10-07 Thread Keith Marshall
Follow-up Comment #13, bug #58946 (project groff):

Agh!!!  Why can't savannah offer a sane UI, like OSDN?  Please ignore
[comment #12 prematurely submitted comment #12], (which I seem to be unable to
either edit, or delete)!

Here's what I wanted it to say:
[comment #11 comment #11:]
> > I'm wondering if there may be some justification for incorporation of
> > simplified versions of [XH and XN], and maybe also a minimal default
> > implementation of "XH-UPDATE-TOC", within s.tmac?
> > 
> > What do you think?
> 
> I think "yes"!  Please go for it.  ...
I've attached two proposed patches; [file #52067 patch #52067] adds minimal
implementations of XH and XN, (together with default implementations of
ancillary hooks XH-INIT, XN-INIT, XH-UPDATE-TOC, XH-REPLACEMENT, and
XN-REPLACEMENT), to s.tmac, while [file #52069 patch #52069] removes the
default XH-INIT, XN-INIT, and XH-UPDATE-TOC implementations from spdf.tmac,
(adopting those from s.tmac), and reimplements XH, and XN *indirectly*, in
spdf.tmac, using XH-REPLACEMENT and XN-REPLACEMENT respectively, rather than
redefining XH and XN directly.

In s.tmac, I've preserved the same calling syntax for XH, XN, and
XH-UPDATE-TOC, as I originally specified in spdf.tmac, (and as outlined in
comment #10), *except* that the -N, -S, and -X options are unsupported, for XH
and XN; I have retained  as a mandatory argument to
XH-UPDATE-TOC, (even though the default implementation in s.tmac ignores it),
since it is an essential component of the interface design.

I did agonize, for some time, over the default implementation of XH,
(specifically, how it should be protected against use before SH); I eventually
decided that, unlike the misuse of XN before NH, no such protection is
actually necessary.

___

Reply to this item at:

  

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




  1   2   3   4   5   >