I am a graduate student in statistics and am about to begin writing my thesis, having finished my analyses and theoretical work. I have used LyX in the past and am well versed in knitr and have some working knowledge of LaTeX, but I have been limited to working in it only within LyX. Before I begin writing my thesis, I wanted to write to this community for any advice on what to do and what not to do.

  • Have you learned anything that caused you to lose a lot of time in terms of reformatting your document or that caused you to pull your hair out?
  • Do you have any general words of wisdom you can impart?
  • Also, I'd appreciate any references to crash courses or documentation that you think would be a must read before I begin.

Thanks for help and any suggestions.

  • 1
    Have you look at: tex.stackexchange.com/questions/11/… ? Oct 20, 2015 at 6:14
  • 1
    Using LaTeX to write a PhD-Thesis
    – Johannes_B
    Oct 20, 2015 at 11:34
  • 2
    Asking for each person's experience is a way to having loads of answers, none of them of any particular help. That's not something which fits into how this site works, in my opinion.
    – yo'
    Oct 20, 2015 at 11:42
  • 1
    When I first read this question I thought as did @yo' that you'd get lots of unhelpful answers. I was surprised, and particularly pleased that many of the good ones come from relative newbies on the site. Oct 20, 2015 at 11:58
  • 1
    I think you and @yo' are both right. I think the answers already here provide most of what you might expect to get from the question, so if it's closed but remains visible it continues to serve you and the community, without attracting more forum-like posts. Oct 21, 2015 at 0:26

4 Answers 4


I graduated a few years ago and my thoughts are:

  1. Always use LaTeX, not LyX. (see comments for some reasons)
  2. Lose time at the beginning, thinking of which class you would like to use (book, memoir, classicthesis, ...) and what packages you might need. This will save time when you won't have much left
  3. Always try to be documented on the packages you're using. Reading the documentation might save you much time and may produce a better output
  4. I would recommend biblatex for bibliography, but the important part is never to neglect bibliography
  5. Use microtype for an even better look (microtypography)
  6. If you foresee some graphs/plots in your thesis, try doing some "fun" exercises with TikZ/pgfplots packages. It will make you accustomed to their syntax and the output they produce will definitely be a plus for your thesis.
  7. Prefer vectorial images (better quality)
  8. I would recommend using pdfLaTeX unless some features unique to LuaLaTeX or XeLaTeX are necessary.
  9. Do not try to reinvent the wheel. If you need anything that you think is strange, try and find a package that does that for you. Hopefully there will be a few that fit your needs

I hope this can be helpful. Good Luck.

