Archive for the 'LaTeX' Category

Wie man seine Dissertation mit LaTeX auf einem Mac schreibt
Teil 2: Wo soll ich anfangen?

Tuesday, November 2nd, 2010

Zunächst einmal sollte man die neueste Version von MacTeX installieren. Der Download dauert eine Weile, zwischenzeitlich kann man einen Blick auf diesen Artikel werfen The Not So Short Introduction to LaTeX2ε. Hier erhält man einen sehr guten Einblick was LaTeX ausmacht und wie es funktioniert. Nebenbei kann man auch schon mal die professionellen Ergebnisse mit LaTeX bewundern: Das Dokument wurde natürlich komplett mit diesem Programm erstellt.

Außerdem sollte man sich einen ordentlichen Texteditor besorgen. Theoretisch kann man auch TextEdit benutzen, aber mit einem vernünftigem Werkzeug wie TextWrangler wird man mehr Freude haben.

Wenn MacTeX heruntergeladen und installiert ist, kann man als erstes TeXShop starten (zu finden in “Programme/TeX/” auf der Festplatte).

Wir geben folgenden Code in das offene Fenster ein:

\documentclass{article}
\begin{document}
Small is beautiful.
\end{document}

Um zu sehen wie das Ergebnis gesetzt aussieht, muss man den “Setzen”-Knopf oben links im Fenster drücken. Das erstellte .pdf wird automatisch angezeigt.

Zum Glück muss man nicht alles selbst erstellen. Die Humboldt-Universität hat in ihrem edoc-Programm bereits eine exzellente und regelmäßig aktualisierte Vorlage für Dissertationen in LaTeX. Hier muss man lediglich die Hauptdatei “mustermann.tex” mit seinem eigenen Nachnamen benennen und in der Datei die notwendigen Metadaten zu Person, Titel der Arbeit und so weiter eintragen. Dann kann man im Prinzip schon loslegen die einzelnen Kapitel zu bearbeiten, die der Übersichtlichkeit halber in einzelnen Dateien gespeichert sind (“chapter01.tex”).

TextWrangler bietet hier praktischerweise die Möglichkeit eine Vielzahl von Dateien gleichzeitig übersichtlich zu öffnen. So wird die Bearbeitung der Dissertation ein Kinderspiel.

Um richtig loslegen zu können, reicht es zunächst einmal folgende LaTeX-Befehle zu kennen:

  • chapter{Kapitelname} Weist ein neues Kapitel aus, mit diesem Befehl sollte jede “chapter.tex”-Datei beginnen.
  • section{Überschrift} Weist die Überschriften innerhalb eines Kapitels aus. Untergeordnete Überschriften werden logisch mit
  • subsection{Unterüberschrift} beziehungsweise
  • subsubsection{Unterunterüberschrift} gekennzeichnet.

Ein neuer Absatz wird durch eine Leerzeile angezeigt.

In den nächsten Teilen werde ich noch auf das Einfügen von Bildern und Tabellen eingehen.

How to write your thesis on a Mac using LaTeX
Part 1: Why would I want to do that?

Monday, November 1st, 2010

So you need to write a doctoral thesis, diploma, homework, whatsoever scientific text? Before you start, think on what you will need to write it. You need not just any software, but a solution that will really help you through the process without causing tears and pain. I came up with 6 requirements that seem to me the most important ones:

  1. Stability – every crash might destroy hard work.
  2. Automatic indexing – a table of contents that updates automatically and kind of looks good
  3. Reference manager – I’ve got 73 References in my thesis. Usually you will have read a lot more articles and need to be able to insert them easily in your work. The Software should handle the numbering and sorting of your bibliography, because manually updating every reference is a hassle we don’t even want to think about.
  4. Pagenumbering – Roman, arabic, whatsoever: it should work without thinking to much about it.
  5. Formatting – 12 point text, 1.5 line spacing, this image belongs to this section. That’s about how much I would like to tell the program, the rest it should work out on its own.
  6. Justification – Type setting should be justified. Hyphenation should work automatically.

You were thinking of using Word (or any other standard word processor) because you already have it installed on your computer? Now let’s see how well it does with the requirements listed above:

  1. Stability – not so much. Or did your Word never crash? Now think a really long document. With pictures. Equations. References. Crash. Crash. Crash. If you thought you could just write away… no way. You need to split your document in pieces and try to put it together again before the end.
  2. Automatic indexing – Works kind of, but only works if you correctly used “Styles” to mark up different sections. Think a moment about having split the document and try to come up with a simple solution to create a table of contents for all of them with correct page numbering…
  3. Reference manager – try and get “Endnote” (299$ Price Tag) or “Reference Manager” (250$ Price Tag). Even if you have that much money you will find, that with more than 20 References in your document the editing process won’t run as smooth as you would like. Try to get a continuous count through all of your split documents…
  4. Pagenumbering – Roman? Arabic? Works but try to get it straight through your split documents…
  5. Formatting – Word is stupid. You will have to tell it how to do everything. What letter size would be good for my title? How should a subheading be sized? What would be a nice size for my page numbers? My headers should be different for pages where new chapters start…
  6. Justification – I never found out how to do hyphenation automatically in Word. Well anyway: justified text is full of nasty white holes with Word.

All in all it’s safe to say: use Word for your thesis and you will be sorry. Don’t say you have not been warned.

Next, let’s see how LaTeX does:

  1. Stability – Writing with LaTeX will be as stable as your favorite text editor. Because that is what you will use. For Macs I recommend Textwrangler. Edit your thesis as a single file or with multiple files whatever you want is possible without hassle. Crashes while editing my thesis: 0.
  2. Automatic indexing – Right where you want it, beautifully formatted without even so much as spending a thought on it. Updates automatically.
  3. Reference Manager – Get BibDesk for free and have more than Endnote can ever dream of having.
  4. Pagenumbering – across multiple files? No problem. Start roman. From here arabic. Done.
  5. Formatting – 12 pt, two-sided document with adapted page margins. Done. Never worry what letter size anything should have. LaTeX has sophisticated algorithms to take care of that.
  6. Justification – Talk about justificated typesetting… it just works. Never think about it. LaTeX will produce beautifully typeset text, perfectly justified. No nasty white spaces, just smooth text. Hyphenation? Already done.

Pretty obvious why everybody wanting to write something longer than a page should use LaTeX, is it not? The downside is, LaTeX is not a WYSIWYG-texteditor and when first trying to understand how everything works it might be a little confusing (to say the least). But it’s so worth the effort! Look for the next post to see how to get started!