My thesis workflow - Academic writing with a Markdown/LaTeX/Bibtex combination on OSX

Thesis workflow graphical display


Preliminary remarks

This description is still a work in progress. I´ll have to write the full text and create a new version of the graphical workflow to include bibtex for citation management. Stay tuned…

Updated 2016-08-03: Small changes in and a short workflow description

Needed software:

Short description of the workflow:

The basic workflow is easily described in a few words: I write my paper in the form of several markdown files that live together in one folder with a simple shell script called “” and some LaTeX files that include footer, header and some configuration settings. As an example you can take a look at the file “” containing the executive summary of the paper (actually right now it´s a dummy file):

\section*{Executive Summary}
\addcontentsline{toc}{section}{Executive Summary}

*Ziel* - Beeindrucken

*Vorgehen* - Spannend

*Ergebnisse* - Grandios

*Limitationen* - Keine

*Praktische Implikationen* - Alles graue Theorie

*Mehrwert* - Keiner, aber war schön

You might notice the two LaTeX macros in the first two lines. As this procedure is still work in progress I did not change those into markdown. I´ll have to check out how to create sections in markdown that will be taken into the table of contents when the typesetting is taking place.


The configuration is done in the “config.tex” file:

    Titel der Arbeit
    Lars Bartschat


    Marketing Executive Program 
    Westfälischen Wilhelms-Universität Münster
    Lehrstuhl für Mustermänner, Münster
    Prof. Dr. Mustermann
    Dipl.-Kfm. Mustermann

Basically this file is just defining a lot of LaTeX macros that will be used in the markdown files so that the structure can be reused in a comfortable way for the next paper. shell script:


# "translate" the markdown files into latex files

pandoc -f markdown -t latex ./ -o Executive.tex
pandoc -f markdown -t latex ./Abkü -o Abkürzungen.tex
pandoc -f markdown -t latex ./ -o Hauptteil.tex
pandoc -f markdown -t latex ./ -o Eidesstatt.tex

# concatenate all latex files into one

cat ./header.tex > output.tex
cat ./Executive.tex >> output.tex
cat ./Abbildungen.tex >> output.tex
cat ./Abkürzungen.tex >> output.tex
cat ./Inhaltsverzeichnis.tex >> output.tex
cat ./Hauptteil.tex >> output.tex
cat ./Literatur.tex >> output.tex
cat ./Eidesstatt.tex >> output.tex
cat ./footer.tex >> output.tex

# typeset the latex file and create a pdf file

latexmk -gg -pdf ./output

# rudimentary command line argument interpretation

if [ $# -eq 2 ]
        if [ "$1" == "push" ]
                # push all files into git repository with commit message
                /usr/local/bin/git add *
                /usr/local/bin/git commit  -m "$2"
                /usr/local/bin/git push
                echo "Huh?"
                exit 1
        echo "Not pushed to git repo!"

What does do?

The compile script just takes all the markdown files and uses pandoc to translate them into LaTex documents. In the next step all LaTeX documents will be concatenated into one “big” LaTeX file in the given order. Finally the LaTeX file is typesetted and a pdf file is written as output.

In the case that the user supplies two command line arguments, with the first being “push” and the second being the commit message, the whole project is commited and pushed into a git repository for version control and backup purposes.