Meg McRoberts wrote: > I believe Amber's question was not how to build a PDF or PS > file, but how to create cross-references that become hot links > in the build document. I don't think raw groff has this > capability...
I guess this *is* what Amber is asking, so Larry's and my replies perhaps don't give the full story. Amber wants to know how to create `hot links' in PDF or PostScript documents; note that `hot links' implies that the document is to be viewed on-screen. For PDF documents, such links are implemented using `pdfmarks'; the pdfmark.tmac macro package provides the `pdfhref' macro, to facilitate the creation of such `pdfmarks'. Specifically, `.pdfhref M ...' will create an anchor, to which a link may refer, and `.pdfhref L ...' creates the `hot link'. (There is also the `.pdfhref D ...' variation on `.pdfhref M ...', which makes it possible to define an external anchor, to enable `hot link' references across document boundaries). Raw groff *does* make it possible to create such links -- after all pdfmark.tmac must eventually resolve all its macro expansions down to raw groff code. However, using the macro package will take a lot of pain out of the process, should you feel tempted to try writing the raw groff code yourself; it is a far from trivial exercise! As a page description language, raw PostScript seems to me more geared towards preparing documents for printing, rather than for on-screen display. Thus, its support for `hot links' probably isn't fundamental to the language definition. However, I'm no PostScript expert, and I have no idea how PostScript viewers handle such features -- perhaps they also rely on the `pdfmark' mechanism, in which case, the `pdfmark' macros could also work for raw PostScript intended to be viewed on-screen. > Does ps2pdf no longer work? It worked fine for version 17.1 > but I haven't been able to get it to work for ps files generated > with 19.1. I'll have to try it again with the new version. `ps2pdf' is simply a wrapper around GhostScript, so there is no reason why it shouldn't still work with current groff versions. In `pdfroff', I chose to invoke GhostScript directly, rather than to use yet another intermediate wrapper. `Pdfroff' also provides a level of document pre-processing, through multiple groff passes, to ensure that `.pdfhref' cross references are properly resolved; `ps2pdf' doesn't have this capability, so if you use it instead of `pdfroff', your `hot link' cross references are unlikely to work. HTH. Keith. _______________________________________________ Groff mailing list [email protected] http://lists.gnu.org/mailman/listinfo/groff
