What to do when you need hyperlinks in a prosper-presentation with emphasis on LATEX-documents converted to html with TeX4ht Simen Kvaal Simula Research Laboratory Summer 2002 – p.1/7 Introduction Prosper is great for making slides in LATEX. Viewing the slides on an online computer suggests linking the presentation to a web site. More specifically; we want to link to some section in a web-document created with LATEX and TeX4ht. Let’s see wether this is possible! Summer 2002 – p.2/7 How to insert hyperlinks Here is an example: Bram Stoker wrote “Dracula” more than a century ago. On Project Gutenberg you can find “Dracula” and hundreds of public domain books online. The link was inserted with the \href{url}{text} command. This command resides in the hyperref-package, which included by prosper. Thus, to insert a hyperlink to an external web-document, one only has to insert the appropriate \href-command. Summer 2002 – p.3/7 How to insert hyperlinks cont. Note that the urlcolor-parameter to hyperref is obscured by the prosper class, so the best way to do create a colored hyperlink is to precede the text with a color-command, e.g. {\green \underline{text}} Summer 2002 – p.4/7 Creating hyperlinks in TeX4ht With TeX4ht one can create splendid html-versions of LATEX-documents. The only trouble is how to know the name of the links to various html-pages created. Solution: Exploit TeX4ht’s “hooks” when issuing sectioning commands. I have written a collection of macros in customlinks.tex to accomplish this task. Simply issue \include{customlinks.tex} after \begin{document}, and the hooks will be set up. Summer 2002 – p.5/7 Creating hyperlinks in TeX4ht cont. After compiling the document, run cat doc.log | grep Customlinks >links.txt to create a text file containing descriptions of all the links. They are all easily read and remembered. (doc.log is the logfile from your main document.) You can also create custom links wherever you want, with the \customlink and \pagelink commands. Do you want to know more? See the LATEX Web Companion and the customlinks.tex source. Summer 2002 – p.6/7 A simple example: dracula.tex dracula.tex contains some bloody sections. The document is converted to html with TeX4ht. See it here! (For the sake of simplicity, we don’t split the document over several html-files.) After running the cat-command mentioned on the previous slide, we get this text-file describing the links: --------- Customlinks Customlinks Customlinks Customlinks says: says: says: says: Link Link Link Link to to to to chapter section chapter section 1: dracula.html#ch1 1.1: dracula.html#sec1-1 2: dracula.html#ch2 2.1: dracula.html#sec2-1 Now, let’s see section 2.1, which is from Jonathan Harker’s journal: Jonathan harker’s journal. Summer 2002 – p.7/7