[bug #65233] [man] MT not hyperlinking on PDF in SOME cases

2024-01-30 Thread G. Branden Robinson
Update of bug#65233 (group groff):

  Status: In Progress => Fixed  
 Open/Closed:Open => Closed 
 Planned Release:None => 1.24.0 

___

Follow-up Comment #3:


commit 7e900875961c72b4414f009885e2bdcc33f2473e
Author: G. Branden Robinson 
AuthorDate: Wed Jan 31 00:08:13 2024 -0600

[man]: Fix Savannah #65233.

* tmac/an.tmac (an*begin-hyperlink): Stop shutting off hyperlink support
  permanently if we hit one unsupported instance of `MT` or `UR` nested
  inside `TP`.

Fixes .




___

Reply to this item at:

  

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




[groff] 01/02: [man]: Fix Savannah #65233.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 7e900875961c72b4414f009885e2bdcc33f2473e
Author: G. Branden Robinson 
AuthorDate: Wed Jan 31 00:08:13 2024 -0600

[man]: Fix Savannah #65233.

* tmac/an.tmac (an*begin-hyperlink): Stop shutting off hyperlink support
  permanently if we hit one unsupported instance of `MT` or `UR` nested
  inside `TP`.

Fixes .
---
 ChangeLog| 8 
 tmac/an.tmac | 6 ++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bb55e47bd..90ddad1b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-01-31  G. Branden Robinson 
+
+   * tmac/an.tmac (an*begin-hyperlink): Stop shutting off hyperlink
+   support permanently if we hit one unsupported instance of `MT`
+   or `UR` nested inside `TP`.
+
+   Fixes .
+
 2024-01-30  G. Branden Robinson 
 
* doc/GMPfront.t: Support non-internal man page cross
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 406e9f497..e4b072884 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1122,11 +1122,9 @@ contains unsupported escape sequence
 .  \" We can only hyperlink if we're not in a diversion.
 .  \" XXX: There's no fundamental reason for that, just a simple matter
 .  \" of macro programming.
-.  if !'\\n[.z]'' \{\
+.  ie !'\\n[.z]'' \
 .an-warn cannot nest .MT or .UR inside .TP; ending paragraph tag
-.nr an*do-hyperlink 0
-.  \}
-.  if \\n[an*do-hyperlink] \{\
+.  el .if \\n[an*do-hyperlink] \{\
 .nr an*is-in-link-text-diversion 1
 .\" Start diversion in a new environment.
 .nr an*is-in-link-text-diversion 1

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


[groff] 02/02: [docs]: Support man pages book in distrib archive.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 761c35287eab983042e310aca8582b24389c83d5
Author: G. Branden Robinson 
AuthorDate: Wed Jan 31 00:17:03 2024 -0600

[docs]: Support man pages book in distrib archive.

* doc/doc.am (DOCFILES_INST): Ship "GMPfront.t" in the distribution
  archive.
---
 ChangeLog  | 5 +
 doc/doc.am | 1 +
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 90ddad1b4..f816790f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-31  G. Branden Robinson 
+
+   * doc/doc.am (DOCFILES_INST): Ship "GMPfront.t" in the
+   distribution archive.
+
 2024-01-31  G. Branden Robinson 
 
* tmac/an.tmac (an*begin-hyperlink): Stop shutting off hyperlink
diff --git a/doc/doc.am b/doc/doc.am
index 95b27c109..f9842420b 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -53,6 +53,7 @@ DOCFILES_INST = \
   doc/ms.ms \
   doc/pic.ms
 DOCFILES_NOINST = \
+  doc/GMPfront.t \
   doc/meintro.me.in \
   doc/meintro_fr.me.in \
   doc/meref.me.in

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


[bug #65233] [man] MT not hyperlinking on PDF in SOME cases

2024-01-30 Thread G. Branden Robinson
Update of bug#65233 (group groff):

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

___

Follow-up Comment #2:

Figured it out.


___

Reply to this item at:

  

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




[bug #65233] [man] MT not hyperlinking on PDF in SOME cases

2024-01-30 Thread G. Branden Robinson
Follow-up Comment #1, bug#65233 (group groff):

I can break it on the terminal, too.


$ nroff -man ~/groff-HEAD/share/man/man5/groff_out.5
~/groff-HEAD/share/man/man5/groff_tmac.5
$ nroff -man ~/groff-HEAD/share/man/man5/groff_out.5
~/groff-HEAD/share/man/man5/groff_tmac.5  |grep -A3 Authors
Authors
 James  Clark  wrote an early version of this document, which described
only
 the differences between AT device‐independent troff’s output 
format  and
 that  of GNU roff.  The present version was completely rewritten in 2001
by
an.tmac:/home/branden/groff-HEAD/share/man/man5/groff_out.5:1937: warning:
cannot nest .MT or .UR inside .TP; ending paragraph tag
troff:/home/branden/groff-HEAD/share/man/man5/groff_tmac.5:983: warning [page
21, line 6]: cannot adjust line
--
Authors
 This document was written by Bernd  Warken 
⟨groff-bernd.warken...@web.de⟩,
 Werner  Lemberg  ⟨w...@gnu.org⟩, and G. Branden Robinson
⟨g.branden.robinson@
 gmail.com⟩.


Hmm, I wonder if that diagnostic message (or logic around it) is frotzing the
package's internal state.


___

Reply to this item at:

  

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




[bug #65233] [man] MT not hyperlinking on PDF in SOME cases

2024-01-30 Thread G. Branden Robinson
URL:
  

 Summary: [man] MT not hyperlinking on PDF in SOME cases
   Group: GNU roff
   Submitter: gbranden
   Submitted: Wed 31 Jan 2024 05:17:32 AM UTC
Category: Macro man
Severity: 3 - Normal
  Item Group: Incorrect behaviour
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None


___

Follow-up Comments:


---
Date: Wed 31 Jan 2024 05:17:32 AM UTC By: G. Branden Robinson 
Weird.

"groff-man-pages.pdf" mostly has working `MT` hyperlinks in PDF.

But not in the "Authors" sections of groff_tmac(5) and groff(7).

Why?







___

Reply to this item at:

  

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




Milestone reached: hyperlinked man(7) documents in PDF

2024-01-30 Thread G. Branden Robinson
Hi folks,

In a frenzy of activity over the past few days Deri and I have landed
everything necessary to bring full hyperlink support to man(7) documents
in PDF.

* The MT/ME macros hyperlink email addresses.
* The UR/UE macros hyperlink general URLs.
* The MR macro produces "man:foo(1)"-style hyperlinks.

This should have been easier than it was, but I'll save my gripes about
why it wasn't for a postmortem at another time.  :)

Further, Deri's "groff man pages book" is now the "official"
groff-man-pages.pdf document.  It adds a spare but attractive cover page
and, importantly, "internalizes" the man page hyperlinks when the
document itself provides the page in question.  "External" man pages
remain in "man:foo(1)" form.

I've successfully tested these features in Evince and xpdf.  Okular is
giving me problems as I reported to this list earlier today.

As always, you can check out the latest version of this and other groff
documents in a Dropbox folder.

https://www.dropbox.com/sh/17ftu3z31couf07/AAC_9kq0ZA-Ra2ZhmZFWlLuva?dl=0

I'd appreciate feedback and particularly any report of bugs that you may
spot.

What next?
==

mdoc(7) needs feature parity via its `Mt`, `Lk`, and `Xr`.  I'm already
working toward that, as recent commits will suggest.  Then we can say
that we have full PDF hyperlink support for _man pages_.

In man(7), it sure would be nice if we could turn paragraph tags into
hyperlinked text (this already works for `MR`, but not `MT` and `UR`).
I'm working on that, too.

Regards,
Branden


signature.asc
Description: PGP signature


[bug #65232] Russian hyphenation is not working

2024-01-30 Thread G. Branden Robinson
Update of bug#65232 (group groff):

  Status:None => Need Info  

___

Follow-up Comment #1:

Hi Robin,

[comment #0 original submission:]
> I cannot get Russian hyphenation to work on a HEAD build of Groff. As far as
I understand, it should be enough to -mru.

It should.

> It should even enable hyphenation mode 8 by default.

That is _not_ my understanding.  The automated test assumes that loading the
"ru" package will set the hyphenation mode to 1 or 2.


$ grep -A2 mru tmac/tests/localization-works.sh 
output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -mru 2>&1)
echo 'checking raw troff with -mru' >&2
echo "$output" | grep -Fqx '.hy=1' || wail

--
output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -me -mru 2>&1)
echo 'checking -me with -mru' >&2
echo "$output" | grep -Fqx '.hy=2' || wail

--
output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -ms -mru 2>&1)
echo 'checking -ms with -mru' >&2
echo "$output" | grep -Fqx '.hy=2' || wail

--
output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -rcR=0 -man -mru
2>&1)
echo 'checking -man with -rcR=0 -mru' >&2
echo "$output" | grep -Fqx '.hy=2' || wail

--
output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -rcR=1 -man -mru
2>&1)
echo 'checking -man with -rcR=1 -mru' >&2
echo "$output" | grep -Fqx '.hy=1' || wail


And indeed that's what "ru.tmac" sets up.


.\" Set up hyphenation.
.
.\" Russian hyphenation (\lefthyphenmin=2, \righthyphenmin=2)
.nr \*[locale]*hyphenation-mode-base 1
.nr \*[locale]*hyphenation-mode-trap 2


But we don't have in this automated test any Russian language text that we
check for correct hyphenation.  None was available.  If you can supply some,
that would be helpful.

> Still, I try to set HY and .hy manually without any success.
> 
> My source file UTF-8, converted to KOI8 using iconv, but I also included the
preconverted KOI8 file in case you don't have a working iconv. btw. that's a
very useful hack, as it preserves misc. codepoints as unicode character
escapes.
> 
> You have to install LiberationSerif, for instance using install-fonts.sh.
> 
> The command line to build the example used is:
> 

> iconv -f UTF-8 -t KOI8-R --unicode-subst='\[u%04X]' hyphen-utf8.ms | groff
-Tpdf -ms -mru >hyphen-koi8.pdf


Here's a thread from last March when we were first landing this change.

https://lists.gnu.org/archive/html/groff/2023-03/msg00100.html

You might compare your results with those we were getting at the time.

Regards,
Branden


___

Reply to this item at:

  

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




[bug #65231] improve groff-man-pages.pdf

2024-01-30 Thread G. Branden Robinson
Update of bug#65231 (group groff):

  Status: In Progress => Fixed  
 Open/Closed:Open => Closed 
 Planned Release:None => 1.24.0 

___

Follow-up Comment #2:


commit df986e2480da79bad180b16e4b190aa09a4add5a
Author: G. Branden Robinson 
Date:   Tue Jan 30 21:58:35 2024 -0600

doc/GMPfront.t: Support external man page xrefs.

* doc/GMPfront.t: Support non-internal man page cross references.  Port
  over contemporary implementation of `MR` from "an.tmac" to its local
  replacement in this file.  Also remove conditionals on the `.T` string
  matching "pdf".  Instead test this register once at the beginning of
  the file and skip it with the `nx` request if it doesn't match.  This
  lowers the complexity and average indentation level of the file.

Fixes .




___

Reply to this item at:

  

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




[bug #62933] [man] produce hyperlinks in PDF output

2024-01-30 Thread G. Branden Robinson
Update of bug#62933 (group groff):

  Status: In Progress => Fixed  
 Open/Closed:Open => Closed 

___

Follow-up Comment #7:


commit 594937c50e0d9fed0c815ac4e3e0c560c6d66c32
Author: G. Branden Robinson 
Date:   Tue Jan 30 21:02:03 2024 -0600

[man]: Fix Savannah #62933 (`MR` PDF hyperlinks).

* tmac/an.tmac (MR): Support hyperlinked man page cross references in
  PDF.

Fixes .




___

Reply to this item at:

  

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




[groff] 03/05: doc/doc.am: Fix missing dependency.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 8d3dcb84752b802add084b3254cddb31326d5bc4
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 21:13:29 2024 -0600

doc/doc.am: Fix missing dependency.

* doc/doc.am (doc/groff-man-pages.pdf): Register dependency on
  "doc/GMPfront.t".
---
 ChangeLog  | 5 +
 doc/doc.am | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index cc0d3b5d5..b1572d6f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-30  G. Branden Robinson 
+
+   * doc/doc.am (doc/groff-man-pages.pdf): Register dependency on
+   "doc/GMPfront.t".
+
 2024-01-30  G. Branden Robinson 
 
* tmac/an.tmac (MR): Support hyperlinked man page cross
diff --git a/doc/doc.am b/doc/doc.am
index e9cac80cc..95b27c109 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -266,7 +266,9 @@ man-clean:
 # We embed the fonts (-P-e) to (1) honor the current PDF standard, (2)
 # ensure consistent rendering of the document, and (3) exercise this
 # feature of gropdf.
-doc/groff-man-pages.pdf: $(GROFF_MAN_PAGES_ALL) eqn pic tbl \
+doc/groff-man-pages.pdf: $(GROFF_MAN_PAGES_ALL) \
+  $(top_srcdir)/doc/GMPfront.t \
+  eqn pic tbl \
   $(TMAC_PACKAGE_MAN) $(TMAC_PACKAGE_MDOC) font/devps/freeeuro.pfa
$(GROFF_V)$(DOC_PDFMOM) -pet -mandoc -dHF=HB -rC1 \
  -rCHECKSTYLE=3 -Tpdf -P-e \

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


[groff] 04/05: doc/GMPfront.t: Tweak matters of opinion.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 68870b5259998d6199d2d28e27d3c54dc266e9d5
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 21:30:26 2024 -0600

doc/GMPfront.t: Tweak matters of opinion.

* doc/GMPfront.t: Bikeshed the collected man pages.  Retitle to "groff
  Collected Reference Pages".  Spell "groff" in full lowercase.  Favor
  requests over escape sequences.  Simplify means of setting page
  number.
---
 ChangeLog  |  7 +++
 doc/GMPfront.t | 13 -
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b1572d6f5..a3f51f031 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-01-30  G. Branden Robinson 
+
+   * doc/GMPfront.t: Bikeshed the collected man pages.  Retitle to
+   "groff Collected Reference Pages".  Spell "groff" in full
+   lowercase.  Favor requests over escape sequences.  Simplify
+   means of setting page number.
+
 2024-01-30  G. Branden Robinson 
 
* doc/doc.am (doc/groff-man-pages.pdf): Register dependency on
diff --git a/doc/GMPfront.t b/doc/GMPfront.t
index 5011266b9..28a0a2954 100644
--- a/doc/GMPfront.t
+++ b/doc/GMPfront.t
@@ -3,7 +3,7 @@
 ..
 .nr PDFOUTLINE.FOLDLEVEL 1
 .defcolor pdf:href.colour rgb 0.00 0.25 0.75
-.pdfinfo /Title "The Groff Manpage Book"
+.pdfinfo /Title "groff Collected Reference Pages"
 .de an*cln
 .  ds \\$1
 .  als an*cln:res \\$1
@@ -59,12 +59,15 @@
 .sp .6i
 .ad r
 .ps 52
-\m[maroon]Groff\m[]
+.gcolor maroon
+groff
+.gcolor
 .sp 18p
 .ps 16
-\f[BMB]THE MAN PAGES BOOK\fP
+.ft BMB
+Collected Reference Pages
+.ft
 .sp .2i
 .Hl
-.pn 1
-.bp
+.bp 1
 .pdfpagenumbering D . 1

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


[groff] 02/05: [man]: Fix Savannah #62933 (`MR` PDF hyperlinks).

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 594937c50e0d9fed0c815ac4e3e0c560c6d66c32
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 21:02:03 2024 -0600

[man]: Fix Savannah #62933 (`MR` PDF hyperlinks).

* tmac/an.tmac (MR): Support hyperlinked man page cross references in
  PDF.

Fixes .
---
 ChangeLog| 7 +++
 tmac/an.tmac | 9 +
 2 files changed, 16 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c173c5654..cc0d3b5d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-01-30  G. Branden Robinson 
+
+   * tmac/an.tmac (MR): Support hyperlinked man page cross
+   references in PDF.
+
+   Fixes .
+
 2024-01-30  G. Branden Robinson 
 
* src/preproc/tbl/table.cpp (table::add_entry): Recast recently
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 81ad61118..406e9f497 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1270,6 +1270,11 @@ contains unsupported escape sequence
 .  if \\n[an*do-hyperlink] \{\
 .if '\*[.T]'html' \
 .  nop \X^html:^\c
+.if '\*[.T]'pdf' \{\
+.  ds an*saved-stroke-color \\n[.m]\"
+.  nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\c
+.  pdfhref W -D \\*[an*url] -- "|"
+.\}
 .if \\n[an*is-output-terminal] \
 .  nop \X^tty: link \\*[an*url]^\c
 .  \}
@@ -1277,6 +1282,10 @@ contains unsupported escape sequence
 .  if \\n[an*do-hyperlink] \{\
 .if '\*[.T]'html' \
 .  nop \X^html:^\c
+.if '\*[.T]'pdf' \{\
+.  nop \X'pdf: markend'\m[\\*[an*saved-stroke-color]]\c
+.  rm an*saved-stroke-color
+.\}
 .if \\n[an*is-output-terminal] \
 .  nop \X^tty: link^\c
 .  \}

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


[groff] 05/05: doc/GMPfront.t: Support external man page xrefs.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit df986e2480da79bad180b16e4b190aa09a4add5a
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 21:58:35 2024 -0600

doc/GMPfront.t: Support external man page xrefs.

* doc/GMPfront.t: Support non-internal man page cross references.  Port
  over contemporary implementation of `MR` from "an.tmac" to its local
  replacement in this file.  Also remove conditionals on the `.T` string
  matching "pdf".  Instead test this register once at the beginning of
  the file and skip it with the `nx` request if it doesn't match.  This
  lowers the complexity and average indentation level of the file.

Fixes .
---
 ChangeLog  | 12 
 doc/GMPfront.t | 43 +++
 2 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a3f51f031..bb55e47bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-01-30  G. Branden Robinson 
+
+   * doc/GMPfront.t: Support non-internal man page cross
+   references.  Port over contemporary implementation of `MR` from
+   "an.tmac" to its local replacement in this file.  Also remove
+   conditionals on the `.T` string matching "pdf".  Instead test
+   this register once at the beginning of the file and skip it with
+   the `nx` request if it doesn't match.  This lowers the
+   complexity and average indentation level of the file.
+
+   Fixes .
+
 2024-01-30  G. Branden Robinson 
 
* doc/GMPfront.t: Bikeshed the collected man pages.  Retitle to
diff --git a/doc/GMPfront.t b/doc/GMPfront.t
index 28a0a2954..ddbbea2d4 100644
--- a/doc/GMPfront.t
+++ b/doc/GMPfront.t
@@ -1,6 +1,9 @@
 .ig
front.t
 ..
+.
+.if !'\*[.T]'pdf' .nx
+.
 .nr PDFOUTLINE.FOLDLEVEL 1
 .defcolor pdf:href.colour rgb 0.00 0.25 0.75
 .pdfinfo /Title "groff Collected Reference Pages"
@@ -21,25 +24,41 @@
 .
 .am reload-man END
 .de an*bookmark
-.  if '*[.T]'pdf' \{\
-.ie ($1=1) \{\
-.   an*cln an*page-ref-nm $2\"
-.   pdfbookmark -T "*[an*page-ref-nm]" $1 $2
-.\}
-.el .pdfbookmark $1 $2
+.  ie ($1=1) \{\
+. an*cln an*page-ref-nm $2\"
+. pdfbookmark -T "*[an*page-ref-nm]" $1 $2
 .  \}
+.  el .pdfbookmark $1 $2
 ..
 .
 .de1 MR
 .  if ((n[.$] < 2) : (n[.$] > 3)) \
 .an-style-warn .$0 expects 2 or 3 arguments, got n[.$]
-.  if '*[.T]'pdf' \{\
-.ie n(.$=1 \
-.  I $1
+.  ds an*url man:$1($2)\" used everywhere but macOS
+.  if (n[an*MR-URL-format] = 2) \
+.ds an*url x-man-page://$2/$1\" macOS/Mac OS X since 10.3
+.  if (n[an*MR-URL-format] = 3) \
+.ds an*url man:$1.$2\" Bwana (Mac OS X)
+.  if (n[an*MR-URL-format] = 4) \
+.ds an*url x-man-doc://$2/$1\" ManOpen (Mac OS X pre-2005)
+.  nh
+.  ie n(.$=1 \{\
+.ft *[MF]
+.nop $1
+.ft
+.  \}
+.  el \{\
+.an*cln an*page-ref-nm $1($2)
+.ie d pdf:look(*[an*page-ref-nm]) \
+.  pdfhref L -D *[an*page-ref-nm] -A "$3" -- 
\f[*[MF]]$1\f[]($2)
 .el \{\
-.  an*cln an*page-ref-nm $1($2)
-.  ie d pdf:look(*[an*page-ref-nm]) .pdfhref L -D 
*[an*page-ref-nm] -A "$3" -- \fI$1\fP($2)
-.  el .IR $1 ($2)$3
+.  ds an*saved-stroke-color n[.m]\"
+.  nop \&\m[*[PDFHREF.TEXT.COLOUR]]\c
+.  pdfhref W -D *[an*url] -- "|"
+.  nop \&*[an-lic]\f[*[MF]]$1*[an-ic]\f[R]($2)\c
+.  nop \X'pdf: markend'\m[*[an*saved-stroke-color]]\c
+.  rm an*saved-stroke-color
+.  nop \&$3
 .\}
 .  \}
 .  hy n[an*hyphenation-mode]

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


[groff] 01/05: tmac/an.tmac (MR): Fix misleading indentation.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit e1eec27176128ed0cd238a94a280f06599cfb293
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 20:56:47 2024 -0600

tmac/an.tmac (MR): Fix misleading indentation.
---
 tmac/an.tmac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tmac/an.tmac b/tmac/an.tmac
index 20d96ff70..81ad61118 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1273,7 +1273,7 @@ contains unsupported escape sequence
 .if \\n[an*is-output-terminal] \
 .  nop \X^tty: link \\*[an*url]^\c
 .  \}
-.  nop \&\\*[an-lic]\f[\\*[MF]]\\$1\\*[an-ic]\f[R](\\$2)\c
+.  nop \&\\*[an-lic]\f[\\*[MF]]\\$1\\*[an-ic]\f[R](\\$2)\c
 .  if \\n[an*do-hyperlink] \{\
 .if '\*[.T]'html' \
 .  nop \X^html:^\c

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


[bug #65231] improve groff-man-pages.pdf

2024-01-30 Thread G. Branden Robinson
Update of bug#65231 (group groff):

  Item Group:  Build/Installation => Documentation  
 Assigned to:deri => gbranden   
 Summary: Improve our groff-man-pages.pdf  => improve
groff-man-pages.pdf 

___

Follow-up Comment #1:

...and I've got the fixes to make the _external_ hyperlinks work (they need
resyncing with recent changes to "an.tmac").

Testing now--will push very soon, I expect.


___

Reply to this item at:

  

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




[bug #65099] 1.24.0 release goals

2024-01-30 Thread G. Branden Robinson
Update of bug#65099 (group groff):

  Depends on: => bugs #62933


___

Reply to this item at:

  

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




[bug #62933] [man] produce hyperlinks in PDF output

2024-01-30 Thread G. Branden Robinson
Update of bug#62933 (group groff):

  Status:None => In Progress
 Assigned to:None => gbranden   
 Planned Release:None => 1.24.0 

___

Follow-up Comment #6:

Got the last third.


diff --git a/tmac/an.tmac b/tmac/an.tmac
index 81ad61118..b8160e8aa 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1270,6 +1270,11 @@ .de1 MR
 .  if \\n[an*do-hyperlink] \{\
 .if '\*[.T]'html' \
 .  nop \X^html:^\c
+.if '\*[.T]'pdf' \{\
+.  ds an*saved-stroke-color \\n[.m]\"
+.  nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\c
+.  pdfhref W -D \\*[an*url] -- "|"
+.\}
 .if \\n[an*is-output-terminal] \
 .  nop \X^tty: link \\*[an*url]^\c
 .  \}
@@ -1277,6 +1282,10 @@ .de1 MR
 .  if \\n[an*do-hyperlink] \{\
 .if '\*[.T]'html' \
 .  nop \X^html:^\c
+.if '\*[.T]'pdf' \{\
+.  nop \X'pdf: markend'\\m[\\*[an*saved-stroke-color]]\c
+.  rm an*saved-stroke-color
+.\}
 .if \\n[an*is-output-terminal] \
 .  nop \X^tty: link^\c
 .  \}




___

Reply to this item at:

  

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




[bug #65232] Russian hyphenation is not working

2024-01-30 Thread Robin Haberkorn
URL:
  

 Summary: Russian hyphenation is not working
   Group: GNU roff
   Submitter: rhaberkorn
   Submitted: Ср 31 янв 2024 02:48:42
Category: Macro - others/general
Severity: 3 - Normal
  Item Group: Incorrect behaviour
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None


___

Follow-up Comments:


---
Date: Ср 31 янв 2024 02:48:42   By: Robin Haberkorn 
I cannot get Russian hyphenation to work on a HEAD build of Groff. As far as I
understand, it should be enough to -mru. It should even enable hyphenation
mode 8 by default.

Still, I try to set HY and .hy manually without any success.

My source file UTF-8, converted to KOI8 using iconv, but I also included the
preconverted KOI8 file in case you don't have a working iconv. btw. that's a
very useful hack, as it preserves misc. codepoints as unicode character
escapes.

You have to install LiberationSerif, for instance using install-fonts.sh.

The command line to build the example used is:


iconv -f UTF-8 -t KOI8-R --unicode-subst='\[u%04X]' hyphen-utf8.ms | groff
-Tpdf -ms -mru >hyphen-koi8.pdf








___
File Attachments:


---
Name: hyphen.tar.gz  Size: 111КиБ


AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-3112ec7181a7018604fb7b25b2201235b3bdfb6a.tar.gz

___

Reply to this item at:

  

___
Сообщение отправлено по Savannah
https://savannah.gnu.org/




[bug #65227] [grog] mishandles options containing 'C'

2024-01-30 Thread G. Branden Robinson
Update of bug#65227 (group groff):

  Status: In Progress => Fixed  
 Open/Closed:Open => Closed 
 Planned Release:None => 1.24.0 

___

Follow-up Comment #1:


commit b95e82a80c02ca30c36c25f4915aef257bf81260
Author: G. Branden Robinson 
Date:   Mon Jan 29 21:07:55 2024 -0600

[grog]: Fix Savannah #65227.

* src/utils/grog/grog.pl (process_arguments): Match a 'C' only in a 
  groff option cluster when deciding to enable compatibility mode, not
  any 'C' anywhere in any option.

Fixes .




___

Reply to this item at:

  

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




[groff] 03/11: ChangeLog: Add bug-closer for old entry.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 2a27cd3f9092fa98b06c4a33af8a3f53c1bc3375
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 19:05:41 2024 -0600

ChangeLog: Add bug-closer for old entry.
---
 ChangeLog | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 03858992a..c21eee5a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -180,6 +180,8 @@
text color from RGB 0.35/0/0.6 to 0/0.35/0.6 (magenta-ish to
cyan-ish).
 
+   Fixes .
+
 2024-01-25  G. Branden Robinson 
 
[troff]: Trivially refactor (trap Booleans).

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


[groff] 05/11: [grog]: Fix Savannah #65227.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit b95e82a80c02ca30c36c25f4915aef257bf81260
Author: G. Branden Robinson 
AuthorDate: Mon Jan 29 21:07:55 2024 -0600

[grog]: Fix Savannah #65227.

* src/utils/grog/grog.pl (process_arguments): Match a 'C' only in a
  groff option cluster when deciding to enable compatibility mode, not
  any 'C' anywhere in any option.

Fixes .
---
 ChangeLog  | 10 ++
 src/utils/grog/grog.pl |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c21eee5a9..bd728cef7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,16 @@
 
* src/devices/gropdf/gropdf.pl: minor fixes
 
+2024-01-29  G. Branden Robinson 
+
+   [grog]: Fix Savannah #65227.
+
+   * src/utils/grog/grog.pl (process_arguments): Match a 'C' only
+   in a groff option cluster when deciding to enable compatibility
+   mode, not any 'C' anywhere in any option.
+
+   Fixes .
+
 2024-01-29  G. Branden Robinson 
 
[tbl]: Fix Savannah #65225.
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index c70eb16d1..bd01d6856 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -164,9 +164,10 @@ sub process_arguments {
 
 # Treat anything else as (possibly clustered) groff options that
 # take no arguments.
+my $cluster = '[abcCeEgGijklNpRsStUVXzZ]*';
 
 # Our do_line() needs to know if it should do compatibility parsing.
-$use_compatibility_mode = 1 if ($arg =~ /C/);
+$use_compatibility_mode = 1 if ($arg =~ /^-${cluster}C${cluster}/);
 
 push @command, $arg;
   }

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


[groff] 09/11: [tbl]: Recast recently added diagnostic message.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit e5de2e115371e43d484a3ed4b73768af02ac09b3
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 18:30:45 2024 -0600

[tbl]: Recast recently added diagnostic message.

* src/preproc/tbl/table.cpp (table::add_entry): Do it.
---
 ChangeLog | 5 +
 src/preproc/tbl/table.cpp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index bd728cef7..c173c5654 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-01-30  G. Branden Robinson 
+
+   * src/preproc/tbl/table.cpp (table::add_entry): Recast recently
+   added diagnostic message.
+
 2024-01-26  Deri James  
 
Changes to satisfy Savannah #65231.
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 3459e9276..9f1268a5c 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -1583,7 +1583,7 @@ void table::add_entry(int r, int c, const string ,
   }
   else if (strncmp(s, "\\R", 2) == 0) {
 if (len < 3) {
-  error("'\\R' requires a glyph to repeat");
+  error("an ordinary or special character must follow '\\R'");
   e = new empty_entry(this, f);
 }
 else {

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


[groff] 07/11: NEWS: Add item about man(7)'s `IP`.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 38ad078688b8f633f4f5c6c78ef5efe0125b
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 02:57:15 2024 -0600

NEWS: Add item about man(7)'s `IP`.

Specifically, about its loss of respect for tag separation.
---
 NEWS | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/NEWS b/NEWS
index c04787fdd..9b4e1d323 100644
--- a/NEWS
+++ b/NEWS
@@ -136,6 +136,12 @@ o The an (man) macro package now supports a `TS` register 
to configure
   exceeds the paragraph indentation, the line is broken after the tag.)
   This parameter, formerly hard-coded as `1n`, now defaults to `2n`.
 
+o The an (man) macro package's `IP` macro no longer honors the formerly
+  hard-coded 1n tag separation noted in the previous item.  This means
+  that the first argument to the `IP` macro can abut the text of the
+  paragraph with no intervening space.  If you use a word instead of
+  punctuation for `IP`'s first argument, consider migrating to `TP`.
+
 o The an (man) and doc (mdoc) macro packages now use slightly different
   vertical margins when formatting for typesetters, to align more
   closely with the traditional implementations of these packages.  Per

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


[groff] 10/11: tmac/doc.tmac: Fix inaccurate comment.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 058d314cdef7a50124e1a76272b1b5d477b515c1
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 18:36:30 2024 -0600

tmac/doc.tmac: Fix inaccurate comment.
---
 tmac/doc.tmac | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index e36a587ea..0c9f3a0cf 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -6815,7 +6815,6 @@
 .\" NS   doc-macro-name
 .\" NS
 .\" NS local variables:
-.\" NS   doc-lasttext-Mt
 .\" NS   doc-target-Mt
 .
 .eo

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


[groff] 08/11: [docs]: Discuss untokenized input.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit b0a3601c953536682f5ff5ee9d06ae92b58f1d2c
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 18:25:28 2024 -0600

[docs]: Discuss untokenized input.

...more systematically.

* doc/groff.texi: Use parallel language as much as possible.  Add
  concept index entries for this phenomenon.
* man/groff.7.man (Escape sequence short reference): Summarize this
  aspect of behavior.
---
 doc/groff.texi  | 30 --
 man/groff.7.man | 24 
 2 files changed, 48 insertions(+), 6 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 381ae8fc2..dce38736d 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -7518,9 +7518,7 @@ the @code{\R} escape sequence.
 @DefescListEndx {\\R, @code{'}, ident value, @code{'}}
 Set register @var{ident} to @var{value}.  If @var{ident} doesn't exist,
 GNU @code{troff} creates it.  In the @code{\R} escape sequence, the
-delimiter need not be a neutral apostrophe; see @ref{Delimiters}.  It
-also does not produce a token in GNU @code{troff}.  @xref{Gtroff
-Internals}.
+delimiter need not be a neutral apostrophe; see @ref{Delimiters}.
 
 @Example
 .nr a (((17 + (3 * 4))) % 4)
@@ -7534,9 +7532,15 @@ Internals}.
 can change a register's value after it is dereferenced but before it is
 interpolated.  @xref{Auto-increment}.)
 
-The complete transparency of @code{\R} can cause surprising effects if
-you use registers like @code{.k}, which get evaluated at the time they
-are accessed.
+@cindex @code{\R} escape sequence, untokenized on input
+@cindex untokenized escape sequence, @code{\R}
+@code{\R} is not tokenized when GNU @code{troff} reads its input; it
+updates only the formatter's internal state and does not contribute
+(directly) to output.  @xref{Gtroff Internals}.
+
+Further surprise can occur if you use registers like
+@code{.k},@footnote{@xref{Page Motions}.}  whose values are not
+determined until they are interpolated.
 
 @Example
 .ll 1.6i
@@ -10504,6 +10508,8 @@ for later use.
 .ft \*[saved-font]
 @endExample
 
+@cindex @code{\f} escape sequence, untokenized on input
+@cindex untokenized escape sequence, @code{\f}
 @code{\f} is not tokenized when GNU @code{troff} reads its input; it
 instead updates the environment.  It thus can be used in requests that
 expect a single-character argument.  We can assign a font to a margin
@@ -10643,6 +10649,8 @@ baked beans,
 and spam.
 @endExample
 
+@cindex @code{\F} escape sequence, untokenized on input
+@cindex untokenized escape sequence, @code{\F}
 @code{\F} is not tokenized when GNU @code{troff} reads its input; it
 instead updates the environment.  It thus can be used in requests that
 expect a single-character argument.  We can thus alter the font family
@@ -11514,6 +11522,8 @@ The read-only register @code{.height} contains the font 
height as set by
 Currently, only the @option{-T ps} and @option{-T pdf} devices support
 this feature.
 
+@cindex @code{\H} escape sequence, untokenized on input
+@cindex untokenized escape sequence, @code{\H}
 @code{\H} is not tokenized when GNU @code{troff} reads its input; it
 instead updates the environment.  It thus can be used in requests that
 expect a single-character argument.  We can thus alter the font height
@@ -11552,6 +11562,8 @@ The read-only register @code{.slant} contains the font 
slant as set by
 Currently, only the @option{-T ps} and @option{-T pdf} devices support
 this feature.
 
+@cindex @code{\S} escape sequence, untokenized on input
+@cindex untokenized escape sequence, @code{\S}
 @code{\S} is not tokenized when GNU @code{troff} reads its input; it
 instead updates the environment.  It thus can be used in requests that
 expect a single-character argument.  We can thus alter the font slant
@@ -12067,6 +12079,8 @@ wink, wink, \s+2nudge, nudge,\s+8 say no more!
 @endExample
 @endDefreq
 
+@cindex @code{\s} escape sequence, untokenized on input
+@cindex untokenized escape sequence, @code{\s}
 @code{\s} is not tokenized when GNU @code{troff} reads its input; it
 instead updates the environment.  It thus can be used in requests that
 expect a single-character argument.  We can thus alter the type size
@@ -12390,6 +12404,8 @@ string-valued register @samp{.m}; it is associated with 
the environment
 (@pxref{Environments}).  The default stroke color is named
 @samp{default}.
 
+@cindex @code{\m} escape sequence, untokenized on input
+@cindex untokenized escape sequence, @code{\m}
 @code{\m} is not tokenized when GNU @code{troff} reads its input; it
 instead updates the environment.  It thus can be used in requests that
 expect a single-character argument.  We can thus alter the stroke color
@@ -12409,6 +12425,8 @@ Set the fill color for objects drawn with 
@code{\D'@dots{}'} escape
 sequences.  The escape sequence @code{\M[]} restores the previous fill
 color, as does an @code{fcolor} request without an argument.
 
+@cindex @code{\M} 

[groff] 06/11: NEWS: Clarify man page line length item.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit d9e3f3d6b9d27f68a176dfb02e0a09a046ee0b1b
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 02:51:39 2024 -0600

NEWS: Clarify man page line length item.
---
 NEWS | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index d6283af70..c04787fdd 100644
--- a/NEWS
+++ b/NEWS
@@ -112,9 +112,10 @@ o The an (man), doc (mdoc), and doc-old (mdoc-old) macro 
packages have
   to 80n.  The latter is a vastly more common configuration, but that
   line length had been avoided for decades (perhaps as long as as groff
   has existed), for an undocumented reason.  That reason appears to have
-  been bugs in GNU tbl(1) and its interaction with an aspect of
+  been the interaction of bugs in GNU tbl(1) with an aspect of
   grotty(1)'s design.  Those bugs have been resolved.  A man(1) program
-  can still instruct groff to format for any desired line length.
+  can still instruct groff to format for any desired line length by
+  setting the `LL` register on {g,n,t}roff's command line.
 
 o The an (man) and doc (mdoc) macro packages now support a `BP` register
   to configure the ("base") paragraph inset amount; that is the amount

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


[groff] 01/11: ChangeLog: Indent entry with tab, not spaces.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 20432dc71d14c50f6d8e63b304e47fb9d8d92dc5
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 18:33:06 2024 -0600

ChangeLog: Indent entry with tab, not spaces.

...for consistency with the rest of the file (and ChangeLog.*).
---
 ChangeLog | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 47f02fb8a..f44b869f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,39 +1,39 @@
 2024-01-26  Deri James  
 
-Changes to satisfy Savannah #65231.
+   Changes to satisfy Savannah #65231.
 
-Alter build of groff-man-pages.pdf to use the new pdfmom,
-so that all forward references (i.e. reference to groff_font(5)
-in addftinfo(1) page) are handled properly. Also pass bookmark
-names as text strings.
+   Alter build of groff-man-pages.pdf to use the new pdfmom,
+   so that all forward references (i.e. reference to groff_font(5)
+   in addftinfo(1) page) are handled properly. Also pass bookmark
+   names as text strings.
 
-* doc/doc.am: Use pdfmom.
-* tmac/an.tmac: Pass parameters to .pdfbookmark as a string.
+   * doc/doc.am: Use pdfmom.
+   * tmac/an.tmac: Pass parameters to .pdfbookmark as a string.
 
-New pdfmom, can now be used with all macros.
+   New pdfmom, can now be used with all macros.
 
-Previously only useful for producing documents with
-mom.
+   Previously only useful for producing documents with
+   mom.
 
-* src/devices/gropdf/pdfmom.pl: New --roff flag allows
-other macros (e.g. -ms) to be given on the command line.
+   * src/devices/gropdf/pdfmom.pl: New --roff flag allows
+   other macros (e.g. -ms) to be given on the command line.
 
-* src/devices/gropdf/pdfmom.1.man: Document the new facility.
+   * src/devices/gropdf/pdfmom.1.man: Document the new facility.
 
-Front Cover for groff-man-pages.pdf
+   Front Cover for groff-man-pages.pdf
 
-Feel free to alter "artwork" at will (perhaps add maintainer
-information.
+   Feel free to alter "artwork" at will (perhaps add maintainer
+   information.
 
-* doc/GMPfront.t: Only used during build, not required as part
-of installation.
+   * doc/GMPfront.t: Only used during build, not required as part
+   of installation.
 
-Remove artifacts from using stringhex.
+   Remove artifacts from using stringhex.
 
-Introduced in commit #e62b188aacb, betraying its origin
-from my deri-gropdf-ng branch which uses .stringhex.
+   Introduced in commit #e62b188aacb, betraying its origin
+   from my deri-gropdf-ng branch which uses .stringhex.
 
-* src/devices/gropdf/gropdf.pl: minor fixes
+   * src/devices/gropdf/gropdf.pl: minor fixes
 
 2024-01-29  G. Branden Robinson 
 

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


[groff] 11/11: groff(7): Clarify wording.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit ac2582874b7bb314ee00a4e2fc7b13d77b8927c3
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 18:45:07 2024 -0600

groff(7): Clarify wording.
---
 man/groff.7.man | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/man/groff.7.man b/man/groff.7.man
index 930a8cd2d..7f188badb 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -2252,9 +2252,10 @@ or within
 and
 .esc } .
 .
-Escape sequences may generally be used freely in
-.I anything,
-except when it is read in copy mode.
+Escape sequences in
+.I anything
+are interpreted normally except where otherwise stated,
+as when read in copy mode.
 .
 Comments are ignored;
 trailing whitespace generally is not.

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


[groff] 04/11: [docs]: Fix missing word.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit ff555b1ebeab05a37a24c7ebf04b8c8cdb26aef7
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 18:34:56 2024 -0600

[docs]: Fix missing word.
---
 doc/groff.texi   | 22 +++---
 man/groff_diff.7.man |  2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 9dc0756f0..381ae8fc2 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -11294,17 +11294,17 @@ If @var{contents} is absent, an existing character 
definition made with
 the same request is deleted.
 
 Defining (or redefining) a character@var{c} creates an object in the
-formatter that is recognized like any other ordinary special character
-on input, and produces @var{contents} on output.  Every time @var{c} is
-to be output, @var{contents} is processed in a temporary environment and
-the result encapsulated in a node.@footnote{@xref{Gtroff Internals}.}
-A leading neutral double quote in the final argument is stripped from
-it, allowing embedded leading spaces in @var{contents}, which is read in
-copy mode and continues to the end of the input line.  Further,
-compatibility mode is disabled and the escape character set to @code{\}
-while @var{contents} is interpreted.  Any emboldening, constant spacing,
-or track kerning is applied to this object rather than to individual
-glyphs in @var{contents}.
+formatter that is recognized like any other ordinary or special
+character on input, and produces @var{contents} on output.  Every time
+@var{c} is to be output, @var{contents} is processed in a temporary
+environment and the result encapsulated in a node.@footnote{@xref{Gtroff
+Internals}.} A leading neutral double quote in the final argument is
+stripped from it, allowing embedded leading spaces in @var{contents},
+which is read in copy mode and continues to the end of the input line.
+Further, compatibility mode is disabled and the escape character set to
+@code{\} while @var{contents} is interpreted.  Any emboldening, constant
+spacing, or track kerning is applied to this object rather than to
+individual glyphs in @var{contents}.
 
 A character defined by these requests can be used just like a glyph
 provided by the output device.  In particular, other characters can be
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 22f4d8e0b..68dcb1172 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -1884,7 +1884,7 @@ Defining
 a
 .RI character\~ c
 creates an object in the formatter that is recognized like any other
-ordinary special character on input,
+ordinary or special character on input,
 and produces
 .I contents
 on output.

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


[groff] 02/11: ChangeLog: Fix wordo.

2024-01-30 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 9b3f3d8997414775fa1f5a84391f17b32b633b8b
Author: G. Branden Robinson 
AuthorDate: Tue Jan 30 18:35:51 2024 -0600

ChangeLog: Fix wordo.
---
 ChangeLog | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f44b869f9..03858992a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -112,7 +112,7 @@
* tmac/doc.tmac: Slightly refactor.  Make the
`an*is-output-html` and `doc-is-output-html` registers the
{nearly} sole determinant (within each package) of behavior
-   tailed for HTML output.  Annotate why we use each instead of
+   tailored for HTML output.  Annotate why we use each instead of
testing `.T` string.
 
* tmac/an.tmac (an*end-hyperlink, MR): Apply exceptions to the

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


PDF hyperlinks working in Evice and xpdf but not Okular

2024-01-30 Thread G. Branden Robinson
Thanks to Deri's recent pushes to the master branch in Git, we have PDF
hyperlinks in groff documents, including man(7) pages, and they're
beautiful.

However...I find that while the link text gets appropriately colored
when viewing gropdf(1)-generated PDFs in both Evince and Okular (which I
have handy), only in Evince do the links _work_.  I can click on them
and they do the right things.

xpdf also seems to work fine.

Does anyone know what's going on?  Is this an Okular bug, or some deeply
buried configuration knob in it that I need to twist?

Figured I'd ask here before I go hat-in-hand to KDE support channels,
with which I have no experience.

Regards,
Branden


signature.asc
Description: PGP signature


[bug #62933] [man] produce hyperlinks in PDF output

2024-01-30 Thread G. Branden Robinson
Update of bug#62933 (group groff):

  Depends on: => bugs #65215

___

Follow-up Comment #5:

Deri did 2/3rds of this in bug #65215.  Adding dependency.


___

Reply to this item at:

  

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




[bug #65215] [man] .MT/.ME and .UR/.UE should make hyperlinks in PDF

2024-01-30 Thread G. Branden Robinson
Update of bug#65215 (group groff):

 Summary: .MT/.ME and .UR/.UE should result in hyperlink for
pdf output => [man] .MT/.ME and .UR/.UE should make hyperlinks in PDF


___

Reply to this item at:

  

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




Re: [groff] 02/14: [man]: Warn on bad MT/ME/UR/UE nesting.

2024-01-30 Thread G. Branden Robinson
Hi Deri,

At 2024-01-30T14:51:36+, Deri wrote:
> On Tuesday, 30 January 2024 02:13:47 GMT G. Branden Robinson wrote:
> > [man]: Warn on bad MT/ME/UR/UE nesting.
> > 
> > * tmac/an.tmac (MT, ME, UR, UE): Throw warnings on bad nesting.
> 
> This causes a warning when viewing groff_out(5), because it has a
> nested .UR within a .TP.

I'm aware of it.  :)

> Seems to work, in this instance, but perhaps there is a better way.

The better way would be a resolution of Savannah #64134.[1]

You have have noticed that I've been giving fresh attention to how groff
man(7) handles the diversions it creates.

I've kept the "bad" page structure intact to make it really easy to tell
when I've solved the nested diversion problem.  My working copy has had
some "solutions", but they throw off line adjustment and look ugly.  I
think at this point it's simply a matter of whacking away at the problem
with careful attention to environmental issues.  I feel close.  If I get
unbearably stuck, I'll change the page to avoid the warnings.

Thank you for landing the changes that bring hyperlinks to life in
man(7) for PDF!  That was the immediate cause of me digging into the
aforementioned ticket.

Regards,
Branden

[1] https://savannah.gnu.org/bugs/index.php?61434


signature.asc
Description: PGP signature


Re: [groff] 02/14: [man]: Warn on bad MT/ME/UR/UE nesting.

2024-01-30 Thread G. Branden Robinson
Hi Deri,

At 2024-01-30T14:51:36+, Deri wrote:
> On Tuesday, 30 January 2024 02:13:47 GMT G. Branden Robinson wrote:
> > [man]: Warn on bad MT/ME/UR/UE nesting.
> > 
> > * tmac/an.tmac (MT, ME, UR, UE): Throw warnings on bad nesting.
> 
> This causes a warning when viewing groff_out(5), because it has a
> nested .UR within a .TP.

I'm aware of it.  :)

> Seems to work, in this instance, but perhaps there is a better way.

The better way would be a resolution of Savannah #64134.[1]

You have have noticed that I've been giving fresh attention to how groff
man(7) handles the diversions it creates.

I've kept the "bad" page structure intact to make it really easy to tell
when I've solved the nested diversion problem.  My working copy has had
some "solutions", but they throw off line adjustment and look ugly.  I
think at this point it's simply a matter of whacking away at the problem
with careful attention to environmental issues.  I feel close.  If I get
unbearably stuck, I'll change the page to avoid the warnings.

Thank you for landing the changes that bring hyperlinks to life in
man(7) for PDF!  That was the immediate cause of me digging into the
aforementioned ticket.

Regards,
Branden

[1] https://savannah.gnu.org/bugs/index.php?61434


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


[bug #64719] tmac/www.tmac.in: missing a word in a comment

2024-01-30 Thread G. Branden Robinson
Update of bug#64719 (group groff):

Category:   Macro man => Macro - others/general 


___

Reply to this item at:

  

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




[groff] 05/05: Update ChangeLog

2024-01-30 Thread Deri James
deri pushed a commit to branch master
in repository groff.

commit 3fe0a227e1533f8cc6ff56b890e70c79712a73de
Author: Deri James 
AuthorDate: Tue Jan 30 18:16:11 2024 +

Update ChangeLog
---
 ChangeLog | 37 +
 1 file changed, 37 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index b2fa75e5e..47f02fb8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2024-01-26  Deri James  
+
+Changes to satisfy Savannah #65231.
+
+Alter build of groff-man-pages.pdf to use the new pdfmom,
+so that all forward references (i.e. reference to groff_font(5)
+in addftinfo(1) page) are handled properly. Also pass bookmark
+names as text strings.
+
+* doc/doc.am: Use pdfmom.
+* tmac/an.tmac: Pass parameters to .pdfbookmark as a string.
+
+New pdfmom, can now be used with all macros.
+
+Previously only useful for producing documents with
+mom.
+
+* src/devices/gropdf/pdfmom.pl: New --roff flag allows
+other macros (e.g. -ms) to be given on the command line.
+
+* src/devices/gropdf/pdfmom.1.man: Document the new facility.
+
+Front Cover for groff-man-pages.pdf
+
+Feel free to alter "artwork" at will (perhaps add maintainer
+information.
+
+* doc/GMPfront.t: Only used during build, not required as part
+of installation.
+
+Remove artifacts from using stringhex.
+
+Introduced in commit #e62b188aacb, betraying its origin
+from my deri-gropdf-ng branch which uses .stringhex.
+
+* src/devices/gropdf/gropdf.pl: minor fixes
+
 2024-01-29  G. Branden Robinson 
 
[tbl]: Fix Savannah #65225.

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


[groff] 01/05: Front Cover for groff-man-pages.pdf

2024-01-30 Thread Deri James
deri pushed a commit to branch master
in repository groff.

commit f619fee72005fba6fc10e5dc22b3df4ffb1372de
Author: Deri James 
AuthorDate: Tue Jan 30 16:55:43 2024 +

Front Cover for groff-man-pages.pdf

Feel free to alter "artwork" at will (perhaps add maintainer
information.

* doc/GMPfront.t: Only used during build, not required as part
of installation.
---
 doc/GMPfront.t | 70 ++
 1 file changed, 70 insertions(+)

diff --git a/doc/GMPfront.t b/doc/GMPfront.t
new file mode 100644
index 0..5011266b9
--- /dev/null
+++ b/doc/GMPfront.t
@@ -0,0 +1,70 @@
+.ig
+   front.t
+..
+.nr PDFOUTLINE.FOLDLEVEL 1
+.defcolor pdf:href.colour rgb 0.00 0.25 0.75
+.pdfinfo /Title "The Groff Manpage Book"
+.de an*cln
+.  ds \\$1
+.  als an*cln:res \\$1
+.  shift
+.  ds an*cln:res \\$*\"
+.  ds an*cln:chr \\$*
+.  substring an*cln:chr 0 0
+.  if '\%'\\*[an*cln:chr]' \{\
+.substring an*cln:res 1
+.  \}
+..
+.
+.de END
+..
+.
+.am reload-man END
+.de an*bookmark
+.  if '*[.T]'pdf' \{\
+.ie ($1=1) \{\
+.   an*cln an*page-ref-nm $2\"
+.   pdfbookmark -T "*[an*page-ref-nm]" $1 $2
+.\}
+.el .pdfbookmark $1 $2
+.  \}
+..
+.
+.de1 MR
+.  if ((n[.$] < 2) : (n[.$] > 3)) \
+.an-style-warn .$0 expects 2 or 3 arguments, got n[.$]
+.  if '*[.T]'pdf' \{\
+.ie n(.$=1 \
+.  I $1
+.el \{\
+.  an*cln an*page-ref-nm $1($2)
+.  ie d pdf:look(*[an*page-ref-nm]) .pdfhref L -D 
*[an*page-ref-nm] -A "$3" -- \fI$1\fP($2)
+.  el .IR $1 ($2)$3
+.\}
+.  \}
+.  hy n[an*hyphenation-mode]
+..
+.END
+.
+.de Hl
+.br
+\l'\\n[.l]u-\\n[.i]u\&\\$1'
+.br
+..
+\Z@\D't 8p'@
+.pdfbookmark 1 Cover
+.pdfpagenumbering
+.sp 2i
+.Hl
+.sp .6i
+.ad r
+.ps 52
+\m[maroon]Groff\m[]
+.sp 18p
+.ps 16
+\f[BMB]THE MAN PAGES BOOK\fP
+.sp .2i
+.Hl
+.pn 1
+.bp
+.pdfpagenumbering D . 1

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


[groff] 04/05: Remove artifacts from using stringhex.

2024-01-30 Thread Deri James
deri pushed a commit to branch master
in repository groff.

commit 9b8b3e2a508d7df0b661c9042b5f5d5e7a0688da
Author: Deri James 
AuthorDate: Tue Jan 30 18:02:13 2024 +

Remove artifacts from using stringhex.

Introduced in commit #e62b188aacb, betraying its origin
from my deri-gropdf-ng branch which uses .stringhex.

* src/devices/gropdf/gropdf.pl: minor fixes
---
 src/devices/gropdf/gropdf.pl | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index f0b04909a..f7fc229cd 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -2063,10 +2063,9 @@ sub UTFName
 
 $s=substr($s,1);
 my $s1=$s;
-$s1=~s/([[:xdigit:]]{2})/chr(hex($1))/eg;
 my $s2=utf16($s1,1);
 #return "/".MakeLabel((substr($s2,0,1) eq '/')?$s:$s2);
-my $s3='/'.join '', map { MakeLabel($_) } unpack('C*',(substr($s2,0,1) eq 
'\\')?$s:$s2);
+my $s3='/'.join '', map { MakeLabel($_) } unpack('C*',$s2);
 return $s3;
 
 }
@@ -2854,7 +2853,7 @@ sub ParsePDFValue
return(ParsePDFArray($pdfwds));
 }
 
-if ($wd=~m/(.*?)(\(.*)$/)
+if ($wd=~m/(.*?)(\(.*)$/ and substr($wd,0,1) ne '/')
 {
if (defined($1) and length($1))
{

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


[groff] 02/05: New pdfmom, can now be used with all macros.

2024-01-30 Thread Deri James
deri pushed a commit to branch master
in repository groff.

commit df1d447c99b984f9fd82f46cfc2becb2475b6d6e
Author: Deri James 
AuthorDate: Tue Jan 30 17:05:00 2024 +

New pdfmom, can now be used with all macros.

Previously only useful for producing documents with
mom.

* src/devices/gropdf/pdfmom.pl: New --roff flag allows
other macros (e.g. -ms) to be given on the command line.

* src/devices/gropdf/pdfmom.1.man: Document the new facility.
---
 src/devices/gropdf/pdfmom.1.man | 27 +++-
 src/devices/gropdf/pdfmom.pl| 56 +
 2 files changed, 72 insertions(+), 11 deletions(-)

diff --git a/src/devices/gropdf/pdfmom.1.man b/src/devices/gropdf/pdfmom.1.man
index 8d60047ba..77397fded 100644
--- a/src/devices/gropdf/pdfmom.1.man
+++ b/src/devices/gropdf/pdfmom.1.man
@@ -10,7 +10,7 @@ macro package for
 .\" Legal Terms
 .\" 
 .\"
-.\" Copyright (C) 2012-2020 Free Software Foundation, Inc.
+.\" Copyright (C) 2012-2023 Free Software Foundation, Inc.
 .\"
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
@@ -53,6 +53,7 @@ macro package for
 .\" 
 .
 .SY pdfmom
+.RB [ \-\-roff ]
 .RB [ \-Tpdf ]
 .RI [ groff-options ]
 .RI [ file\~ .\|.\|.]
@@ -60,6 +61,7 @@ macro package for
 .
 .
 .SY pdfmom
+.RB [ \-\-roff ]
 .B \-Tps
 .RI [ pdfroff-options ]
 .RI [ groff-options ]
@@ -89,6 +91,25 @@ macros.
 .
 .
 .P
+If the
+.B \-\-roff
+option is used,
+the wrapper can be used with macro packages other than
+.MR groff_mom @MAN7EXT@ .
+.
+This is also true if the wrapper is renamed or linked as a
+pseudonym;
+for example,
+creating a
+.I pdfms
+link pointing to the
+.I pdfmom
+executable makes a wrapper for producing PDFs with the
+.I ms
+package.
+.
+.
+.P
 .I pdfmom
 prints to the standard output,
 so output must usually be redirected to a destination file.
@@ -173,6 +194,10 @@ options,
 .I pdfmom
 displays its version information and exits.
 .
+Using the
+.B \-\-help
+option displays a usage message and exits.
+.
 .
 .\" 
 .SH Authors
diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl
index 89977d496..1c24d85b9 100644
--- a/src/devices/gropdf/pdfmom.pl
+++ b/src/devices/gropdf/pdfmom.pl
@@ -1,6 +1,6 @@
 #!@PERL@
 #
-#  pdfmom  : Frontend to run groff -mom to produce PDFs
+#  pdfmom  : Frontend to run groff to produce PDFs
 #  Deri James  : Friday 16 Mar 2012
 #
 
@@ -29,6 +29,20 @@ my @cmd;
 my $dev='pdf';
 my $preconv='';
 my $readstdin=1;
+my $mom='-mom';
+my $zflg='';
+if ($0=~m/pdf(\w+)$/)
+{
+my $m=$1;
+if ($m=~m/^(mom|mm|ms|me|man|mandoc)$/)
+{
+$mom="-".$m;
+}
+else
+{
+$mom='';
+}
+}
 my $RT_SEP='@RT_SEP@';
 
 $ENV{PATH}=$ENV{GROFF_BIN_PATH}.$RT_SEP.$ENV{PATH} if 
exists($ENV{GROFF_BIN_PATH});
@@ -68,11 +82,30 @@ while (my $c=shift)
$preconv=$c;
next;
 }
-elsif ($c eq '-z' or $c eq '-Z')
+elsif ($c eq '-Z')
 {
-   $dev=$c;
+   $zflg=$c;
next;
 }
+elsif ($c eq '-z')
+{
+   $zflg="$c -dPDF.EXPORT=1";
+   next;
+}
+elsif ($c eq '--roff')
+{
+$mom='';
+}
+elsif ($c eq '--help')
+{
+   print "usage: pdfmom [--roff] [-Tpdf] [groff-option ...] [file ...]\n";
+   print "usage: pdfmom [--roff] -Tps [pdfroff-option ...] [groff-option 
...] [file ...]\n";
+   print "usage: pdfmom {-v | --version}\n";
+   print "usage: pdfmom --help\n";
+   print "\nHandle forward references in PDF documents.\n" .
+ "See the pdfmom(1) manual page.\n";
+   exit;
+}
 elsif ($c eq '-v' or $c eq '--version')
 {
print "GNU pdfmom (groff) version @VERSION@\n";
@@ -123,19 +156,22 @@ if ($readstdin)
 
 if ($dev eq 'pdf')
 {
-system("groff -Tpdf -dLABEL.REFS=1 -mom -z $cmdstring 2>&1 | LC_ALL=C grep 
'^\\. *ds' | groff -Tpdf -dPDF.EXPORT=1 -dLABEL.REFS=1 -mom -z - $cmdstring 
2>&1 | LC_ALL=C grep '^\\. *ds' | groff -Tpdf -mom $preconv - $cmdstring");
+if ($mom)
+{
+system("groff -Tpdf -dLABEL.REFS=1 $mom -z $cmdstring 2>&1 | LC_ALL=C 
grep '^\\. *ds' | groff -Tpdf -dPDF.EXPORT=1 -dLABEL.REFS=1 $mom -z - 
$cmdstring 2>&1 | LC_ALL=C grep '^\\. *ds' | groff -Tpdf $mom $preconv - 
$cmdstring $zflg");
+}
+else
+{
+system("groff -Tpdf -dPDF.EXPORT=1 -z $cmdstring 2>&1 | LC_ALL=C grep 
'^\\. *ds' | groff -Tpdf $preconv - $cmdstring $zflg");
+}
 }
 elsif ($dev eq 'ps')
 {
-system("groff -Tpdf -dLABEL.REFS=1 -mom -z $cmdstring 2>&1 | LC_ALL=C grep 
'^\\. *ds' | pdfroff -mpdfmark -mom --no-toc - $preconv $cmdstring");
+system("groff -Tpdf -dLABEL.REFS=1 $mom -z 

[groff] 03/05: Changes to satisfy bug #65231.

2024-01-30 Thread Deri James
deri pushed a commit to branch master
in repository groff.

commit 3e5f09d1b3a9df072cd2a67b648925049a655e82
Author: Deri James 
AuthorDate: Tue Jan 30 17:14:08 2024 +

Changes to satisfy bug #65231.

Alter build of groff-man-pages.pdf to use the new pdfmom,
so that all forward references (i.e. reference to groff_font(5)
in addftinfo(1) page) are handled properly. Also pass bookmark
names as text strings.

* doc/doc.am: Use pdfmom.
* tmac/an.tmac: Pass parameters to .pdfbookmark as a string.
---
 doc/doc.am   | 8 +++-
 tmac/an.tmac | 6 +++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/doc/doc.am b/doc/doc.am
index 76efe43b0..e9cac80cc 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -38,6 +38,11 @@ DOC_GROFF = \
   GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
   $(GROFFBIN) -M $(doc_srcdir) $(MFLAG) $(FFLAG) -ww -b
 
+DOC_PDFMOM = \
+  GROFF_COMMAND_PREFIX= \
+  GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+  $(GROFF_BIN_PATH)/pdfmom -M $(doc_srcdir) $(MFLAG) $(FFLAG) -ww -b --roff
+
 # This image file is used by several documents in the groff source tree.
 DOC_GNU_EPS = doc/gnu.eps
 
@@ -263,8 +268,9 @@ man-clean:
 # feature of gropdf.
 doc/groff-man-pages.pdf: $(GROFF_MAN_PAGES_ALL) eqn pic tbl \
   $(TMAC_PACKAGE_MAN) $(TMAC_PACKAGE_MDOC) font/devps/freeeuro.pfa
-   $(GROFF_V)$(DOC_GROFF) -pet -mandoc -dHF=HB -rC1 \
+   $(GROFF_V)$(DOC_PDFMOM) -pet -mandoc -dHF=HB -rC1 \
  -rCHECKSTYLE=3 -Tpdf -P-e \
+ $(top_srcdir)/doc/GMPfront.t \
  $(GROFF_MAN_PAGES1) \
  $(tmac_srcdir)/sv.tmac $(GROFF_MAN_PAGES2) \
  $(tmac_srcdir)/en.tmac $(GROFF_MAN_PAGES3) > $@
diff --git a/tmac/an.tmac b/tmac/an.tmac
index dceed923b..20d96ff70 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -437,7 +437,7 @@
 .  ie \\n[cR] .pl +1v
 .  el .sp (.5i - .5m)
 .  if !\\n[an*was-TH-bookmark-emitted] \{\
-.an*bookmark 1 \E*[an*page-ref-string]
+.an*bookmark 1 "\\*[an*page-ref-string]"
 .nr an*was-TH-bookmark-emitted 1
 .  \}
 .  tl '\\*[an-pageref]'\\*[an-extra3]'\\*[an-pageref]'
@@ -716,7 +716,7 @@ contains unsupported escape sequence
 .  if \\n[.$] \{\
 .ds an-section-heading \\$*\"
 .if \\n[CS] .stringup an-section-heading
-.an*bookmark 2 \E*[an-section-heading]
+.an*bookmark 2 "\\*[an-section-heading]"
 .nop \&\\*[an-section-heading]
 .  \}
 .  if \\n[an-remap-I-style-in-headings] .ftr I I
@@ -742,7 +742,7 @@ contains unsupported escape sequence
 .  if \\n[an-remap-I-style-in-headings] .ftr I \\*[an-heading-family]BI
 .  if \\n[.$] \{\
 .ds an*subsection-heading \\$*\"
-.an*bookmark 3 \E*[an*subsection-heading]
+.an*bookmark 3 "\\*[an*subsection-heading]"
 .nop \&\\$*
 .  \}
 .  if \\n[an-remap-I-style-in-headings] .ftr I I

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


[bug #65231] Improve our groff-man-pages.pdf

2024-01-30 Thread Deri James
URL:
  

 Summary: Improve our groff-man-pages.pdf 
   Group: GNU roff
   Submitter: deri
   Submitted: Tue 30 Jan 2024 04:54:29 PM UTC
Category: General
Severity: 1 - Wish
  Item Group: Build/Installation
  Status: In Progress
 Privacy: Public
 Assigned to: deri
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None


___

Follow-up Comments:


---
Date: Tue 30 Jan 2024 04:54:29 PM UTC By: Deri James 
To bring it more into line with the LinuxManBook.pdf add clickable links to
navigate between separate man entries in the volume, and add a front cover.
Also introduce the new pdfmom which can now work with all other macros, not
just mom, it's been waiting in the wings since the code freeze last year. It
also requires 3 lines change in an.tmac.







___

Reply to this item at:

  

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




Re: [groff] 02/14: [man]: Warn on bad MT/ME/UR/UE nesting.

2024-01-30 Thread Deri
On Tuesday, 30 January 2024 02:13:47 GMT G. Branden Robinson wrote:
> [man]: Warn on bad MT/ME/UR/UE nesting.
> 
> * tmac/an.tmac (MT, ME, UR, UE): Throw warnings on bad nesting.

This causes a warning when viewing groff_out(5), because it has a nested .UR 
within a .TP. Replacing:-

.TP
.UR https://\:github.com/\:Alhadis/\:Roff\:.js/
.I Roff.js
.UE
is a viewer for intermediate output written in JavaScript.

With this:-

.P
.UR https://\:github.com/\:Alhadis/\:Roff\:.js/
.I Roff.js
.UE
.TP
\&
\v'-1.4v'is a viewer for intermediate output written in JavaScript.

Seems to work, in this instance, but perhaps there is a better way.

Cheers 

Deri






Re: [groff] 02/14: [man]: Warn on bad MT/ME/UR/UE nesting.

2024-01-30 Thread Deri
On Tuesday, 30 January 2024 02:13:47 GMT G. Branden Robinson wrote:
> [man]: Warn on bad MT/ME/UR/UE nesting.
> 
> * tmac/an.tmac (MT, ME, UR, UE): Throw warnings on bad nesting.

This causes a warning when viewing groff_out(5), because it has a nested .UR 
within a .TP. Replacing:-

.TP
.UR https://\:github.com/\:Alhadis/\:Roff\:.js/
.I Roff.js
.UE
is a viewer for intermediate output written in JavaScript.

With this:-

.P
.UR https://\:github.com/\:Alhadis/\:Roff\:.js/
.I Roff.js
.UE
.TP
\&
\v'-1.4v'is a viewer for intermediate output written in JavaScript.

Seems to work, in this instance, but perhaps there is a better way.

Cheers 

Deri




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