124 Commits

Author SHA1 Message Date
Pim
40c9c6b31a [eqn]: Fix Savannah #64860 ({u,}tilde placement).
* src/preproc/eqn/lex.cpp: Update internal macro definitions used to
  construct tilde and under-tilde ("utilde") accents to set them in the
  roman face, like other accent marks in eqn.

* src/preproc/eqn/eqn.1.man (New primitives): Update example.

Fixes <https://savannah.gnu.org/bugs/?64860>.  Thanks to Damian McGuckin
for reporting this problem on the groff mailing list.
<https://lists.gnu.org/archive/html/groff/2023-06/msg00143.html>

ANNOUNCE: Acknowledge Pim.
2023-11-06 11:15:26 -06:00
G. Branden Robinson
0b40885e71 [troff]: Implement new phw request.
* src/roff/troff/env.cpp (print_hyphenation_exceptions): Add.
  (init_hyphen_requests): Wire up `phw` request name to
  `print_hyphenation_exceptions()`.

* doc/groff.texi (Manipulating Hyphenation, Debugging):
* man/groff.7.man (Request short reference):
* man/groff_diff.7.man (New requests):
* NEWS: Document it.

Inspired by a debugging process (that ultimately involved input
character encoding confusion) on the groff mailing list, raised by
Walter Alejandro Iglesias.  See
<https://lists.gnu.org/archive/html/groff/2023-09/msg00032.html> and
<https://lists.gnu.org/archive/html/groff/2023-10/msg00008.html> and
follow-ups.  It my opinion it should have been easier to ask the
formatter where it thought a hyphenation exception's hyphenation points
were.

Illustration:

$ printf '.hw foo-bar\n.phw\n' | ./build/test-groff 2>&1 | grep -C3 foo
-cohen  *
micro-organ-ism         *
-duane  *
foo-bar
-engle  *
micro-organ-isms        *
-engel  *

ANNOUNCE: Acknowledge Walter Alejandro Iglesias.
2023-11-03 23:51:02 -05:00
G. Branden Robinson
8d07776afe ANNOUNCE: Acknowledge Gavin and Thérèse.
...for their help with Texinfo.  Continues commit 757c170961, 2
November.
2023-11-03 23:51:02 -05:00
G. Branden Robinson
22e0153d6c [build]: Fix Savannah #64681 (webpage.ps deps).
* doc/doc.am (doc/webpage.ps, doc/webpage.html): Update and parallelize
  target dependencies.  Resolve race by requiring "grn" and "soelim" to
  be built first.  Also add dependency on `$(TMAC_PACKAGE_MS)`.

Fixes <https://savannah.gnu.org/bugs/?64681>.  Thanks to Alexander
Kanavin for the report.

