2023-02-18 G. Branden Robinson * pdfmark.am (uninstall-pdfmark-hook): Simplify uninstallation. Try to remove the configured `pdfdocdir` in the event it is empty, but do not fail if it isn't. (It can be a directory shared with other groff components; we don't know in what order the uninstall targets will serialize, but the last one run should succeed.) 2022-09-20 G. Branden Robinson * sanitize.tmac: Move comment to where escape sequences are recognized. Problem arose in commit 058b63ce3d, 2021-09-04. troff:.../contrib/pdfmark/sanitize.tmac:162: warning: macro '\"' not defined 2022-05-20 G. Branden Robinson * pdfmark.am: Rename `BUILD_PDFDOC` to `USE_GROPDF`. 2022-03-30 G. Branden Robinson * pdfmark.am: Eliminate `PDFMARK_TFLAG` and `PDFMARK_PFLAG` Make macros; they were expanded in only one place. (PDFROFF): Track rename of Make macro `TFLAG` to `MFLAG`. 2022-03-30 G. Branden Robinson * cover.ms: Die horribly if `PSPIC` call fails. 2022-03-26 G. Branden Robinson * pdfmark.am (PDFDOCFILES): Replace hard-coded "gnu.eps" file name with expansion of `DOC_GNU_EPS`. (contrib/pdfmark/pdfmark.pdf): Pass `-I` option to pdfroff(1) to enable location of "gnu.eps" file. 2021-10-24 Keith Marshall Adapt to accommodate global XH and XN implementations. cf. * spdf.tmac (XH-INIT, XN-INIT, XH-UPDATE-TOC): Delete definitions; the defaults, provided by s.tmac, are now sufficient. (XH-REPLACEMENT, XN-REPLACEMENT): Define these, rather than... (XH, XN): ...these, respectively. 2021-10-02 Keith Marshall Make a minor layout adjustment. * pdfmark.ms (Section 2.4.3): Add a vertical space reservation, to avoid a widow line at the end of the paragraph explaining use of... (PDFHREF.Y): ...this computed register, in the definition of... (PDFBOOKMARK.VIEW): ...this. 2021-10-02 Keith Marshall Clarify references to use of the -Tpdf option. * pdfmark.ms (Section 2, Section 3.1): Add footnotes, indicating that only "-Tps" and "-Tpdf" output formats are supported, and that "-Tpdf" may avoid a separate step, to convert from PostScript to PDF. 2021-10-02 Keith Marshall Work around misplacement of link "hot-spots" in footnotes. * pdfmark.ms (pdfhref-nobreak): New document-local macro; used instead of "pdfhref", this forces paragraph adjustment before placement of any unbreakable link text, for which line-wrap may be required. Currently observed only within footnotes, without adjustment, the "hot-spot" for the link may be placed 1v above its associated text. 2021-10-02 Keith Marshall Link footnote reference marks to footnote text. * pdfmark.ms (FP): Redefine locally; replace s.tmac default. (FF): Do not redefine; our FP replacement macro does not use it. [d FS-MARK] (FS-MARK): Redefine locally; map it to... (pdf:fn.mark): ...this locally defined macro. [!d FS-MARK] (@FS): Rename s.tmac implementation as... (pdf:fn.record): ...this, then redefine @FS itself, to call... (pdf:fn.mark, pdf:fn.record): ...these, in respective order. (groff-1.19.1, GhostScript-8.14): Update footnote reference syntax. (Ghostscript-8.14, MSYS): Emulate sentence space after footnote mark. (*): Replace s.tmac string definition; make it equivalent to "\c", after renaming its original implementation as... (pdf:fn.index): ...this; synchronize references with changes to... (pdf:fn.index.count): ...this new locally defined register; it is auto-incremented by one, as each footnote is placed. 2021-10-01 Keith Marshall Incorporate user-defined TOC leader style. * pdfmark.ms: Make some comment tidy-up adjustments. (TC-LEADER, TC-MARGIN): Define them, to take advantage of new s.tmac features; cf. . 2021-09-18 Keith Marshall 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 Add comments to annotate locally-defined font change macros. * pdfmark.ms (EM): Annotate this locally-defined emphasis macro... (CWB, CWI, CWBI): ...these constant width font interpolation macros... (=): ...and this locally-defined IP tag variant string. 2021-09-13 Keith Marshall Update defunct internet URL references. * pdfmark.ms (pdfmark-manual): Adobe moved the document (again); update the document reference macro, to follow the URL relocation. (www.mingw.org): The MinGW Project has relinquished this domain; update the URL reference, to follow web-site relocation to... (mingw.osdn.io): ...here. 2021-09-13 Keith Marshall Factor document-specific bloat out of spdf.tmac * spdf.tmac: Reorganize; add many comments. (XN): Retained, but reimplemented, to serve as... (XH, XN): ...both of these; add callback hooks for... (XH-INIT, XN-INIT, XH-UPDATE-TOC): ...these; provide no-op stubs; factor out TOC collection code, delegating to XH-UPDATE-TOC. (opt*XN-N, opt*XN-S, opt*XN-X): Rename internal macros to... (de spdf:XH-N, de spdf:XH-S, de spdf:XH-X): ...these, respectively. (AN, @AN, IE, IS, LU, NN, PXREF, SAME-PAGE, XM): Delete; we do not require these; if users do, they should define their own. (pdf@toc): Delete internal macro; fold body into... (TC): ...this. * pdfmark.ms (XH-UPDATE-TOC): Implement callback; it is based on... (XN): ...original implementation of this, factored out of spdf.tmac, but with significant simplification, to remove unnecessary code. (XNVS1, XNVS2, XNVS3): Tighten vertical spacing. 2021-09-04 Keith Marshall Reduce potential for user-space exposure of "ms" internals. * spdf.tmac (@NH): Append to s.tmac macro; assign... (spdf:nh*hl): ...this new internal register; alias it to... (.NH): ...this new public name, hence making it track... (nh*hl): ...this s.tmac internal numeric register. (XN): Use \n[.NH] instead of \n[nh*hl]. 2021-09-03 Keith Marshall Sanitize text for use in PDF document outlines. * sanitize.tmac: New file; it implements... (sanitize): ...this new macro; interprets its first argument as a string name, and copies its remaining arguments to the named string, discarding specific embedded troff escape sequences; currently... (\F): ...only this is identified as "specifically discardable". * pdfmark.am (TMACFILES): Add sanitize.tmac * spdf.tmac (mso): Include sanitize.tmac (xn*ref, xn*argc): Rename all occurrences... (spdf:refname, spdf:argc): ...to these, respectively. (XN): Stop inserting $* directly into PDF outlines; instead, use... (spdf:bm.text): ...this new string; this is locally defined by... (spdf:bm.define): ...this new macro; passed the original $* from XN, this itself, is locally defined as a redirectable alias for... (spdf:bm.basic): ...this new local macro; it simply copies $*, passed from XN, to the string named by its first argument, (which is always spdf:bm.text), so reproducing previous behaviour. (opt*XN-S): New macro; defined for internal use only, it adds a "-S" option to XN, such that, when specified, it temporarily redirects... (spdf:bm.define): ...this macro mapping alias to... (sanitize): ...this. * pdfmark.ms (XN): Add "-S" option for all headings which include... (\F[C]...\F[]): ...this escape sequence. 2021-08-21 Keith Marshall Define, and use registered trade mark strings. * pdfmark.ms (Adobe, Acrobat, Distiller, PostScript, Microsoft): Define as strings. Each expands to its own name, followed by the registered trademark symbol, as a superscript, and optional trailing punctuation, below the superscript. Use each as required. 2021-08-21 Keith Marshall Prefer "-ize" to "-ise" where etymology permits. * pdfmark.ms: For all verbs, and their derivative nouns, for which British English allows either "-ise" or "-ize" as ending, prefer the "-ize" form of verb, and "-ization" form of noun, throughout. 2021-08-20 Keith Marshall Correct a spelling error. * pdfmark.ms (Section 2.5.3.1): Fix typo: s/exanple/example/. 2021-08-20 Keith Marshall Space out section headings in pdfmark.ms source. * pdfmark.ms (.NH): Precede each instance by one null request, to improve readability. 2021-08-18 Keith Marshall Refine pdfroff "missing ghostscript" diagnostic. * pdfroff.sh [$GS = ":"]: Fix typo: s/connot/cannot/; refine text. 2020-12-25 G. Branden Robinson * pdfmark.am (PDFROFF): Call pdfroff without `--keep-temporary-files` option. Temporary directories are created with mktemp(1) and files with an embedded process identifier, which frustrates reproducible builds. See . 2018-02-28 Werner LEMBERG * pdfmark.am (pdfmark.pdf): Use $(GROFF_V). 2018-02-28 Werner LEMBERG * pdfmark.am (pdfroff): Use $(AM_V_GEN) to silence file generation. 2015-08-22 Bernd Warken * pdfroff.1.man: Rename `pdfroff.man'. * pdfmark.am: Add `Last update'. Setup Emacs mode. 2015-08-05 Bernd Warken * pdfmark.am: Add `Last update'. Setup Emacs mode. 2015-04-03 Werner LEMBERG * pdfroff.man: Make it work in compatibility mode. 2014-10-14 Keith Marshall Deduce "--no-toc-relocation" from input stream (revisited). * pdfroff.sh (WRKFILE): Correct malformed sed expression. * spdf.tmac (TC): Prefer value of pdfroff's PHASE register to defined state of pdf:href.map, when choosing to emit control record to... (toc_relocation): ...enable this. 2014-10-13 Keith Marshall Deduce "--no-toc-relocation" from input stream. * pdfroff.sh (WRKFILE): Scan it for "pdfroff-option:set" records; apply settings; check for equivalent of "--no-toc-relocation" option. * spdf.tmac (TC): Emit "pdfroff-option:set toc-relocation=enabled". 2014-10-12 Keith Marshall Avoid spurious user visible control messages on stderr. * pdfroff.sh (REFCOPY): Ensure that at least one pdfhref mark of type 'Z' will remain in the reference map, after all references have been resolved; this is required, to suppress writing of reference control records to stderr during the final PDF output processing phase. 2014-09-04 Bernd Warken * all pdfmark source files: Copying (remove last updates and replace years with package years) and Emacs setup. 2014-03-30 Steffen Nurpmeso * Makefile.sub: Put straight error-prevention prefixes for `rm'. 2014-03-29 Steffen Nurpmeso * Makefile.sub: Handle examples separately, controlled by $(make{_,_install_,_uninstall_}examples). 2013-01-28 Deri James * pdfmark.tmac (pdfmark, pdf:composed): Use `\!' instead of `\X'. With the old pdfmark there are gaps between two of the lines, but with the new version they disappear. The use of `.br' and `.in 0' is arbitrary any request which causes an implicit break could be used. Two breaks together only produce one line break, but if there is an intervening `\X' then the second break finds the line buffer not empty and generates another line break. Using `\!' does alter the position of the pdfmark lines in the intermediate file sent to grops (the pdfmark lines are output immediately rather than being serialised through the output line processing), but this has no effect since the contents of the pdfmark line stay the same. It is the contents which determine where bookmarks jump to not the position of the record in the input stream to grops. I initially used `.output', but hit a snag if a pdfbookmark occurs before the document starts to output (message saying to insert an explicit `.br'), this is quite likely for things like `.pdfinfo /Author' which occur at the top of the document. So I'm using the `\!' escape. 2012-09-20 Werner LEMBERG Simplify enviroment handling. Suggested by Ivan Shmakov . * Makefile.sub (PDFROFF): Don't use export. 2011-12-26 Mike Frysinger Fix parallel build race failure. Sometimes building in parallel will fail in the pdfmark directory: make[2]: Entering directory '.../contrib/pdfmark' rm -f pdfroff rm -f pdfmark.pdf sed -f ... ./pdfroff.sh >pdfroff ...; ./pdfroff ... pdfmark.ms >pdfmark.pdf /bin/sh: ./pdfroff: Permission denied chmod +x pdfroff make[2]: *** [pdfmark.pdf] Error 126 This is because the generated pdf files use the local generated pdfroff helper script, but they don't depend directly upon it, so make tries to create the two in parallel and randomly falls over. * Makefile.sub: Have all the .pdf files explicitly depend on the `pdfroff' helper script. 2010-12-23 Keith Marshall Update copyright notices; pdfmark.tmac bug-fix. * pdfmark.tmac: Update copyright notices. (pdf*href.mark.resolve): Avoid premature removal, by aliasing to... (pdf*href.mark.begin): ...this, rather than renaming. * pdfroff.sh, pdfroff.man: Update copyright notices. 2010-12-14 Keith Marshall Clean up handling of temporary files directory. * .cvsignore (pdfroff-*): Ignore sub-directories matching this. * Makefile.sub (MOSTLCLEANDIRADD): Schedule them for removal. 2010-12-02 Keith Marshall Address potential temporary file security vulnerabilities. * pdfroff.sh (GROFF_TMPDIR): Use mktemp(1) to assign it, if possible; fall back to ${TMPDIR}, ${TMP} or ${TEMP} if unsuccessful. * pdfroff.man: Document it. 2009-08-16 Colin Watson Make pdfroff's GhostScript invocation safer. * pdfroff.sh (PDFROFF_POSTPROCESSOR_COMMAND): Add `-dSAFER' option. * pdfroff.man: Document it. 2008-12-28 Keith Marshall Avoid phantom line wrapping in pdfhref hot-spots. * pdfmark.tmac (pdf*href.mark.end): Emit hot-spot end markers within scope of `\Z', to prevent possible output line length overflow which may occur only in the layout computation passes, but not in the final output pass. Problem observed and identified by Nick Stoughton; it causes some hot-spots to be displaced from their proper locations. 2007-04-11 Keith Marshall Avoid stray newlines in folded pdfmark literal content. * pdfmark.tmac (pdf*pdfmark.dispatch.wrapped): New string; define it when accumulating long literal content; make it undefined otherwise. (PDFMARK.FOLDWIDTH, PDFMARK.FOLDWIDTH.MAX): Reserve space for two extra characters, to accommodate a space and an escaped newline, while accumulating literal content, in case folding is required. (pdf*pdfmark.dispatch) [pdf*pdfmark.dispatch.wrapped]: Add them. 2007-04-11 Keith Marshall * pdfmark.tmac (pdfbookmark): Don't evaluate within diversions; defer placement until diversion is copied out at top level. 2007-02-06 Eric S. Raymond * pdfroff.man: Update .UR/.UE and .MT/.ME to latest changes in an-ext.tmac. 2007-01-30 Werner LEMBERG * pdfroff.man: Updated. 2007-01-21 Werner LEMBERG * pdfroff.man: Revised, based on a patch from Eric Raymond. It now uses the new macros from an-ext.tmac. This is the first of a series of man patches which Eric has contributed. 2006-07-30 Keith Marshall * pdfroff.sh (PDFROFF_KILL_NULL_PAGES): Require `%%BeginPageSetup' on PostScript output line immediately following `%%Page:'. 2006-07-29 Keith Marshall * pdfroff.sh (PDFROFF_KILL_NULL_PAGES): Require `sed' to match a more explicit regular expression, for detection of redundant pages. 2006-07-14 Keith Marshall * pdfroff.sh (PDFWRITE): Local shell variable replaced... (PDFROFF_POSTPROCESSOR_COMMAND): by this new environment variable... (GROFF_GHOSTSCRIPT_INTERPRETER): with this bound to it. (PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): New environment variables. (--no-kill-null-pages): New command line option; implement it, and... (--help): Add description for it. * pdfroff.man (PDFROFF_POSTPROCESSOR_COMMAND): Document it. (PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES): Document them. (--no-kill-null-pages): Document it. 2006-07-14 Zvezdan Petkovic * pdfroff.sh (--emit-ps): New command line option; implement it. (--help): Add description for it. * pdfroff.man (--emit-ps): Document it. 2006-06-11 Werner LEMBERG * pdfroff.man: Add `.ig' block after NAME section to make mandb happy. 2006-03-31 Keith Marshall Split `pdfmark' output as required, to avoid excessively long `ps:exec' intermediate output records. * pdfmark.tmac (pdfmark): Macro extended to deploy ... (pdf*pdfmark.limit): New macro; use it to define ... (PDFMARK.FOLDWIDTH, PDFMARK.FOLDWIDTH.MAX): New registers. (pdf*compose.first, pdf*compose.next, pdf*compose.literal): New macros; each will be aliased as required to ... (pdf*compose): ... this, to dynamically construct ... (pdf:composed.line, pdf:composed.literal): ... these new strings. (pdf:compose.test): New dynamically constructed string; use it to detect parenthesised literals in pdfmark content, so folding can be avoided within them, subject to honouring of `PDFMARK.FOLDWIDTH'. (pdf*length.increment): New macro; it triggers output folding when ... (pdf:length): ... this new register exceeds `PDFMARK.FOLDWIDTH.MAX'. (pdf*pdfmark.post.first, pdf*pdfmark.post.next): New macros; each will be aliased as required to ... (pdf*pdfmark.post): ... this, and invoked by ... (pdf*pdfmark.dispatch): ... this new macro; use it to define ... (pdf:composed): ... this dynamically constructed macro; use ... (pdf*end): ... this new macro to terminate it. 2006-03-09 Keith Marshall Incorporate portability recommendations by Ralf Wildenhues * pdfroff.sh: Avoid unsafe quoting in variable substitutions of the form "${VAR+"set"}"; remove outer quotes everywhere; prefix with `x' on each side of comparisons. ($NULLCMD): Define when `$ZSH_VERSION' is set, i.e. when host has `/bin/sh -> zsh'; also... (emulate sh): Invoke, for this case. Enhancement/bug fix requested by Werner LEMBERG * pdfroff.sh (--help): Direct output to `stdout', not `stderr'. (--keep-temporary-files): New option; implement it. * pdfroff.man (OPTIONS): Document `--keep-temporary-files' option. (FILES): Note names and purpose of files it affects. * Makefile.sub (PDFROFF): Add `--keep-temporary-files' option; retain them in `GROFF_TMPDIR=.'. (CLEANADD): Include temporary files matching `pdf[0-9]*'. 2006-03-08 Werner LEMBERG * pdfmark.ms: Update URL for Adobe Reference Manual. 2006-02-26 Claudio Fontana * Makefile.sub: Add DESTDIR to install and uninstall targets to support staged installations. 2006-02-25 Werner LEMBERG * pdfmark.ms: Correct typo; reported by Thomas Klausner. 2006-02-24 Werner LEMBERG * pdfmark.ms, pdfroff.sh: Replace legal/illegal with valid/invalid. 2005-06-22 Keith Marshall pdfroff.sh portability enhancement. * pdfroff.sh (ARGLIST): Variable removed. (GROFF_STYLE): Use it for all groff invocations. (INPUT_FILES): Pass to all groff invocations, instead of ARGLIST. (CS_MACRO, CE_MACRO): Initialize independently. (CS_FILTER): Simplify quoting; it used to confuse some shells. (Source): CVS keyword removed; replaced by... (RCSfile, Revision): these. 2005-06-17 Keith Marshall * pdfroff.sh (MATCH): Correct quoting. (Source): Add terminating `$' on CVS keyword. 2005-06-17 Zvezdan Petkovic * Makefile.sub: (RM): Define as `rm -f', for `make' programs which don't predefine it. 2005-06-16 Bernd Warken * pdfroff.sh (NULLDEV): Correct misspelled instance of NULDEV. 2005-05-28 Werner LEMBERG * Makefile.sub (.ms.pdf): Use `--stylesheet', not `--style'. 2005-05-26 Werner LEMBERG * Makefile.sub, pdfmark.tmac, pdfroff.sh, spdf.tmac: Update postal address for Free Software Foundation. 2005-05-17 Keith Marshall Improve portability of `pdfroff' shell script. * pdfroff.sh: Add space in shebang, conforming to portability guidelines in `autoconf' docs. (searchpath): New shell function; use it instead of `type' command to locate prerequisite helper programs. * pdfroff.man: Document influence of `OSTYPE' and `PATH_SEPARATOR' environment variables. * Makefile.sub (pdfroff): Make it depend on SH_DEPS_SED_SCRIPT, from arch/misc/shdeps.sh; use it to customize PATH_SEPARATOR initialization code for `searchpath' function in pdfroff.sh. 2005-05-16 Keith Marshall Interim documentation update. * pdfmark.ms (GROFF-WEBSITE): New string; use it in references and examples. (Section 2.5): Add definitions of D and Z operators, for use with pdfhref macro. (Section 2.5.4): Complete description of pdfhref macro usage for `Linking to Internet Resources'; provide examples. 2005-05-14 Nick Stoughton * pdfmark.tmac (LB): Renamed to ... (PDFLB): This to avoid conflicts with mm's LB macro. 2005-05-02 Keith Marshall Handle parsing anomalies in Cygwin's `ash', and similar, shells. * pdfroff.sh ($CAT, $GREP, $SED, $GROFF, $DIFF): Avoid interpreting misdirected error messages, which `type' sends to `stdout' in some shells, as a successful program file match. ($AWK, $GS): Likewise; also ensure that multiple choice match prototypes are eval'ed as such, in case token splitting occurs before variable expansion. 2005-04-24 Keith Marshall Add support for folded outlines in PDF documents. * pdfmark.tmac (PDFOUTLINE.FOLDLEVEL): New register. (pdf:bm.emit): Use it. * pdfmark.ms: Document it. 2005-03-25 Werner LEMBERG * Makefile.in: Removed. 2005-03-24 Werner LEMBERG * Makefile: Renamed to... * Makefile.in: This. 2005-03-22 Keith Marshall * pdfroff.sh: Eliminate invalid program reference to $AWK, when invoked with `--no-reference-dictionary' option. 2005-03-02 Keith Marshall * contrib/pdfmark/Makefile.sub (install_data): Use $(INSTALL_SCRIPT) to install `pdfroff'. * contrib/pdfmark/pdfroff.man (opte): New macro. Use it to remove spurious equal signs from SYNOPSIS. 2005-02-28 Keith Marshall Provide `pdfroff' shell script, and manpage to document it; runs multiple groff passes, to format PDF documents. * pdfroff.sh: New shell script template; * pdfroff.man: New man page to document it. Integrate `pdfmark' into normal groff build system; install macro `pdfmark' packages, build and install `pdfroff', and PDF format documentation. * Makefile.sub: Rewritten. * pdfmark.tmac: Modified. (pdfhref): New macro operators, `D' and `Z'. (pdf*href-D, pdf*href-Z): New macros: implement them. (pdf*href.mark.resolve, pdf*href.mark.emit, pdf*href.mark.flush): Modified macro algorithm, to eliminate inconsistencies between `grohtml' representations of `opminy' from differing groff versions. (pdf*href.mark, pdf*href.mark.release, pdf*href.mark.close): deleted (redundant macros). (PDFHREF.LEADING): Default value changed (was 2.5p; now -1.0p). Global comment updates. * TODO: Updated. 2004-12-10 Werner LEMBERG * TODO: Updated. 2004-12-08 Keith Marshall First import of pdfmark files. ________________________________________________________________________ Copyright (C) 2004-2020 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Local Variables: fill-column: 72 mode: change-log version-control: never End: vim:set autoindent textwidth=72: