Coder Social home page Coder Social logo

latex-thesis's Introduction

Thesis writing in LaTeX

LaTeX general

  • Install TeXLive. It’s the One True™ TeX distribution system.

  • Need help? texdoc <packagename> on the command line.

    • At the very least skim the documentation of every package you’re using, to look for gotchas and interesting options
  • Still need help? Google, http://tex.stackexchange.com

  • If you are Jon Snow (you know nothing): texdoc lshort – “The not so short introduction to LaTeX”

  • Learn the basics of typography: LaTeX supports you but it won’t coddle you

    • Use typographically correct punctuation and spacing
    • English quotes: “…” (or ``…'')
    • Need a minus sign: math mode!
    • Use wide margins, narrow text
      • But do use the margins when it makes sense
    • By all that’s holy: USE SINGLE LINE SPACING.
    • Correctly typeset gene names, protein names, species names (italic, straight, italic) …
  • Don’t use outdated packages

  • The golden rule of TeX: Use semantic markup: write macros to encapsulate style into semantically meaningful units

  • LaTeX is unforgiving, but not forthcoming with error messages. Use nag to get better warnings (see example template for usage).

  • \figure and \table are floating environments. They float. That is their purpose. If you really want figures with a fixed position (but consider this carefully), don’t use \figure, and use \captionof to create a non-floating caption.

  • Use latexmk to build your document

    • It automatically runs the required auxiliary programs (bibtex, biber …), and the necessary number of times
    • Want live preview? latexmk -pvc
    • Highly configurable, but works well out of the box
  • On OS X? Use Skim as the document viewer instead of Preview.app.

  • Use XeLaTeX/LuaTeX. Do not use pdfLaTeX

    • pdfLaTeX is old and revered – let it rest in peace
    • In particular, no support for UTF-8 (yes: not even with auxiliary packages)
    • No great support for non-8-bit fonts
    • latexmk -xetex
  • Want to change margins/metrics? Do not muck around with lengths, use geometry

  • Don’t use the standard document classes, use the replacements from KOMA-Script

    • Don’t be put off by the fact that KOMA’s \maketitle creates lots of pages. This is intentional – read the relevant section in the documentation.
  • Some bibliography managers allow exporting BibTeX references with custom cite keys (usually of the format Author:Year) – this makes usage with LaTeX vastly easier

  • For numbers and units in text, use siunitx. I recommend not using naked numbers in text at all (always use \num{x} instead).

  • todonotes for “TO DO”s. However, this interacts badly with classicthesis.

  • Avoid writing non-simple macros: programming in LaTeX is a nightmare. Use existing packages instead.

Thesis writing

  • Use Git from the start, commit changes religiously and have a look at gitinfo2 (helpful for the revision phase)

  • Organisation

    • One file per chapter
      • Use logical names, not chapter1.tex etc so the otder can be changed effortlessly
    • Have an outline handy (separate document)
    • Configuration separate from main document
  • Use classicthesis in combination with KOMA’s scrbook.

    • Based on best practices of print design and typography
    • No, its margins are not too wide
  • University of Cambridge templates exist. However, they are a typographer’s nightmare (cf. line spacing, text width) and extremely convoluted, thus hard to customise

Example document

The example file thesis.tex contains the outline for a thesis source document. Each chapter has its own file and is included via \input. Configuration and custom macros reside in config.tex. This is also where packages should be loaded.

.latexmkrc is the configuration for latexmk. At the moment it is empty except for a commented-out line which would cause it to pass the -shell-escape option to xelatex. This option is required by certain packages, such as minted.

Finally, the Makefile enables compilation via simple make verbs. To recompile the document, use

make
# or
make thesis

To trigger continuous background compilation for interactive preview, use

make preview

Requirements

The example file requires the following fonts to be available for successful compilation:

Download the fonts (for the last two, go on the website and click the “download”/arrow button) and install them on your system.

And finally

Need inspiration? Take a look here:

latex-thesis's People

Contributors

klmr avatar barzine avatar mxenoph avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.