# Praktische LaTeX Packages für wissenschaftliche Arbeiten

(bislang nur Englisch)

Academic publications in the area of computer science (actually, most natural sciences, as well) are often prepared using the LaTeX typesetting system. LaTeX is great for a number of reasons. It separates content from presentation and, thereby, allows authors to concentrate on one without worrying too much about the other. While pure LaTeX already offers a large number of options for authors, its full power really stems from the abundance of specialized packages available for almost everything related to typesetting and page layout.

During years of working with LaTeX documents, some of these packages have proven to be incredibly useful. Thus, here is a selection of LaTeX packages I use on a regular basis:

## The obligatory ones

There is a number of packages that really should be found in every document preamble.

### inputenc and fontenc

\usepackage[utf8]{inputenc}

\usepackage[T1]{fontenc} For christs sake – use inputenc with the utf8 option, and encode your files with UTF-8! I don’t even know why this isn’t part of the standard LaTeX setup. I really thought, file encoding was solved with Unicode like decades ago… but again and again, I stumble across documents with misrepresented umlauts and the likes – all due to a mix up in file encodings. Just use UTF-8 consistently and be done with this once and for all. By now this should be possible on all major operating systems. The fontenc package will ensure that TeX knows how to encode non-ASCII symbols properly, thus producing a clearer layout.

### graphicx

\usepackage{graphicx} Most likely you’ll want to include figures in your document. Here, the graphicx package is the way to go. It’ll not only allow you to include PNG and JPEG files, but also PDF, which is a nice way to have vector graphics (and thus stop caring about resolutions, DPI, and stuff like that). While SVG is not natively supported, it is usually easy enough to load an SVG into a tool like Inkscape and convert it to PDF.

## The useful ones

### hyperref

\usepackage{hyperref} Whenever you want to integrate PDF documents for online viewing in a nice way, the hyperref package is the way to go. Not only will it make internal links clickable, it also provides a nice way to encode URLs. Indeed, encoding URLs properly (and making them clickable in a PDF) is typically the main reason for me to use this package.

### todonotes

\usepackage{todonotes} The todonotes package offers a nice way to include TODO marks in the margin of your text. Most texts will be written over a period of time, and you might want to note down which section still needs some work. This is even more useful when collaborating in a team. You can even use it to mimic the „Insert comment“ functionality of LibreOffice or MS Word. Good to point out issues in the text to your coauthors.

## The fancy ones

While you can do without these packages, using them properly will make your content look infinitely more polished and pleasing.

### booktables

\usepackage{booktables} Booktables is a package that is incredibly simple, while at the same time creating stunning results when used properly. Every once in a while, you will want to depict data by using a table. Now, creating tables in LaTeX usually tends to be a nuisance, at best. And, unfortunately, unlike a lot of other defaults, the typical LaTeX tables don’t really look that good. Now, while booktabs doesn’t change the syntax of LaTeX tables, it does give you some hints (and the respective commands, of course) on how to layout data in a good and beautiful way. I definitely recommend to take a look at the manual. Sometimes, a layout can already be significantly improved by following simple hints, such as „Avoid vertical lines whenever possible“.

### pgfplotstable

\usepackage{pgfplotstable}Now, while booktables deals with the generic layout of tables, pgfplotstable really gives you the full, fine grained control on table layout you were missing in pure LaTeX. Plus, it even allows you read your data from a Comma Separated Values (.csv) file, thereby avoiding the lousy syntax of ‚&‘ (for column separation) and ‚\\‘ (for line separation) altogether, instead enabling you to use any CSV-capable software (e.g., Libreoffice) to organize your data. How awesome is that?!

### tikz

\usepackage{tikz}The tikz package provides a specialized syntax to create diagrams. Think of it as a way of incorporating ASCII-diagrams and rendering them nicely in TeX. The downside is, that it does have quite a steep learning curve. The upside – all text in your diagrams will be fully controlled by the LaTeX renderer. Stop worrying about varying font sizes and families in your diagrams. This will really make your diagram more polished and more easily readable.

## Conclusion

There’s a huge bunch of LaTeX packages out there. For almost anything to do with typesetting there’s a package. However, for some of those packages I keep coming back again and again. As a scientist, the eight packages listed here are my daily bread and butter. But of course, there’s more. I might write about more specialized packages in the future.

## Resources

The LaTeX Wikibook tends to be an excellent source of information. Also, the Tex – Latex Stackexchange website has helped me in countless occasions. The packages themselves are typically found on CTAN – usually together with extensive documentation. If you know more, please let me know :)

Dieser Eintrag wurde veröffentlicht in LaTeX und getaggt als . Fügen Sie den permalink zu Ihren Favoriten hinzu.

Kommentare sind geschlossen.