[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: Factor a further unnecessary macro out of spdf.tmac
From: |
Keith Marshall |
Subject: |
[groff] 01/01: Factor a further unnecessary macro out of spdf.tmac |
Date: |
Sat, 18 Sep 2021 06:13:06 -0400 (EDT) |
keithmarshall pushed a commit to branch master
in repository groff.
commit aa632dceaa8f64149be87c8ac31a5f4a6f5d1b0d
Author: Keith Marshall <keith.d.marshall@ntlworld.com>
AuthorDate: Sat Sep 18 11:11:52 2021 +0100
Factor a further unnecessary macro out of spdf.tmac
* spdf.tmac (XR): Remove it; relocate it to...
* pdfmark.ms (XR): ...here.
---
contrib/pdfmark/ChangeLog | 7 +++++++
contrib/pdfmark/pdfmark.ms | 26 ++++++++++++++++++++++++++
contrib/pdfmark/spdf.tmac | 23 -----------------------
3 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/contrib/pdfmark/ChangeLog b/contrib/pdfmark/ChangeLog
index 8728b6c..7f82a01 100644
--- a/contrib/pdfmark/ChangeLog
+++ b/contrib/pdfmark/ChangeLog
@@ -1,3 +1,10 @@
+2021-09-18 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ Factor a further unnecessary macro out of spdf.tmac
+
+ * spdf.tmac (XR): Remove it; relocate it to...
+ * pdfmark.ms (XR): ...here.
+
2021-09-13 Keith Marshall <keith.d.marshall@ntlworld.com>
Add comments to annotate locally-defined font change macros.
diff --git a/contrib/pdfmark/pdfmark.ms b/contrib/pdfmark/pdfmark.ms
index a930fc7..b686f7c 100644
--- a/contrib/pdfmark/pdfmark.ms
+++ b/contrib/pdfmark/pdfmark.ms
@@ -119,6 +119,32 @@ Publishing with GNU Troff
.\"
.ds = \f(CB\\$1\f(CR\\$4\f[CBI]\\$2\f(CR\\$3
.
+.\" Additionally, add a cross-reference convenience macro, emulating
+.\" the style of the "ms" font change macros...
+.\"
+.\" .XR <dest-name> [<affixed> [<prefix>]]
+.\"
+.\" ...such that, when invoked with one, two, or three arguments, this
+.\" expands to the equivalent of:
+.\"
+.\" .pdfhref L -D <dest-name> [-A <affixed> [-P <prefix>]]
+.\"
+.\" to place a pdfhref reference link, to a named destination, within
+.\" the same document, using the reference text which is predefined in
+.\" the reference dictionary entry associated with the destination.
+.\"
+.de XR
+.if \\n(.$ \{\
+. if \\n[OPMODE] \{\
+. ds xr!argv -D "\\$1"
+. if \\n(.$>1 .as xr!argv " -A "\\$2"
+. if \\n(.$>2 .as xr!argv " -P "\\$3"
+. pdfhref L \\*[xr!argv]
+. rm xr!argv
+. \}
+. \}
+..
+.
.NH 1
.\" Conventionally, in "ms", NH precedes text which is to be set as a
.\" numbered section heading, but it makes no provision for automatic
diff --git a/contrib/pdfmark/spdf.tmac b/contrib/pdfmark/spdf.tmac
index 454802b..c590498 100644
--- a/contrib/pdfmark/spdf.tmac
+++ b/contrib/pdfmark/spdf.tmac
@@ -84,29 +84,6 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
. if !'\\*[omit@section]'\\$1' .@error \\$2 without \\$1
. rm omit@section
..
-.\" .XR <dest-name> [<affixed> [<prefix>]]
-.\"
-.\" A convenience shorthand macro, emulating the semantics of the "ms"
-.\" font change macros, when invoked with one, two, or three arguments;
-.\" it expands to the equivalent of:
-.\"
-.\" .pdfhref L -D <dest-name> [-A <affixed> [-P <prefix>]]
-.\"
-.\" to place a pdfhref reference link, to a named destination, within
-.\" the same document, using the reference text which is predefined in
-.\" the reference dictionary entry associated with the destination.
-.\"
-.de XR \" FIXME: suggest document-local implementation
-.if \\n(.$ \{\
-. if \\n[OPMODE] \{\
-. ds xr!argv -D "\\$1"
-. if \\n(.$>1 .as xr!argv " -A "\\$2"
-. if \\n(.$>2 .as xr!argv " -P "\\$3"
-. pdfhref L \\*[xr!argv]
-. rm xr!argv
-. \}
-. \}
-..
.
.\" Document Outlines, and Section Headings
.\" =======================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: Factor a further unnecessary macro out of spdf.tmac,
Keith Marshall <=