[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/43] man/curs_{termcap,variables}.3x: Define and use `UR`, `UE`
From: |
G. Branden Robinson |
Subject: |
[PATCH 11/43] man/curs_{termcap,variables}.3x: Define and use `UR`, `UE` macros for hyperlink support. |
Date: |
Mon, 9 Sep 2024 09:14:50 -0500 |
These are copied from groff's "an-ext.tmac" file, which permissively
licenses them. This API has been stable since February 2007, released
in groff 1.20 (January 2009).
See <https://git.savannah.gnu.org/cgit/groff.git/tree/tmac/an-ext.tmac>.
---
man/curs_termcap.3x | 48 ++++++++++++++++++++++++++++++++++++++++-
man/curs_variables.3x | 50 +++++++++++++++++++++++++++++++++++++++++--
2 files changed, 95 insertions(+), 3 deletions(-)
diff --git a/man/curs_termcap.3x b/man/curs_termcap.3x
index 84607888c..fad0b219b 100644
--- a/man/curs_termcap.3x
+++ b/man/curs_termcap.3x
@@ -45,6 +45,51 @@
.el .IP \(bu 2
..
.
+.\" URL hyperlink support macros from groff's "an-ext.tmac"
+.
+.\" Save the automatic hyphenation mode.
+.\"
+.\" In AT&T troff, there was no register exposing the hyphenation mode,
+.\" and no way to save and restore it. Set `mH` to a reasonable value
+.\" for your implementation and preference.
+.de mY
+. ie !\\n(.g \
+. nr mH 14
+. el \
+. do nr mH \\n[.hy] \" groff extension register
+..
+.
+.\" Prepare link text for mail/web hyperlinks. `MT` and `UR` call this.
+.de mV
+. ds mU \\$1\"
+..
+.
+.\" Emit hyperlink. The optional argument supplies trailing punctuation
+.\" after link text. `ME` and `UE` call this.
+.de mQ
+. mY
+. nh
+<\\*(mU>\\$1
+. hy \\n(mH
+. rm mU
+..
+.
+.\" Start URL.
+.\" .UR url
+.if !\n(.g \{\
+.de UR
+. mV \\$1
+..
+.\}
+.
+.\" End URL.
+.\" .UE [punctuation]
+.if !\n(.g \{\
+.de UE
+. mQ \\$1
+..
+.\}
+.
.SH NAME
\fB\%PC\fP,
\fB\%UP\fP,
@@ -540,7 +585,8 @@ .SH BUGS
.SH "SEE ALSO"
.\" This URL has no link text and is less than 65n wide, so we do not
.\" use a `:` string as man/curs_variables.3x does.
-https://invisible\-island.net/ncurses/tctest.html
+.UR https://invisible\-island.net/ncurses/tctest.html
+.UE
.PP
\fB\%curses\fP(3X),
\fB\%curs_terminfo\fP(3X),
diff --git a/man/curs_variables.3x b/man/curs_variables.3x
index f25fae445..5e6506c26 100644
--- a/man/curs_variables.3x
+++ b/man/curs_variables.3x
@@ -48,6 +48,51 @@
.el .IP \(bu 2
..
.
+.\" URL hyperlink support macros from groff's "an-ext.tmac"
+.
+.\" Save the automatic hyphenation mode.
+.\"
+.\" In AT&T troff, there was no register exposing the hyphenation mode,
+.\" and no way to save and restore it. Set `mH` to a reasonable value
+.\" for your implementation and preference.
+.de mY
+. ie !\\n(.g \
+. nr mH 14
+. el \
+. do nr mH \\n[.hy] \" groff extension register
+..
+.
+.\" Prepare link text for mail/web hyperlinks. `MT` and `UR` call this.
+.de mV
+. ds mU \\$1\"
+..
+.
+.\" Emit hyperlink. The optional argument supplies trailing punctuation
+.\" after link text. `ME` and `UE` call this.
+.de mQ
+. mY
+. nh
+<\\*(mU>\\$1
+. hy \\n(mH
+. rm mU
+..
+.
+.\" Start URL.
+.\" .UR url
+.if !\n(.g \{\
+.de UR
+. mV \\$1
+..
+.\}
+.
+.\" End URL.
+.\" .UE [punctuation]
+.if !\n(.g \{\
+.de UE
+. mQ \\$1
+..
+.\}
+.
.SH NAME
\fI\%bool\fP,
\fI\%chtype\fP,
@@ -316,9 +361,10 @@ .SH PORTABILITY
most users have decided either to override the value,
or to rely upon its default.
.SH SEE ALSO
+.UR https://\*:unicode\*:.org/\*:reports/\*:tr29/
[UAX #29] \*(``Unicode Standard Annex #29: Unicode Text
-Segmentation\*('';
-\%<https://\*:unicode\*:.org/\*:reports/\*:tr29/>
+Segmentation\*(''
+.UE
.PP
\fB\%curses\fP(3X),
\fB\%curs_color\fP(3X),
--
2.30.2
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 11/43] man/curs_{termcap,variables}.3x: Define and use `UR`, `UE` macros for hyperlink support.,
G. Branden Robinson <=