LaTeX Basics
by Henrison Hsieh

Here are the files that we made during the session: 

(Some parts of this are based on notes from Brian Buccola, which can be found here: https://github.com/brianbuccola/latex-tutorials)

Why LaTeX?

  • Free + Open Source
  • Uses very portable (and typically stable) file formats (text and PDF)
  • Very extensible (lots of packages to do many different things)
  • Why not LaTeX?
  • Learning curve
  • Some things that you’re used to might be a little less intuitive to do in LaTeX
  • But this is one thing this tutorial series will try to address!

What is LaTeX?

  • A markup language (like HTML) used for typesetting documents 
  • Use text to specify formatting and other similar information
  • In Word, one way to make a word boldface is to highlight it and click the [B] button
  • In a Markup language, you do this with plain text!
  • In HTML, you would do this:  <b>word</b> 
  • In LaTeX you would do this:  \textbf{word} 
  • The file you type up isn’t the final product; you run it through another program to get the result
  • For HTML: Web Browser
  • For LaTeX: some LaTeX interpreter

LaTeX Setups

  • Plain Text Editor + Typesetting on the command line
  • e.g. Notepad or Textedit
  • Not really recommended, but you can if you really really wanted to!
  • Dedicated LaTeX editors:
  • e.g. TeXShop, Texpad, etc.
  • Usually at least one will come with your distribution
  • Usually has shortcuts/autocomplete for commonly typed text strings
  • Syntax highlighting
  • Handles typesetting for you
  • (Fancier) Text editor + LaTeX package:
  • e.g. Sublime Text, Atom, vim, etc.
  • You might have a favorite text editor already
  • There is likely a package or extension you can download to get much of the functionality of a LaTeX editor
  • Online:
  • e.g. Overleaf, ShareLaTeX, etc.
  • Can avoid having to install several GB of stuff
  • Usually have some features to facilitate collaboration
  • Downside: Might be a little less flexible
  • There are also a number of different flavors of (La)TeX! But you don’t have to worry about this for the most part.

LaTeX Document Structure

2 Major Parts

  • Preamble: Major formatting information, document-wide settings, packages, definitions (more on this last one next week)