Tag Archives: LaTeX

All you need is text – Markdown (via pandoc) for academia

Many students struggle to find an adequte format for their thesis. Ironically the advent of “modern” WYSIWYG programms seems to make it harder to consistently format a text.

While learning LaTeX may be a bit too much to ask for, markdown is a very minimal language that together with pandoc affords all typesetting needs for an academic paper. While source documents written in markdown can be opened and edited on any PC (or mobile), pandoc can translate it into beautifully formatted pdf and docx (if it is absolutely necessary) files. Specifically markdown implements:

• Headings, Subheadings
• Figures and tables
• Citations and References (here in APA6 but other styles are also possible) • You will need to edit the file paper_v1.md

See the example paper.

Once pandoc and latex is installed the following command generates a pdf.

pandoc -s -S --biblio biblio.bib --csl apa.csl -N -V geometry:margin=1in paper_v1.md -o paper.pdf

All files necessary to replicate and adopt the example can be found here .

Akademische Lebensläufe mit Latex und dem moderncv package

Alle Jahre wieder braucht man einen aktuellen Lebenslauf. Wenn man in der Wissenschaft arbeitet, besteht dieser zu 80% aus einer aktuellen Publikationsliste. Nach langem Ausprobieren und Vergleichen (Alternativen aus der großen Liste sind z.B.: currvita und europecv) habe ich mich dafür entschieden, meinen CV mit dem moderncv package, dass von Xavier Danaux entwickelt wurde, zu machen. Ich habe allerdings noch eine Anpassungen am outputstyle “plainyr” vorgenommen, um in der Literaturliste jeweils aktuelle Artikel zuerst zu nennen.

Das fertige Resultat findet Ihr hier: cv_hirschfeld_2012_03

Die Sources zum anpassen findet Ihr hier: latex_cv

Um das zu setzten müsst ihr die folgenden Schritte durchführen

  1.  pdflatex auf die tex-Datei anwenden: pdflatex source.tex
  2. bibtex auf die  *.aux Files der einzelnen Bibliographien anwenden: bibtex paper.aux
  3. pdflatex auf die tex-Datei anwenden: pdflatex source.tex

 

 

Goodbye Powerpoint – Slides with LaTeX and beamer

A couple of weeks ago I presented my first presentation with LaTeX. It took some time longer, and especially as the deadline was approaching I was very close to switching back to powerpoint. But now I am glad I didn’t, because I rediscovered the ABC of what I like about LaTeX approach.

  1. Automaticity: Once you learn LaTeX, you don’t have to make a reference list or table of contents
  2. Beauty: The beamer-themes just look really really good. They give the right amount of information on every slide, and leave ample space for your contents.
  3. Compatibility: As you are presenting PDFs you can be sure, that they will look similar across different computers.

Here is a minimal example of a presentation with table of contents, several slides, animation, images, references, and Umlauts. Of course, I am not the first to use the beamer class, I particularly like this introductory site because it has many examples for the different themes, and has both an English and German version. You will find many more if you just google for specific commands (e.g. “\usetheme{Warsaw}”). In any case, I hope you find the example useful, all files necessary to adapt it to your own needs can be downloaded here.

[de]Vor einigen Wochen habe ich meine erste Präsentation mit LaTeX gehalten. Die Vorbereitung hat einige Zeit länger gebraucht, und vor allem als sich die Deadline näherte, stand ich ganz kurz davor, zurück zu Powerpoint zu wechseln. Jetzt bin ich froh, nicht gewechselt zu haben, weil ich das ABC bezüglich was ich an LaTeX mag wiederentdeckt habe:

  1. Automaticity: Wenn du einmal LaTeX gelernt hast, brauchst du kein Literatur- oder Inhaltsverzeichnis mehr zu machen
  2. Beauty: Das Folienlayout sieht wirklich wirklich schön aus. Es wird die richtige Menge an Informationen auf jeder Folie geliefert, wobei ausreichend Platz für deine Inhalte gelassen wird.
  3. Compatibility: Wenn du PDFs präsentierst, kannst du dir sicher sein, dass sie auf verschiedenen Computern trotzdem alle ähnlich aussehen.

Here ist ein kleines Beispiel mit Inhaltsverzeichnis, einigen Folien, Animationen, Bildern, Referenzen und Umlauten. Natürlich bin ich nicht der erste, der beamer class nutzt: besonders mag ich diese (this) Einführungsseite, weil sie viele Beispiele für verschiedene Themen hat und sowohl englische, als auch deutsche Versionen. Noch viele weiter Beispiele findest du, wenn du für spezifische Kommandos googlest (z.B. “\usetheme{Warsaw}”). In jedem Fall hoffe ich, dass du die Beispiele hilfreich findest. Alle Dateien, welche nötig sind um es an deine eigenen Bedürfnisse anzupassen können here downgeloaded werden./de]

Reproducible Research = LaTeX + R + Jabref

[en]The concept of reproducible research with it’s core idea of being able to reproduce all figures, tables, and results in a manuscript is fascinating. The best way to implement this is by using R in combination with latex. However, it takes a while to get everything into place. There is some information about sweave on the authors’ webpage and  several others give great examples (here, and here).  However, these do not include citations, and as someone who needs Umlauts I also spent some time to find out how to include these. In the following I describe my final set of files that can be used to write small and not so small tutorials in statistics. All of which look like this example. Any comments are much aprecciated:

Overview

Stuff I installed: Texshop and Jabref. For both I set the standard encoding to UTF8.

Four files need to be in the same folder (“/temp/):

  1. the master-file that contains the text, R-code-chunks, and citations
  2. the bibtex-file that contains the references in bibtex-format
  3. Sweave.sty
  4. the R-skript that starts the sweave command and compiles the resulting Latex-document using pdflatex.

You can download the whole folder here.

Continue reading

JabRef

JabRef-Uebersicht

JabRef is a literature administration. Features are the administration of literature and the supply of this information in an BibTex-file for LaTeX user. But Jabref can also be quite valuable without LaTeX, at least if you want to administer your literature independent of the platform and the prducer

. Continue reading