On Tuesday, 7 January 2025 18:27:56 GMT Francesco Ariis wrote: > Hello groff users, > > how to render clickable links in PDF documents? > > I recently discovered `groff`. As an exercises I am typesetting my > CV in it (`groff -ms`). Say I want to put the link to my personal > website, what directive/macro to invoke to make it clickable? > > Thanks in advance > —F
There should be a copy of pdfmark.pdf on your system which says:- .pdfhref W [-D <URI>] [-P <prefix-text>] [-A <affixed-text>] [--] descriptive text ... where the optional -D <URI> modifier specifies the address for the target Internet resource, in any appropriate Uniform Resource Identifier format, while the descriptive text argument specifies the text which is to appear in the “hot-spot” region, Examples:- Copy of my CV .pdfhref W https://myhome.net/CV.html .sp Click for copy of .pdfhref W -D https://myhome.net/CV.html -A . my CV .sp Contact .pdfhref W -D mailto:fa...@ariis.it -A . my email Use it with either:- groff -Tpdf -ms # to produce a pdf or, groff -ms -mpdfmark # to produce postscript which can be distilled to pdf Alternatively, if you use the mom macro set (https://www.schaffter.ca/mom/ momdoc/toc.html) using -mom rather than -ms, you should find mom-pdf.pdf somewhere on your system, which lets you do:- .PDF_WWW_LINK https://www.schaffter.ca/mom/momdoc/toc.html would open mom’s online documentation at https://www.schaffter.ca/mom/momdoc/ toc.html. The same, with "here" supplied as hotlink text, lets you click here instead.