Reference Documentation: PDF Publishing with GNU Troff
修訂 | 852dc6c1c5eb2e7adf5507cd0498225f1ef2d2ee (tree) |
---|---|
時間 | 2022-03-30 21:05:29 |
作者 | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Avoid keeps for widow and orphan line control.
* pdfmark.ms (KS, KE): Avoid using these for widow and orphan line
control; in particular do not include any section heading within such
a construct, as it may result in incorrect page numbering within the
generated table of contents; instead, use "ne" requests, with...
(\n[PD]u): ...this form for paragraph distance references used
consistently, in preference to...
(\n(PDu): ...this.
@@ -510,7 +510,7 @@ | ||
510 | 510 | to help identify appropriate markup examples for implementing PDF features, |
511 | 511 | such as:\(en |
512 | 512 | .QS |
513 | -.sp -\n(PDu | |
513 | +.sp -\n[PD]u | |
514 | 514 | .IP \(bu |
515 | 515 | Selecting a default document view, which defines how the document will appear |
516 | 516 | when opened in the reader application; for example, when this document is |
@@ -535,7 +535,7 @@ | ||
535 | 535 | Adding annotations, in the form of \(lqsticky notes\(rq, at strategic |
536 | 536 | points within the PDF document. |
537 | 537 | .QE |
538 | -.sp -\n(PDu | |
538 | +.sp -\n[PD]u | |
539 | 539 | .LP |
540 | 540 | All of the techniques described have been tested on |
541 | 541 | .EM both |
@@ -1116,7 +1116,7 @@ | ||
1116 | 1116 | .CW PDFHREF.VIEW.LEADING , |
1117 | 1117 | which determine the effective view specification as follows:\(en |
1118 | 1118 | .QS |
1119 | -.sp -\n(PDu | |
1119 | +.sp -\n[PD]u | |
1120 | 1120 | .IP \*[= PDFBOOKMARK.VIEW] |
1121 | 1121 | Establishes the magnification at which the document will be viewed, |
1122 | 1122 | at the location of the \(lqbookmark\(rq; by default, it is defined by |
@@ -1260,7 +1260,7 @@ | ||
1260 | 1260 | 'ne 5 |
1261 | 1261 | For example, the setting used in this document: |
1262 | 1262 | .QS |
1263 | -.sp -\n(PDu | |
1263 | +.sp -\n[PD]u | |
1264 | 1264 | .LD |
1265 | 1265 | .fam C |
1266 | 1266 | \&.\e" Initialize the outline view to show only three heading levels, |
@@ -1268,9 +1268,9 @@ | ||
1268 | 1268 | \&.\e" |
1269 | 1269 | \&.nr PDFOUTLINE.FOLDLEVEL 3 |
1270 | 1270 | .DE |
1271 | -.sp -\n(PDu | |
1271 | +.sp -\n[PD]u | |
1272 | 1272 | .QE |
1273 | -.sp -\n(PDu | |
1273 | +.sp -\n[PD]u | |
1274 | 1274 | .LP |
1275 | 1275 | results in only the first three levels of headings being displayed |
1276 | 1276 | in the document outline, |
@@ -1463,7 +1463,7 @@ | ||
1463 | 1463 | which defines the specific reference operation to be performed, |
1464 | 1464 | and may be selected from:\(en |
1465 | 1465 | .QS |
1466 | -.sp -\n(PDu | |
1466 | +.sp -\n[PD]u | |
1467 | 1467 | .IP \*[= O] |
1468 | 1468 | Add an entry to the document outline. |
1469 | 1469 | This operation has been described earlier, |
@@ -1599,7 +1599,7 @@ | ||
1599 | 1599 | .CW pdfhref |
1600 | 1600 | macro, are:\(en |
1601 | 1601 | .QS |
1602 | -.sp -\n(PDu | |
1602 | +.sp -\n[PD]u | |
1603 | 1603 | .IP \*[= -N\0 name > <] |
1604 | 1604 | Allows the |
1605 | 1605 | .CWI name > < |
@@ -1690,9 +1690,9 @@ | ||
1690 | 1690 | .EM without |
1691 | 1691 | this option, the link destination is assumed to be defined |
1692 | 1692 | within the same document. |
1693 | -.KS | |
1694 | -.sp -\n(PDu | |
1693 | +. | |
1695 | 1694 | .IP \*[= -P\0 \(dqprefix\(hytext\(dq > <] |
1695 | +'ne 4v | |
1696 | 1696 | Specifies |
1697 | 1697 | .CWI \(dqprefix\(hytext\(dq > \%< |
1698 | 1698 | to be attached to the |
@@ -1706,10 +1706,9 @@ | ||
1706 | 1706 | .CWB W \& \& \(rq \(lq |
1707 | 1707 | .CW pdfhref |
1708 | 1708 | operators. |
1709 | -.KE | |
1710 | -.KS | |
1711 | -.sp -\n(PDu | |
1709 | +. | |
1712 | 1710 | .IP |
1711 | +'ne 3v | |
1713 | 1712 | Typically, this option would be used to insert punctuation before |
1714 | 1713 | the link \%\(lqhot\(hyspot\(rq. |
1715 | 1714 | Thus, there is little reason for the inclusion of spaces in |
@@ -1717,10 +1716,9 @@ | ||
1717 | 1716 | however, if such space is required, then the enclosing double quotes |
1718 | 1717 | .EM must |
1719 | 1718 | be specified, as indicated. |
1720 | -.KE | |
1721 | -.KS | |
1722 | -.sp -\n(PDu | |
1719 | +. | |
1723 | 1720 | .IP \*[= -A\0 \(dqaffixed\(hytext\(dq > <] |
1721 | +'ne 4v | |
1724 | 1722 | Specifies |
1725 | 1723 | .CWI \(dqaffixed\(hytext\(dq > \%< |
1726 | 1724 | to be attached to the |
@@ -1734,10 +1732,9 @@ | ||
1734 | 1732 | .CWB W \& \& \(rq \(lq |
1735 | 1733 | .CW pdfhref |
1736 | 1734 | operators. |
1737 | -.KE | |
1738 | -.KS | |
1739 | -.sp -\n(PDu | |
1735 | +. | |
1740 | 1736 | .IP |
1737 | +'ne 3v | |
1741 | 1738 | Typically, this option would be used to insert punctuation after |
1742 | 1739 | the link \%\(lqhot\(hyspot\(rq. |
1743 | 1740 | Thus, there is little reason for the inclusion of spaces in |
@@ -1745,7 +1742,7 @@ | ||
1745 | 1742 | however, if such space is required, then the enclosing double quotes |
1746 | 1743 | .EM must |
1747 | 1744 | be specified, as indicated. |
1748 | -.KE | |
1745 | +. | |
1749 | 1746 | .IP \*[= -T\0 tag > <] |
1750 | 1747 | When specified with the |
1751 | 1748 | .CWB O \& \& \(rq \(lq |
@@ -1820,7 +1817,7 @@ | ||
1820 | 1817 | if only for the entirely cosmetic benefit of visually separating |
1821 | 1818 | the main argument list from the sequence of preceding options. |
1822 | 1819 | .QE |
1823 | -.sp -\n(PDu | |
1820 | +.sp -\n[PD]u | |
1824 | 1821 | .LP |
1825 | 1822 | In addition to the |
1826 | 1823 | .CW pdfhref |
@@ -1841,7 +1838,7 @@ | ||
1841 | 1838 | .CWBI file > < |
1842 | 1839 | option is not specified, are:\(en |
1843 | 1840 | .QS |
1844 | -.sp -\n(PDu | |
1841 | +.sp -\n[PD]u | |
1845 | 1842 | .IP \*[= -DF\0 dos\(hyfile > <] |
1846 | 1843 | Specifies the name of the file in which a link destination is defined, |
1847 | 1844 | using the file naming semantics of the |
@@ -2063,8 +2060,8 @@ | ||
2063 | 2060 | or to modify the default format for cross reference links, |
2064 | 2061 | .XR set-format ). ( |
2065 | 2062 | . |
2066 | -.KS | |
2067 | 2063 | .NH 4 |
2064 | +'ne 4v+\n[PD]u | |
2068 | 2065 | .XN -N pdfhref-view -- Associating a Document View with a Reference Mark |
2069 | 2066 | .LP |
2070 | 2067 | In the same manner as each document outline reference, defined by the |
@@ -2079,7 +2076,6 @@ | ||
2079 | 2076 | with the |
2080 | 2077 | .CWB M \& \& \(rq \(lq |
2081 | 2078 | operator, requires an associated document view specification. |
2082 | -.KE | |
2083 | 2079 | .LP |
2084 | 2080 | The mechanism whereby a document view is associated with a reference mark |
2085 | 2081 | is entirely analogous to that employed for outline references, |
@@ -2092,7 +2088,7 @@ | ||
2092 | 2088 | 'ne 2v |
2093 | 2089 | Thus, the reference view is defined in terms of:\(en |
2094 | 2090 | .QS |
2095 | -.sp -\n(PDu | |
2091 | +.sp -\n[PD]u | |
2096 | 2092 | .IP \*[= PDFHREF.VIEW] |
2097 | 2093 | A string, |
2098 | 2094 | establishing the position of the reference mark within the viewing window, |
@@ -2128,7 +2124,7 @@ | ||
2128 | 2124 | when the reference is selected. |
2129 | 2125 | .QE |
2130 | 2126 | .LP |
2131 | -.sp -\n(PDu | |
2127 | +.sp -\n[PD]u | |
2132 | 2128 | Just as the view associated with outline references may be changed, |
2133 | 2129 | by redefining |
2134 | 2130 | .CW PDFBOOKMARK.VIEW , |
@@ -2479,7 +2475,7 @@ | ||
2479 | 2475 | and sometimes also referred to as a Uniform Resource Locator, |
2480 | 2476 | or \(lqURL\(rq). |
2481 | 2477 | .LP |
2482 | -'ne 7v+(u;2*\n(PD) | |
2478 | +'ne 7v+(u;2*\n[PD]) | |
2483 | 2479 | Since the mechanism for creating a link to a URI differs somewhat |
2484 | 2480 | from that for creating PDF references, the |
2485 | 2481 | .CW pdfhref |
@@ -2640,7 +2636,7 @@ | ||
2640 | 2636 | by default; |
2641 | 2637 | it is controlled by a pair of strings:\(en |
2642 | 2638 | .QS |
2643 | -.sp -\n(PDu | |
2639 | +.sp -\n[PD]u | |
2644 | 2640 | .IP \*[= PDFHREF.BORDER] |
2645 | 2641 | This string comprises a \%space\(hyseparated triplet of numeric values, |
2646 | 2642 | optionally followed by a further \%space\(hyseparated |
@@ -2668,10 +2664,10 @@ | ||
2668 | 2664 | thus appearing to disable the use of borders |
2669 | 2665 | for link visualization. |
2670 | 2666 | This differs from the \*[Adobe] default, |
2667 | +'ne 4v+(u;2*\n[PD]) | |
2671 | 2668 | which represents a solid (visible) line, |
2672 | 2669 | one pixel in width, |
2673 | 2670 | and with rectangular corners; |
2674 | -'ne 3v+(u;2*\n(PD) | |
2675 | 2671 | this \*[Adobe] default may be reinstated, |
2676 | 2672 | by explicitly defining |
2677 | 2673 | .RS |
@@ -2767,7 +2763,7 @@ | ||
2767 | 2763 | is established by a further string assignment, |
2768 | 2764 | viz.:\(en |
2769 | 2765 | .QS |
2770 | -.sp -\n(PDu | |
2766 | +.sp -\n[PD]u | |
2771 | 2767 | .IP \*[= PDFHREF.TEXT.COLOUR] |
2772 | 2768 | Specifies the text colour, |
2773 | 2769 | for rendition of PDF reference links. |
@@ -2852,7 +2848,7 @@ | ||
2852 | 2848 | .pdfhref L -D set-colour -P \(lq -A \(rq -- use of colour |
2853 | 2849 | reference, |
2854 | 2850 | in the initial paragraph of |
2855 | -'ne 3u*\n[PD]u+4v | |
2851 | +'ne 4v+(u;3*\n[PD]) | |
2856 | 2852 | .pdfhref L -D user-format -A , -- this section |
2857 | 2853 | points to a destination named by mark up similar to:\(en |
2858 | 2854 | .QP |
@@ -2864,8 +2860,8 @@ | ||
2864 | 2860 | .QP |
2865 | 2861 | .CW ".pdfhref L -D set-colour -- use of colour" |
2866 | 2862 | . |
2867 | -.KS | |
2868 | 2863 | .NH 4 |
2864 | +'ne 3v+(u;2*\n[PD]) | |
2869 | 2865 | .XN -N auto-format -- Using Automatically Formatted Reference Text |
2870 | 2866 | .LP |
2871 | 2867 | When the text within a link \%\(lqhot\(hyspot\(rq is specified explicitly, |
@@ -2879,8 +2875,7 @@ | ||
2879 | 2875 | -- |
2880 | 2876 | .CWI explicit-text > < |
2881 | 2877 | .fam |
2882 | -'ne 2v+\n(PDu | |
2883 | -.KE | |
2878 | +'ne 2v+\n[PD]u | |
2884 | 2879 | .LP |
2885 | 2880 | as described in |
2886 | 2881 | .pdfhref L -D user-format -A , -- the preceding section |
@@ -3061,8 +3056,8 @@ | ||
3061 | 3056 | as explained in |
3062 | 3057 | .pdfhref L -D custom-format -A . -- the following section |
3063 | 3058 | . |
3064 | -.KS | |
3065 | 3059 | .NH 4 |
3060 | +'ne 5v+(u;3*\n[PD]) | |
3066 | 3061 | .XN -N custom-format -- Customizing Automatically Formatted Reference Text |
3067 | 3062 | .LP |
3068 | 3063 | \(lqAutomatically formatted\(rq reference text is interpolated, |
@@ -3077,7 +3072,7 @@ | ||
3077 | 3072 | option, |
3078 | 3073 | .EM "and either" \^:\(en |
3079 | 3074 | .QS |
3080 | -.sp -\n(PDu | |
3075 | +.sp -\n[PD]u | |
3081 | 3076 | .IP \(bu |
3082 | 3077 | no explicit reference text is specified, |
3083 | 3078 | (in which case, |
@@ -3091,7 +3086,7 @@ | ||
3091 | 3086 | option is specified, |
3092 | 3087 | in conjunction with explicit reference text. |
3093 | 3088 | .QE |
3094 | -.KE | |
3089 | +.sp -\n[PD]u | |
3095 | 3090 | .LP |
3096 | 3091 | In each of these cases, |
3097 | 3092 | the reference text is derived, |
@@ -3190,7 +3185,7 @@ | ||
3190 | 3185 | default formatting macro is used, |
3191 | 3186 | formatting progresses as follows:\(en |
3192 | 3187 | .QS |
3193 | -.sp -\n(PDu | |
3188 | +.sp -\n[PD]u | |
3194 | 3189 | .nr ITEM 0 1 |
3195 | 3190 | .de ITEMIZE ITEMIZE |
3196 | 3191 | .IP \s'-2.5p'\\n+[ITEM]\s'+2.5p'. |
@@ -3293,6 +3288,7 @@ | ||
3293 | 3288 | and which defines the extent of, |
3294 | 3289 | the link \%\(lqhot\(hyspot\(rq region. |
3295 | 3290 | .QE |
3291 | +.sp -\n[PD]u | |
3296 | 3292 | .LP |
3297 | 3293 | From the foregoing, |
3298 | 3294 | it may be deduced that reference text, |
@@ -3316,7 +3312,7 @@ | ||
3316 | 3312 | Within the formatted text, |
3317 | 3313 | the keyword/value pair interpolations appear |
3318 | 3314 | in the order in which \(lqknown\(rq keywords are found, |
3319 | -'ne 7v+\n(PDu | |
3315 | +'ne 7v+\n[PD]u | |
3320 | 3316 | while parsing the |
3321 | 3317 | .CW PDFHREF.INFO |
3322 | 3318 | record; |
@@ -3724,7 +3720,7 @@ | ||
3724 | 3720 | the user should:\(en |
3725 | 3721 | .QS |
3726 | 3722 | .nr ITEM 0 1 |
3727 | -.sp -\n(PDu | |
3723 | +.sp -\n[PD]u | |
3728 | 3724 | .ITEMIZE |
3729 | 3725 | Define a page transition macro, to provide whatever features may be required, |
3730 | 3726 | when a page transition occurs \(em e.g.\& printing footnotes, |
@@ -3732,11 +3728,13 @@ | ||
3732 | 3728 | This macro should end by setting the output position at the correct |
3733 | 3729 | vertical page offset, where the printing of running text is to restart, |
3734 | 3730 | following the page transition. |
3731 | +. | |
3735 | 3732 | .ITEMIZE |
3736 | 3733 | Plant a trap to invoke this macro, at the appropriate vertical position |
3737 | 3734 | marking the end of normal running text on each page. |
3738 | -.KS | |
3735 | +. | |
3739 | 3736 | .ITEMIZE |
3737 | +'ne 4v+(u;2*\n[PD]) | |
3740 | 3738 | Initialize the |
3741 | 3739 | .CW pdfhref |
3742 | 3740 | hook into this page transition trap, by invoking |
@@ -3753,7 +3751,6 @@ | ||
3753 | 3751 | .CW pdfhref |
3754 | 3752 | will correctly restart mapping of active link regions, |
3755 | 3753 | at the start of each new page. |
3756 | -.KE | |
3757 | 3754 | .RE |
3758 | 3755 | .QE |
3759 | 3756 | .LP |
@@ -3829,7 +3826,7 @@ | ||
3829 | 3826 | .CW groff |
3830 | 3827 | formatting process is allowed to complete. |
3831 | 3828 | .LP |
3832 | -'ne 4v+\n(PDu | |
3829 | +'ne 4v+\n[PD]u | |
3833 | 3830 | To allow the user to choose when cached |
3834 | 3831 | .CW pdfmark |
3835 | 3832 | data is to be flushed to the output stream, the |
@@ -4116,7 +4113,7 @@ | ||
4116 | 4113 | .CW spdf.tmac |
4117 | 4114 | provides:\(en |
4118 | 4115 | .QS |
4119 | -.sp -\n(PDu | |
4116 | +.sp -\n[PD]u | |
4120 | 4117 | .IP \(bu |
4121 | 4118 | Macros to isolate the |
4122 | 4119 | .EM \%front\(hymatter , |
@@ -4264,7 +4261,7 @@ | ||
4264 | 4261 | .CW spdf.tmac |
4265 | 4262 | macros is specified as:\(en |
4266 | 4263 | .DS I |
4267 | -.sp -\n(PDu | |
4264 | +.sp -\n[PD]u | |
4268 | 4265 | .CWB .SH |
4269 | 4266 | .CWB .XH \& \& \0\c |
4270 | 4267 | .CWB -N \& [ \ \c |
@@ -4276,7 +4273,7 @@ | ||
4276 | 4273 | .CW ... |
4277 | 4274 | .DE |
4278 | 4275 | .DS I |
4279 | -.sp -\n(PDu | |
4276 | +.sp -\n[PD]u | |
4280 | 4277 | .CWB .NH \& \& \0\c |
4281 | 4278 | .CWI outline-level > < |
4282 | 4279 | .CWB .XN \& \& \0\c |
@@ -4288,7 +4285,7 @@ | ||
4288 | 4285 | .CW ... |
4289 | 4286 | .DE |
4290 | 4287 | .LP |
4291 | -.sp -\n(PDu | |
4288 | +.sp -\n[PD]u | |
4292 | 4289 | In either case, |
4293 | 4290 | the |
4294 | 4291 | .CWI heading-text >... < \& |
@@ -4345,7 +4342,7 @@ | ||
4345 | 4342 | .FE |
4346 | 4343 | are:\(en |
4347 | 4344 | .QS |
4348 | -.sp -\n(PDu | |
4345 | +.sp -\n[PD]u | |
4349 | 4346 | .IP "\f(CB-N\fP \FC<\fIname\fP>\F[]" |
4350 | 4347 | Create a |
4351 | 4348 | .CW pdfhref |