## Posts Tagged ‘rubber’

### Fun with LaTeX

Thursday, March 26th, 2009

So I have finally gotten my shit together and seriously started putting my ideas for the FS/OS course into writing. $DIETY knows cultivating those ideas has taken long enough… I started out, as I usually do, with my trusty LaTeX template: \documentclass[english,a4paper,utf8]{report} \usepackage[utf8]{inputenc} \usepackage{verbatim} \usepackage[dvips,bookmarks=false]{hyperref} \hypersetup{ colorlinks=true, citecolor=black, filecolor=black, linkcolor=black, urlcolor=blue } \author{} \title{} \begin{document} \maketitle \tableofcontents \input{./00_chapters} \bibliographystyle{unsrt} \bibliography{./bibtex/ref} \end{document} I then proceeded to copy the old build-system which mra rigged for us while doing our bachelor thesis, and all seemed good and well, until I realized that the hyperrefs (i.e. supposedly clickable URLs) weren’t all that clickable. I was baffled. What had gone wrong? Had I missed to install a required package? Why then had not rubber (which the build-system use) died with an error? No, packages seemed fine. Had I found a feature which Adobe Acrobat Reader possessed, but Evince didn’t? Nope, opening the pdf-file in didn’t yield a better result (only a slower result… jeebuz acroread is bloated…) I knew that I had gotten clickable links to work in LaTeX-generated pdfs before, so what was different? Ah! It might be that I used mra’s old build-script, the one he wrote before learning about rubber. Ok,$ less bin/makedoci.sh told me all I needed to know. The relevant procedure in that file was:

1. call latex
2. call bibtex
3. call latex
4. call latex
5. call dvips
6. call ps2pdf

As it turns out, the new “rubberized” build-system called rubber with flags -d and -f (i.e. produce pdf output, and force compilation). At the same time I was following up another lead, trying to figure out the documentation for the hyperref package in CTAN. I may have spent too little time reading the actual content in there, but when I came over a list about drivers and \special commands, I started seeing some patterns.

rubber -d calls pdftex, and it might have just been easier to switch “dvips” in the hyperref configuration in the template, but then I’d have to check and possibly dig even deeper to find what the actual string to put in the configuration should be.

This was less attractive since I knew that the current template had worked before (using dvips). But that would involve finding out if rubber could pass through DVI, to PS, and then to PDF. Coincidentally, this is just what rubber -p does.

Which sortof create a really cute little circumstance, to create a pdf-file, you call rubber with the flags -p -d and -f.

PDF, rubber -p -d -f, get it? XD