ANNOUNCE: Acknowledge Alexander.
2023-09-16 17:33:23 -05:00
G. Branden Robinson
c08b62fd2a [grops]: Fix Savannah #64577 (file diagnostics).
* src/devices/grops/ps.cpp (ps_printer::define_encoding):
* src/devices/grops/psrm.cpp (resource_manager::output_prolog)
  (resource_manager::supply_resource): Report more intelligible
  diagnostics when libgroff's `font::open_file()` returns a null pointer
  without setting `errno`.  The only way this can happen is if it
  rejected the file name for containing a slash, thus attempting
  directory traversal (recall Savannah #61424).  Also fix code style
  nits: explicitly `#include` errno.h C standard library header, align
  style of null pointer checks, and stop explicitly setting `errno` to
  zero before (indirectly) calling `fopen()`; we inspect `errno`'s value
  only under a documented error condition (a null stream pointer).  See
  errno(3).

* NEWS: Add item; we should have mentioned this (and produced these
  better diagnostics) when 1.23.0 was released.  Distributors may find
  this change desirable to backport.

Fixes <https://savannah.gnu.org/bugs/?64577>.  Thanks to Phil Chadwick
for the report and Deri James for swiftly finding a correct workaround
that suited the reporter.
2023-08-22 09:58:09 -05:00
G. Branden Robinson
9144d1e28e ANNOUNCE: Drop item.
This issue was Savannah #63831, resolved by commit 3a3c086b47, pushed to
master branch on 10 July.
2023-08-19 18:25:30 -05:00
G. Branden Robinson
1101446141 ANNOUNCE: Fix typo. 2023-08-13 09:30:07 -05:00
G. Branden Robinson
5d2e49f818 [man,mdoc]: Make base paragraph indent 5n (1/2).
Change base paragraph indentation to 5n.  This corresponds to the amount
used by historical man(7) and mdoc(7) implementations going back to Unix
Version 7 and 4.3BSD-Reno, respectively.

* tmac/an.tmac: Introduce new interface register, `BP`, to control the
  base paragraph indentation amount.  Formerly, `IN` determined it _and_
  the default relative inset amount.

  (an-reset-margin-and-inset-level, SH, SS): Use it.

* tmac/doc.tmac: Introduce `BP` register, replacing `IN`.
* tmac/mdoc/doc-common (Sh): Use it.

* src/preproc/tbl/tests/save-and-restore-tab-stops.sh:
* tmac/tests/an-ext_SY-and-YS-work.sh:
* tmac/tests/an_TH-repairs-hy-damage.sh:
* tmac/tests/an_UE-breaks-before-long-URIs.sh:
* tmac/tests/an_adjust-link-text-correctly.sh:
* tmac/tests/an_link-macros-work-in-paragraph-tags.sh:
* tmac/tests/an_use-input-traps-correctly.sh:
* tmac/tests/andoc_flush-between-packages.sh:
* tmac/tests/doc_Mt-works.sh:
* tmac/tests/doc_indents-correctly.sh:
* tmac/tests/doc_synopsis_is_not_adjusted.sh: Update amount of
  indentation expected in output.

Fixes <https://savannah.gnu.org/bugs/?64018>.  Thanks to Thorsten Glaser
and Ingo Schwarze for the discussion.

ANNOUNCE: Credit Ingo and Thorsten.
2023-08-09 22:27:16 -05:00
G. Branden Robinson
2c8e354f22 [tbl]: Fix staggering of text block cells.
* src/preproc/tbl/table.cpp: Add C preprocessor macro storing a "text
  block staggering macro".

  (block_entry::position_vertically): Call it in generated output with a
  negative half-vee motion.

  (block_entry::position_vertically, left_block_entry::print)
  (right_block_entry::print, center_block_entry::print)
  (alphabetic_block_entry::print): Call it in generated output with a
  positive half-vee motion (if staggering cell).

  (table::init_output): Write out its definition in generated output.
  It wraps the `sp` request.  If we're in a diversion, use the `\!`
  technique to recursively call ourselves and bubble up the spacing
  request a diversion level (spacing requests of anything other than 1v
  are ignored in diversions).  Otherwise, invoke the request.

Fixes <https://savannah.gnu.org/bugs/?64454> a.k.a. Debian #1038391.
Thanks to наб for the report and a good test case.

ANNOUNCE: Credit наб.
2023-08-09 16:48:29 -05:00
G. Branden Robinson
2c21e3d9db [mdoc]: Set ellipses in roman.
* tmac/doc.tmac (doc-parse-args): Set ellipses in roman.

Thanks to Lennart Jablonka for reminding me of this issue on the
linux-man mailing list.

ANNOUNCE: Credit Lennart.
2023-07-31 10:26:58 -05:00
G. Branden Robinson
9cc1be7f65 [mom]: Fix documentation typo.
Thanks to Heinz-Jürgen Oertel for pointing out the error.

https://lists.gnu.org/archive/html/groff/2023-07/msg00127.html

ANNOUNCE: Credit Heinz.

Acked-by: Peter Schaffter <peter@schaffter.ca>
2023-07-25 04:37:48 -05:00
G. Branden Robinson
9dadd72a3c tmac/man.local: Enable hyperlinks.
* tmac/man.local: Stop disabling hyperlinks on non-HTML output devices.
  less(1) version 566 and later are in wide distribution now and will be
  more so by the time of the next groff release.

* NEWS: Add item.

Thanks to Colin Watson for pioneering these changes in Debian's groff
1.23.0-1 package.

I hope to have our man/mdoc/PDF hyperlink story squared away soon, too.
2023-07-16 05:57:22 -05:00
G. Branden Robinson
42cc6d5239 ANNOUNCE: Revise for new release cycle. 2023-07-10 03:19:32 -05:00
G. Branden Robinson
91df9959f0 [build]: Improve portability to unfree compilers.
* bootstrap.conf (gnulib_modules): Add "attribute".
* src/libs/libgroff/getopt.c:
* src/libs/libgroff/new.cpp: Include gnulib's "attribute.h" header file.
* src/libs/libgroff/getopt.c (_getopt_initialize):
* src/libs/libgroff/new.cpp (operator delete): Replace GNU C unused
  attribute syntax with gnulib's "MAYBE_UNUSED".

Thanks to Bruno Haible for the report and suggested remedy.

ANNOUNCE: Drop item about builds failing with MSVC due to GNU C-style
attribute usage.  This might no longer happen, but there could be other
reasons we don't successfully build with it.
2023-07-10 03:19:31 -05:00
G. Branden Robinson
23be5bbc01 tmac/tty.tmac: Add angle bracket fallbacks.
Thanks to Mike Fulton for the report, and to Ralph Corderoy and Dave
Kemper for the discussion.

ANNOUNCE: Acknowledge Mike Fulton.
2023-07-10 03:19:30 -05:00
G. Branden Robinson
6dd07b4547 ChangeLog: Add retrospective bug closer.
Always good to find you've fixed a bug by accident.

Fixes <https://savannah.gnu.org/bugs/?62973>.  Thanks to Dave Kemper for
the original report and noting the fix.

ANNOUNCE: Update bug counts.
2023-06-23 06:51:13 -05:00
G. Branden Robinson
1b2b6c8c0f [ms]: Advise users of PDF and tables of contents.
[ms]: Offer advice to users of PDF who want a table of contents at the
front of the document.

* doc/groff.texi (ms Document Structure): Move mention of pdfjam(1) from
  here...

  (ms TOC): ...to here, and identify alternatives, including gropdf(1)'s
  `pdfswitchtopage` macro.

* doc/ms.ms (General structure of an ms document):
  (Creating a table of contents): Similar.

Fixes <https://savannah.gnu.org/bugs/?64278>.  Thanks to Michał
Kruszewski for the report.

ANNOUNCE: Acknowledge Michał and update bug counts.
2023-06-21 20:04:23 -05:00
G. Branden Robinson
d9f2b524ae ANNOUNCE: Prepare for release. 2023-06-12 01:11:28 -05:00
G. Branden Robinson
e16121986b ANNOUNCE: Reflect Savannah #60957, #62973 fixes. 2023-06-06 08:41:09 -05:00
G. Branden Robinson
8501ef58b2 ANNOUNCE: Reflect Savannah #60957 fix. 2023-06-01 16:44:39 -05:00
G. Branden Robinson
3aa8c89371 ANNOUNCE: Reflect Savannah #64091 fix. 2023-04-25 00:16:47 -05:00
G. Branden Robinson
b6f9f9634d ANNOUNCE: Clarify gdiffmk issues. 2023-04-16 19:21:13 -05:00
G. Branden Robinson
5bff81b175 ANNOUNCE: Revise. 2023-04-16 00:38:02 -05:00
G. Branden Robinson
1ba3e8313f ANNOUNCE: Reflect Savannah #62695 fix. 2023-04-14 20:56:41 -05:00
G. Branden Robinson
16604dda91 ANNOUNCE: Reflect Savannah #64032 fix. 2023-04-14 14:19:20 -05:00
G. Branden Robinson
f720813c5f ANNOUNCE: Reflect additional bug fixes.
Reflect Savannah #55789, #58162, #58164, and #61294.
2023-04-01 10:09:34 -05:00
G. Branden Robinson
03bd23b890 ANNOUNCE: Reflect Savannah #61104.
This was fixed in master on 4 September 2021.
2023-03-24 06:48:51 -05:00
G. Branden Robinson
541a3f95c0 ANNOUNCE: Update. 2023-03-22 15:24:46 -05:00
G. Branden Robinson
9df2e2ea42 [docs]: Fix Savannah #63812.
* doc/groff.texi (Operators in Conditionals):
* man/groff.7.in (Conditional expressions): Clarify how the output
  comparison operator is recognized.

Fixes <https://savannah.gnu.org/bugs/?63812>.  Thanks to John Gardner
for the report.

ANNOUNCE: Update bug counts.
2023-03-22 14:57:23 -05:00
G. Branden Robinson
25d733b6ad ANNOUNCE: We'll be doing an RC4, per Bertrand.
Since 1.23.0.rc3:

 95 files changed, 1482 insertions(+), 822 deletions(-)

...and waiting on the post-1.23.0 branch, some or all of which will be
merged to master before the final 1.23.0 tag:

 28 files changed, 8131 insertions(+), 250 deletions(-)

(Russian and Spanish localizations are the bulk of that.)

So, yeah, hard to argue.
2023-03-20 03:21:17 -05:00
G. Branden Robinson
7280614404 ANNOUNCE: Warn that we don't build with MSVC. 2023-03-06 14:01:02 -06:00
G. Branden Robinson
0221b657fe ANNOUNCE: Update bug counts.
...consequent to a bit of bug triage on 26 February.
2023-03-04 19:58:35 -06:00
G. Branden Robinson
5a420e557b INSTALL.extra: Fix documentary omission.
Dale Snell rightly points out that greater reader happiness will ensue
if the tbl-using document groff(1) actually gets preprocessed with tbl.

ANNOUNCE: Credit Dale.
2023-03-01 04:33:53 -06:00
G. Branden Robinson
99e5b4ae55 ANNOUNCE: Add item about "newlib".
Credit Brian Inglis for assistance.
2023-02-25 06:24:48 -06:00
G. Branden Robinson
6e32a94777 ANNOUNCE: Add item regarding Solaris builds. 2023-02-25 06:23:28 -06:00
G. Branden Robinson
2706c735b3 [gropdf]: Fix Savannah #63824 (2/2).
[gropdf]: Revise tests to run unconditionally, rather than configuring
them away at build time, which can cause a distribution archive to be
incorrectly structured.  Update configuration notices when optional
dependencies are absent.

* font/devpdf/devpdf.am (font_devpdf_TESTS): Remove `USE_GROPDF` and
  `HAVE_URW_FONTS` conditionals.

* m4/groff.m4 (GROFF_GROPDF_PROGRAM_NOTICE, GROFF_URW_FONTS_NOTICE):
  Warn reader that a gropdf test failure is to be expected.

Fixes <https://savannah.gnu.org/bugs/?63824> (2/2).

ANNOUNCE: Update bug counts.
2023-02-22 03:28:10 -06:00
G. Branden Robinson
a9767ace3d [man pages]: Define page-local MR fallback.
[man pages]: Provide page-local fallback definition of new `MR` macro.
I didn't think I was going to have to do this, but the premier site on
the web for viewing Linux man pages, Michael Kerrisk's man7.org, has
been pulling snapshots of the pages themselves without upgrading the
underlying macros, and so man page cross references set with `MR` are
getting lost in its presentations.  (I acknowledge: Ingo Schwarze warned
me something like this could happen.)  This definition is intended as a
stopgap measure only.  I want to revert this after groff 1.23 is
released and has spread to some reasonable degree.

* contrib/chem/chem.1.man:
* contrib/eqn2graph/eqn2graph.1.man:
* contrib/gdiffmk/gdiffmk.1.man:
* contrib/glilypond/glilypond.1.man:
* contrib/gperl/gperl.1.man:
* contrib/gpinyin/gpinyin.1.man:
* contrib/grap2graph/grap2graph.1.man:
* contrib/hdtbl/groff_hdtbl.7.man:
* contrib/mm/groff_mm.7.man:
* contrib/mm/groff_mmse.7.man:
* contrib/mm/mmroff.1.man:
* contrib/mom/groff_mom.7.man:
* contrib/pdfmark/pdfroff.1.man:
* contrib/pic2graph/pic2graph.1.man:
* contrib/rfc1345/groff_rfc1345.7.man:
* man/groff.7.man:
* man/groff_char.7.man:
* man/groff_diff.7.man:
* man/groff_font.5.man:
* man/groff_out.5.man:
* man/groff_tmac.5.man:
* man/roff.7.man:
* src/devices/grodvi/grodvi.1.man:
* src/devices/grohtml/grohtml.1.man:
* src/devices/grolbp/grolbp.1.man:
* src/devices/grolj4/grolj4.1.man:
* src/devices/gropdf/gropdf.1.man:
* src/devices/gropdf/pdfmom.1.man:
* src/devices/grops/grops.1.man:
* src/devices/grotty/grotty.1.man:
* src/devices/xditview/gxditview.1.man:
* src/preproc/eqn/eqn.1.man:
* src/preproc/eqn/neqn.1.man:
* src/preproc/grn/grn.1.man:
* src/preproc/pic/pic.1.man:
* src/preproc/preconv/preconv.1.man:
* src/preproc/refer/refer.1.man:
* src/preproc/soelim/soelim.1.man:
* src/preproc/tbl/tbl.1.man:
* src/roff/groff/groff.1.man:
* src/roff/nroff/nroff.1.man:
* src/roff/troff/troff.1.man:
* src/utils/addftinfo/addftinfo.1.man:
* src/utils/afmtodit/afmtodit.1.man:
* src/utils/grog/grog.1.man:
* src/utils/hpftodit/hpftodit.1.man:
* src/utils/indxbib/indxbib.1.man:
* src/utils/lkbib/lkbib.1.man:
* src/utils/lookbib/lookbib.1.man:
* src/utils/pfbtops/pfbtops.1.man:
* src/utils/tfmtodit/tfmtodit.1.man:
* src/utils/xtotroff/xtotroff.1.man:
* tmac/groff_man.7.man.in:
* tmac/groff_me.7.man:
* tmac/groff_ms.7.man:
* tmac/groff_trace.7.man:
* tmac/groff_www.7.man: Do it.

Fixes <https://savannah.gnu.org/bugs/?63825>.  Thanks greatly to Alexis
for identifying an issue with mandoc(1)'s handling of an earlier
iteration of this fallback, and to John Gardner for identifying a method
of detecting mandoc as the renderer at formatting time.

Tested with groff 1.22.4, mandoc 1.14.5, and groff Git HEAD (of course).

The sed script I used follows.

/^\.cp 0/a\
.\
.\\" Define fallback for groff 1.23's MR macro if the system lacks it.\
.nr do-fallback 0\
.if !\\n(.f           .nr do-fallback 1 \\" mandoc\
.if  \\n(.g .if !d MR .nr do-fallback 1 \\" older groff\
.if !\\n(.g           .nr do-fallback 1 \\" non-groff *roff\
.if \\n[do-fallback]  \\{\\\
.  de MR\
.    ie \\\\n(.$=1 \\\
.      I \\%\\\\$1\
.    el \\\
.      IR \\%\\\\$1 (\\\\$2)\\\\$3\
.  .\
.\\}\
.rr do-fallback

ANNOUNCE: Update bug counts.  Credit Alexis with assistance.
2023-02-22 03:26:37 -06:00
G. Branden Robinson
7f39a1715c ANNOUNCE: Prepare (optimistically?) for final.
Also drop reference to FTP.
2023-02-21 19:19:06 -06:00
G. Branden Robinson
c1059cf72b ANNOUNCE: Characterize rc2 -> rc3 delta. 2023-02-20 01:19:53 -06:00
G. Branden Robinson
9f264da597 ANNOUNCE: Update bug counts.
...optimistically projecting that Savannah #63808 will remain fixed.
2023-02-20 01:11:25 -06:00
G. Branden Robinson
e43aab694e ANNOUNCE: Fix thinko.
tmac/an.tmac: Fix an incoherent explanation of division in a comment.
2023-02-13 20:45:46 -06:00
G. Branden Robinson
4392979e9d [tmac]: Work around macOS od (mis-)behavior.
* tmac/tests/latin2_works.sh:
* tmac/tests/latin5_works.sh:
* tmac/tests/latin9_works.sh: Port to work around macOS's apparently
  POSIX non-conforming 'od' command.  Use single-byte octal output
  format instead of "character", and update test expectations
  accordingly.  Apparently gratuitously, macOS also puts more spaces
  after the octal address field when using this output format.

* HACKING: Document, and elaborate upon, this problem.

Also distinguish identical test failure diagnostics.

ANNOUNCE: Remove caveat about automated test failures on macOS.
2023-02-13 20:22:48 -06:00
G. Branden Robinson
ea65cdf698 ANNOUNCE: Drop notice of expected test failure.
I can't reproduce this test failure.

$ ./tmac/tests/an_use-input-traps-correctly.sh
checking that B macro uses correct input trap 'it'
checking that I macro uses correct input trap 'it'
checking that SH macro uses correct input trap 'it'
checking that SS macro uses correct input trap 'it'
checking that SM macro uses correct input trap 'it'
checking that SB macro uses correct input trap 'it'
checking that TP macro uses correct input trap 'itc'
$ uname -a
Darwin gcc104.fsffrance.org 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64
2023-02-13 12:09:20 -06:00
G. Branden Robinson
dd4511bfb0 [mdoc]: Port a test to work with macOS sed.
* tmac/tests/doc_heading-font-remapping-works.sh: Put semicolons between
  commands and closing braces in sed script.  Put each of multiple
  closing braces on a separate input line, because macOS doesn't accept
  them otherwise.  Resolves test failure observed on macOS.

* HACKING: Document the closing brace sequence problem.

* ANNOUNCE: Drop notice of failing test case, now resolved.
2023-02-13 12:07:04 -06:00
G. Branden Robinson
a47e898520 [man]: Port a test to work with macOS sed.
* tmac/tests/an_TS-adds-no-vertical-space.sh: Put semicolons between
  commands and closing braces in sed script.  Separate command stream
  into multiple '-e' expressions, breaking them after branch and label
  commands.  Resolves test failure observed on macOS.

* HACKING: Document the above problems.

* ANNOUNCE: Drop notice of failing test case, now resolved.
2023-02-13 12:06:09 -06:00
G. Branden Robinson
57e13c40ea [groff]: Accommodate macOS od behavior in test.
* src/roff/groff/tests/some_escapes_accept_newline_delimiters.sh: Weaken
  regexes in two test cases to accommodate excessive output from macOS's
  'od' command.  Resolves test failure seen on macOS.

* HACKING: Add section "Writing Tests" and document the above since this
  is the second time I've cracked my shin on this.

* ANNOUNCE: Drop notice of failing test case, now resolved.
2023-02-13 12:05:10 -06:00
G. Branden Robinson
ebf09e1e34 doc/ms.ms: Revise page 1 crash course table.
...per feedback from Raf Czlonka.

* "editor" is a command on Debian systems but may not be elsewhere.
  Throw reader a hint about Vim and Emacs, of which tell may have been
  heard.
* Use PDF as example output format rather than PostScript.
* The see(1) command is available on Debian systems via the "mailcap"
  package, but this might not be true elsewhere.  Add comment.

Also:

* Economize by using two columns, dedicating one to the shell prompt.
* Set row description in the style suggested by contemporary tbl(1).
* Bump document date.

ANNOUNCE: Add ackowledgement.
2023-02-13 00:25:16 -06:00
G. Branden Robinson
0c8a33d98b ANNOUNCE: Bump RC to 3. Add Solaris 10 caveat. 2023-02-12 18:50:11 -06:00
G. Branden Robinson
ac4e28bd9e doc/groff.texi: Fix Savannah #63777.
* doc/groff.texi (Manipulating Filling and Adjustment): Say more about
  the consequences of a break.

Fixes <https://savannah.gnu.org/bugs/?63777>.  Thanks to Dave Kemper for
the report.

ANNOUNCE: Update bug counts.
2023-02-12 15:52:34 -06:00
G. Branden Robinson
0a90a2cef5 [docs]: Fix Savannah #68216.
[docs]: Re-re-christen 'ESCAPE_AMPERSAND' ('\&').  Now call it a
(non-transparent) "dummy character".  Also rechristen
'ESCAPE_RIGHT_PARENTHESIS', ('\)') as the "transparent dummy character";
it has no impact on sentence-ending detection.

* doc/groff.texi:
* doc/meref.me.in:
* man/groff.7.man:
* man/groff_diff.7.man:
* man/roff.7.man:
* src/preproc/refer/refer.1.man:
* tmac/groff_man.7.man.in: Do it.

Fixes <https://savannah.gnu.org/bugs/?62816>.  Thanks to Dave Kemper for
the report and to the groff mailing list for the vigorous discussion.  I
don't expect my solution to please everyone.

Also update references to the \& escape sequence in comments.

ANNOUNCE: Update bug counts.
2023-02-12 14:13:37 -06:00