Bachelor Thesis Log 22

You are reading an older blog post. Please be aware that the information contained in it may be technologically outdated. This text may not necessarily reflect my current opinions or capabilities.

This is an English translation of a blog post that was originally published in German.

November 30th, 2010

Welcome to the penultimate bachelor thesis report. First of all I can announce: The thesis has been successfully finalized and printed and was handed over to my two supervisors today. Nevertheless, I will hand it in at the study office next Monday, as planned, because it is now post-dated to Dec 6th (the final spurt went a bit faster than planned).

Printing and Binding

Last Saturday I dabbled for the first time with text typesetting for double-sided printing. So far, the work has been optimized for screen reading and single-sided printing, which of course doesn't look so great in bound form. So I did some reading – again, a topic you could spend weeks on – and just set the “twoside” option for my document and experimented a bit with pagestyle and cleardoublepage. After a while I was satisfied. As a PDF it looks pretty poor when browsing page by page, but in the two-page view it's really impressive.

Unfortunately, I have criminally neglected the binding correction, so that after printing and binding there is unpleasantly little white space on the inside margins. Dear writers of final theses and other works: please remember a suitable binding correction when you set up for double-paged printing. In LaTeX, it could look like this, for example:

\\documentclass[twoside,BCOR=15mm]{scrartcl}

Anyway, I'll be smarter for next time, but this time, unfortunately, the print copies are a bit unpleasant to read because of that. A great pity.

Optimizing for Digital Publishing with LaTeX

When I make the document available here as a PDF, I take the version for one-sided printing, since this is also best suited for self-printing – the pages are usually just loosely stapled together. I find this version more convenient on the screen as well.

But the PDF publication offers a few special features that might be interesting for you. At a time when publications are increasingly being made digitally, one should not shy away from exploiting the advantages of the medium.

Hyperlinks with hyperref: The first package that should not be missing in any PDF publication created with LaTeX is hyperref. It can work fully automatically, but it can also be customized very nicely. What does hyperref do? It provides the document with internal and external hyperlinks. For example, each chapter heading in the table of contents is clickable in the PDF viewer and leads directly to the corresponding chapter. Every literature abbreviation in the text leads to the corresponding entry in the bibliography, every other reference (e.g. to figures or tables) leads to its respective target and every web link can be opened in the browser with a click. The brightly colored frames that hyperref adds by default are not necessarily nice to look at – but they are not printed by default and can be adjusted or deactivated completely. Seriously, hyperref is very handy for people who read the document digitally, and makes me yearn for a “Back” button in my PDF viewer.

Metadata with hyperxmp: XMP is a metadata format specified by Adobe which is intended to be used in all kinds of container formats, but is currently most relevant for PDF files as far as I know. The hyperxmp package allows the willing pdfLaTeX user to add metadata in this format to the document. It integrates with hyperref, which must also be included. This package can be used to add copyright and license information in addition to title, author, keywords, etc. If you ever want to read the license information from the PDF files automatically, it is worth its weight in gold if it is stored in such a standardized format and not just mentioned somewhere in the document. For me it looks like this:

\\hypersetup{
  pdfcopyright={This work is licensed to the public under the
    Creative Commons Attribution Share-Alike 3.0 License.},
  pdflicenseurl={http://creativecommons.org/licenses/by-sa/3.0/}
}

An explicit mention of the license, which is readable in the document, is of course also added.

File attachments with embedfile: Every now and then one would like to include arbitrary files with the document, be it source code, images, experiment data or whatever else one can think of. It is not very well-known that the PDF format supports file attachments and that the embedfile package makes this feature available for pdfLaTeX. By specifying some metadata about the file (e.g. the MIME type), one can then attach arbitrary files to the PDF document. It is up to the PDF viewer to display these file attachments to the reader somehow. My PDF viewer, evince (now also available for Windows), does this via the sidebar, below the “Attachments” header. For example, I attached some Java source code to my bachelor thesis, so the reader doesn't have to tediously select and copy it with the mouse to test it. A double click on the attached file directy opens a “Save” dialog, that's much nicer.

File attachments with attachfile2: The attachfile2 package also allows file attachments, but uses a different PDF feature for this, namely annotations. This means that files are not attached to the document in general, but are included at a specific point. This means that you can then have something like clickable icons in the PDF file (this time actually really as part of the document instead of as an attachment), behind which a file is then hidden. Using attachfile2 is not quite as easy, but after some reading I got to a solution where my file annotations work and below my code listings a clickable Java icon is shown. This is also very nice.

In my thesis I combined this variant with embedfile and included my source code both as annotations and as attachments. Now the source code is duplicated (or even triplicated if you count the textual version) in the document, but I consider the few hundred bytes a small price to pay for the usability enhancement.

All of these features are helpful simplifications for people who consume the document digitally, without penalizing print readers. So I encourage anyone who wants to distribute their work digitally to look into the possibilities.

Status of the Thesis Submission, Future

Looping back: as already mentioned above, I have handed the thesis to my supervisors in printed form. The three copies for the student office are still at home with the burned CD and will be handed in next Monday. After that, the procedure is outside my control and I'll just be waiting for the final grade.

Next Monday (not Tuesday) the thesis will be available to be read and downloaded here. In addition, there will be a few general thoughts and a conclusion from me. And then, well, it'll be over. At least until the next thesis… but for now I'll see you on Monday!

Comments

You can leave a comment by replying to this Mastodon post from your own account on Mastodon, Firefish, Akkoma, or any other ActivityPub-capable social network that can exchange replies with Mastodon.