• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Reference Documentation: PDF Publishing with GNU Troff


Commit MetaInfo

修訂19f3178f85992ff8dcf0f32fb55d95b700f5f82d (tree)
時間2022-02-12 06:02:01
作者Keith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Add support for custom location keyword interpretation.

* pdfmark.tmac (pdf*href.format): Generalize keyword interpreter.
(pdf*href-K): New internal macro; it implements the interpreter for
"pdfhref K ..." macro calls; use it to map location keywords to...
(PDFHREF.FILEREF, PDFHREF.PAGEREF, PDFHREF.SECTREF): ...these; thus...
(pdf*href.format.file, pdf*href.format.page, pdf*href.format.section):
...these become redundant; delete them.

* pdfmark.ms (pdfhref K): Document it; add keeps, to avoid potential
widow lines in following paragraphs.

Change Summary

差異

diff -r 81770f396af0 -r 19f3178f8599 pdfmark.ms
--- a/pdfmark.ms Fri Dec 31 19:19:09 2021 +0000
+++ b/pdfmark.ms Fri Feb 11 21:02:01 2022 +0000
@@ -1389,6 +1389,13 @@
13891389 .CW pdfhref ,
13901390 when formatting the text in the active region of a link,
13911391 .XR set-format ). (
1392+.IP \*[= K]
1393+Define one or more location keywords,
1394+and associated \%format\(hystring names,
1395+which should be interpreted by the
1396+.CW pdfhref
1397+reference text formatting routine,
1398+.XR custom-format ). (
13921399 .IP \*[= Z]
13931400 Define the absolute position on the physical PDF output page,
13941401 where the \%\(lqhot\(hyspot\(rq associated with an active link is to be placed.
diff -r 81770f396af0 -r 19f3178f8599 tmac/pdfmark.tmac
--- a/tmac/pdfmark.tmac Fri Dec 31 19:19:09 2021 +0000
+++ b/tmac/pdfmark.tmac Fri Feb 11 21:02:01 2022 +0000
@@ -1240,6 +1240,26 @@
12401240 .ds PDFHREF.SECTREF section \\$1,
12411241 .ds PDFHREF.FILEREF \\$1
12421242 .\"
1243+.de pdf*href-K
1244+.\" -----------------------------------------------------------------
1245+.\" Usage:
1246+.\" .pdfhref K keyword format-name [keyword format-name] ...
1247+.\" -----------------------------------------------------------------
1248+.\" Map a format string name to an arbitrary keyword, which may be
1249+.\" interpreted by the pdf*href.format macro, (or any alternative,
1250+.\" which may have been designated by the user).
1251+.\"
1252+.while \\n(.$>1 \{\
1253+. ds pdf*href.format.\\$1 \\$2
1254+. shift 2
1255+. \}
1256+..
1257+.\" Use it, to map the standard reference mark location keywords.
1258+.\"
1259+.pdfhref K file PDFHREF.FILEREF
1260+.pdfhref K section PDFHREF.SECTREF
1261+.pdfhref K page PDFHREF.PAGEREF
1262+.\"
12431263 .de pdf*href.format
12441264 .\" -----------------------------------------------------------------
12451265 .\" Usage: (to be called ONLY by "pdfhref")
@@ -1261,7 +1281,7 @@
12611281 .\"
12621282 .ds PDFHREF.TEXT \\*[PDFHREF.PREFIX]
12631283 .while d\\$0.\\$1 \{\
1264-. \\$0.\\$1 "\\$2"
1284+. as PDFHREF.TEXT " \\*[\\*[\\$0.\\$1] "\\$2"]\"
12651285 . shift 2
12661286 . \}
12671287 .\"
@@ -1281,34 +1301,6 @@
12811301 .\"
12821302 .ds PDFHREF.TEXT \\*[PDFHREF.TEXT]
12831303 ..
1284-.de pdf*href.format.file
1285-.\" ----------------------------------------------------------------------
1286-.\" Include a file identifier in a formatted reference.
1287-.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the
1288-.\" reference data includes an initial file identifier tuple.
1289-.\" ----------------------------------------------------------------------
1290-.\"
1291-.as PDFHREF.TEXT " \\*[PDFHREF.FILEREF]
1292-..
1293-.de pdf*href.format.page
1294-.\" ----------------------------------------------------------------------
1295-.\" Include a page number in a formatted reference.
1296-.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the
1297-.\" reference data includes an initial page number tuple.
1298-.\" ----------------------------------------------------------------------
1299-.\"
1300-.as PDFHREF.TEXT " \\*[PDFHREF.PAGEREF]
1301-..
1302-.de pdf*href.format.section
1303-.\" ----------------------------------------------------------------------
1304-.\" Include a section number in a formatted reference.
1305-.\" This is invoked ONLY by "pdf*href.format", and ONLY IF the
1306-.\" reference data includes an initial section number tuple.
1307-.\" ----------------------------------------------------------------------
1308-.\"
1309-.as PDFHREF.TEXT " \\*[PDFHREF.SECTREF]
1310-..
1311-.\"
13121304 .\" Make "pdf*href.format" the default cross reference formatter
13131305 .\"
13141306 .als pdf*href.default pdf*href.format