* 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.
* 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.
* 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.
* 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.
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.
* 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 наб.
* 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.
* 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.
* 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.
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.
[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.
* 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.
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.
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.
[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.
[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.
* 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.
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
* 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.
* 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.
* 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.
...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.
* 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.
[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.