Markdown vs latex for thesis

Any markdown flavor is indeed a better option than LaTeX to focus on contents and format a document easily with a decent format, no doubt. But the paradise vanishes when you need more than standards sections and bulleted list. Simple formatting options such as centering an image or making two columns are not available.

This is not a criticism of markdown: the purpose of the markdown is to be a very lightweight markup language and perforce should be simple code to make a simple format. This is enough in many cases but not all, and this explain the why there are so many markdown flavors, adding this or that feature, with the result that it is no longer so easy to use (especially when you will need aware of the differences among markdown flavors).

Admittedly, even the most complex flavor is still far easier than LaTeX, but still is rather limited. With LaTeX you have a longer learning curve and it is not so handy, but you can make almost anything you can imagine with respect to document formatting, including drawing (diagrams, statistical graphs, chemical formulas, etc.) and there are are no LaTeX flavors (Plain TeX or ContTeXt are distinct enough not to cause any confusion). Macros, which allow to express complex formulas using readable LaTeX code entities, and modify them seamlessly if needed, are a game changer as well.

So the right decision depends on what you expect of each markup language. A Swiss knife is not the best knife to cut the steak but is better (safer) than a table knife for removing screws, cutting paper, and almost any other purpose.

That said, the good news is that you can use the two knifes at the same time, i.e., you could mix LaTeX with Markdown or Markdown with LaTeX even in the same plain text file.

As suggested in the comments, you can make a LaTeX document using the markdown package (see also the CTAN topic Markup) to simplify some parts as nested lists.

Or you can use one or the more powerful markdown flavors, as Rmarkdown, but write some LateX code inside when this is not enough, for instance, to include a minipage or a complex table that cannot be made in markdown. Pandoc will pass this LaTeX parts as unchanged code when producing the PDF (via LaTeX) or ignore it in another outputs as HTML.

Another part of this integration could be a custom LaTeX template for pandoc (for which you would need a basic knowledge of LaTeX ) and/or YAML headers in the markdown file to have the control over the LaTeX preamble (pass macro definitions and packages to load).

Especially for theses or books, another interesting possibility using Rmarkdown (files with .Rmd extension) is the LaTeX and R integration (R is a statistical language) in a R-noweb document (files with .Rnw extension) via knitr (a R package) with child .Rmd files. The main .Rnw document could be basically a typical LaTeX document that includes, via \include, \input or another LaTeX method LaTeX (.tex, not .Rmd) subdocuments. The trick is that there is also an R chunk in the preamble that allows knitr to call to pandoc during the compilation, and this would make the markdown-LaTeX conversion of child files, so you only have to work with the .Rmd files and compile the .Rnw main file, without the risk of forgetting to update the .tex files

Example:

Chapter1.Rmd:

# My first Chapter
This is a {\huge first} chapter $E=mc^2$   

Thesis.Rnw:

\documentclass{book}
<<calltopandoc, echo=F,include=F, engine='sh'>>=
pandoc Chapter1.Rmd --chapters -f markdown -t latex -o Chapter1.tex
@
\begin{document}
\include{Chapter1}
\end{document}

Being a mathematician, for sure you will appreciate also that this allows you to include R outputs (as plots or results of a linear regression) inserting another R chunks (now with the default R engine) in the .Rmd files:

```{r test, echo=FALSE}
2+3
```

as well as in the .tex parts:

<<test,  echo=FALSE>>=
2+3
@

I wrote my PhD thesis in the field of software engineering. So my comments are influenced by the requirements of that field.

The learning curve for LaTeX is steep and the payback is terrific. It is worth making the effort.

For a start, you should locate and start with an existing thesis .tex file. There are many available. Check within your own faculty and with peer institutions. It is always easier to start with something that almost works.

You will probably be required to write and submit several papers during your candidature. Most journals provide templates to suit their publications. Typically you only need to change a line or two in your files to re-generate your paper for a different publication.

When you hit stumbling blocks, check this site. Most problems have been encountered by others before you and have already been solved. No need to struggle alone.

Having said the above, I use markdown to generate documentation and other material that I publish on the web. LaTeX is too heavy duty for that purpose. The key takeaway is that when writing a thesis, the bulk of the effort is in thinking and rewriting, not in futzing with formatting issues.


@Fran's response is excellent. I'm in the position of writing my thesis right now, and I've decided to use the Bookdown package, which allows you to stitch together multiple .Rmd files into a final PDF document using pandoc.

https://bookdown.org/yihui/bookdown/

There are also some dedicated R packages such as thesisdown that is specifically designed to facilitate this exact process.

https://github.com/ismayc/thesisdown