EDIT: I added some points above

  • Excellent @ilFuria as well. Thanks so much for your wisdom as well. This is tremendously helpful! Oct 20, 2015 at 6:33
  • 1
    Can you please add the reasons for doing point no. 1, for people like me who do not know? Thanks :)
    – 299792458
    Oct 20, 2015 at 11:13
  • I'll add a comment here: I found that, sometimes, LyX produces some strange outputs, e.g. adds some unwanted spaces and such. Of course this can occur, I guess, with LaTeX, but you will have much less problems managing the LaTeX content, instead of trying to understand LyX behind the scenes work. Furthermore I used LyX, and I found myself typing LaTeX commands more often than not, just to do exactly what needed to be done. I think that having to compile to see results isn't that much painful, it only needs adjusting. And using LaTeX directly always leaves the author the most control.
    – Moriambar
    Oct 20, 2015 at 11:25
  • (+5 for 'Use LaTeX, not Lyx, but -4 for mentioning/recommending classicthesis )
    – user31729
    Apr 13, 2017 at 20:04

I am not familiar with LyX so I am going to suggest you work with LaTeX directly.

First and foremost: use LaTeX as a markup language and not as a way to put text on a page. Let me elaborate. If you write And he said \textit{Bla bla bla}, what an \textit{a priori} statement you are just telling LaTeX that you want some italics words. If you write And he said \directquote{Bla bla bla}, what an \latin{a priori} statement you are giving structure to your text. Of course you may need macros that are not defined in any package, as in our example \directquote and \latin, but with the help of \newcommand you can define them (for example \newcommand{\directquote}[1]{\textit{#1}}). In this way, first your LaTeX code becomes more meaningful, second it becomes more maintainable: suppose you want to change how direct quotes are typeset. You just have to change the definition of \directquote and you are done.

Version control

Do use version control programs like git. Since you are the only author you do not need fancy workflows, just spend an hour learning the very basics of init, clone, add, commit and checkout. I also advise you to setup a free account at bitbucket.com or gitlab.com to get free personal repositories that you can use as backups.

Class choice

I was very satisfied with memoir for two main reasons:

  1. it is well documented
  2. it is easy to customise

Point 2 allows you to proceed as follows: just write your text focussing on the content's structure. At any stage you will be able to adjust the typeset output to the needs of drafting or meeting your university's regulations.


Memoir already incorporates some of the common packages. Let me put a list of the ones that I feel more important when writing a thesis

  • amsmath and mathtools for all things math
  • biblatex (+ biber) extremely well designed and documented package for proper bibliography (fully compatible with BibTeX bibliography files)
  • tikz and pgfplots for graphics. Excellent documentation, excellent output
  • enumitem control your itemize and enumerate in a organised way
  • cleveref for writing \cref{fig:bla} to obtain figure~\ref{fig:bla} and more
  • csquotes for enclosing text in quotes properly
  • listings for typesetting code
  • microtype just include \usepackage{microtype} and the paragraph making algorithm will be tweaked for optimal results.

Have a quick look at the packages documentation to get started.


  • I would stick to pdflatex for compilation unless you need fancy fonts, then I would go for lualatex
  • latexmk is an absolute time saver for compiling your document
  • JabRef is great for managing your .bib files

Personally, I like to use Sublime Text 3 + the LaTeXing plugin for my workflow.

Document structure

Break your document in small manageable files. There will be a main file, say thesis.tex, with your preamble and some \include pointing at the files containing the chapters.

A suggestion:

thesis.tex       YOUR MAIN FILE
                 HOW TO COMPILE or any quirks of your setup.
                 You will not regret this
    topic1.bib   divided by topic/whathever if huge
    fig2title.pdf ...
    app1.tex ...

Consider variations if you have multiple parts or if you prefer to keep the proofs folder local to each chapter.

  1. Check your department/school intranet to see if there are any existing LaTeX templates people had made in the past
  2. Have a look at the list of most used packages and see if they are of any help to you. Google the others depending on what you need, for example, functionality like glossaries and acronyms, glossaries can save a lot of time.
  3. Google a lot for the recommended usage of a package, which ones are superseded/obsolete, e.g. subfig supersedes subfigure
  4. Plan and be very consistent with formatting and Mathematical notations (font style, italics, etc)
  5. Use BibLaTeX with biber
  6. If you use MATLAB to produce figures, use the excellent matlab2tikz package on MATLAB file exchange to produce high fidelity graphics for LaTeX pgfplots+tikz. You can even modify legend/axis labels directly in LaTeX, saving a lot of time.
  7. The people on this site have been so kind and have gone beyond call of duty to help me with numerous problems big to small on my thesis, don't be afraid to ask lots of questions (provided you tried to search for similar questions on the site and found no answer)
  8. Find a good LaTeX IDE, ideally one supporting projects and file organisation, so to facilitate what others suggested (individual chapter files and figures in separate folders, etc).

Hope that helps, all the best!

  • 1
    +1 for checking to see if there is an existing template for your department. The rules for formatting are set by the department, so it can save a lot of time if there is a custom class or something that sets this all up for you.
    – xxxxxxxxx
    Oct 20, 2015 at 11:00
  • @MorganRodgers The rules for the formatting might be set by the department. In none of my 2 universities, there is any restriction other than "if you want us to print it for you, it has to be soft-cover A4" in one of them and "it should be A4 hardcover and the cover has to contain some minimal information" in the other one.
    – yo'
    Oct 20, 2015 at 21:05
  • @yo' In my department, there were rules about the margins, spacing, page numberings, header styles for chapters/sections, etc. etc.
    – xxxxxxxxx
    Oct 20, 2015 at 21:21

I graduated a few years ago, so things might have changed a bit, here is my 2 cents anyway.

  • Don't use Lyx, you will get into a lot of trouble trying to convert it to LaTeX later (almost all my friends who used Lyx ended up doing that). Just use LaTeX!

  • Divide your thesis into chapters (duh!) And let each chapter be its own file. Then include them all into a master wrapper file.

  • Keep your figures in one figures directory (maybe one directory per chapter? Wherever makes sense) and import the graphics path at the beginning of each file. If you can, create your graphics with Gnuplot. It gives you a lot of flexibility.

  • If you can/know, use "make files" to create your figures (if you use Gnuplot, or some other tool that allows scripting, you can do this with R at well). The goal (in my opinion) should be to have the raw data and scripts that can produce the necessary PS/EPS/PDF files for graphics. You can always reproduce your graphs however you need them. The worst (again IMO) would be to just have png files that you don't know how were created 6 months down the road.

  • Although not directly related to a thesis, check out beamer for creating your presentation slides. You can reuse a lot of the same figures, pieces of code, etc and the consistency between the thesis and the slides is something that I appreciated.

  • Definitely use version control. Put everything under git and commit often. Set up a remote repository so you can back things up automatically. Losing work when you're writing a thesis is catastrophic. On github, I think you have to pay for a private repository. Another approach could be keeping everything in Dropbox.

  • Use Mendeley to manage your bibliography. Start right away if you haven't done so yet and add your papers. Make sure you keep your bib file up to date. Try to have a master bib file that has all the papers you need, get accustomed to the papers you need to cite more and come up with a way of referring to them (something like "JDoe_2003" for a paper printed in 2003 by John Doe. It makes life easier if you know your major papers like this. Look into the style of citations you want/need to use. When I was writing my thesis, Mendeley did not have the greatest support for different styles, it might have been better now though.

I will update this if I can think of anything else. BTW, good luck! :)

  • this is awesome. Thanks so much for this. I really appreciate the excellent advice. I plan to keep the question open for several weeks before accepting any answer so please feel free to come back and update this as you see fit. Thanks again for taking time to help out a complete stranger! Oct 20, 2015 at 6:32
  • 1
    @StatsStudent Some additional comments: Bitbucket offers private Git repositories for free. The bibliography manager has no influence on the bibliography and citation styles, that is decided by what you do in your LaTeX code. Which bibmanager you use is of course a question of personal preference, I use Zotero with the BetterBibTeX extension, JabRef is another popular one. Oct 20, 2015 at 7:11
  • @Torbjorn T. I believe the style affects the bibliography file and therefore the manager. At least when it comes to how you abbreviate the journal names. Look here: feedback.mendeley.com/forums/4941-general/suggestions/… Oct 20, 2015 at 12:01
  • @StatsStudent At the time, I tried Mendeley, Zotero and a few others and liked Mendeley the best. I think it still is the best for the features you get and its ease of use. Oct 20, 2015 at 12:01
  • Ah, I see, didn't think of that. Sorry. Oct 20, 2015 at 12:19

Not the answer you're looking for? Browse other questions tagged .