1 of 13

LATEX TUTORIAL

Jackson Benning

2 of 13

OVERVIEW OF TODAY

  • What is LaTeX?
  • Example 1: Basic Document
  • Where to use LaTeX/Setup
  • Basics of LaTeX
  • Example 2: Lab Report
  • Example 3: Resume
  • Resources

3 of 13

WHAT IS LATEX?

  • A typesetting language, think a programming language to make documents beautiful
  • It is built for anything mathematical related (research papers especially)
  • Microsoft word is built using “what you see is what you get” mantra of formatted text
  • LaTeX is written in plain text with markup tagging
  • Why use LaTeX? Have you ever had the feeling when using word or docs that you just couldn’t get something to be in the exact right place? With LaTeX you can.

4 of 13

EXAMPLE 1: BASIC DOCUMENT

5 of 13

WHERE TO USE LATEX? AND SETUP

  • Most university computers have LaTeX installed already
  • Can download a package for Windows, Mac, or Unix
  • Main packages are: MacTex(for Mac) and MikTex(for Windows)
  • Main places to use: Overleaf, Normal text editor with built in viewing

6 of 13

BASICS OF LATEX: IMPORTANT CHARS

  • There are some important characters and a characteristic of LaTeX
  • Characters:
    • “\”: Starts a typesetting command
    • “{}”: Any arguments are put inside the curly braces
    • ‘\\”: Newline without a new paragraph
    • “%”: Used to start a comment, everything after on the same line is treated as such
  • Characteristic:
    • LaTeX wraps adjacent lines as if they were part of a same paragraph. Insert extra return for a new paragraph

​

​

7 of 13

BASICS OF LATEX: DOCUMENT CLASS

  • Document classes is how LaTeX interprets a particular document
  • Main available types are:
    • Article: articles in scientific journals, short reports, program documentation
    • Report: longer reports containing several chapters, small books, thesis work
    • Slides/beamer: for presentations
  • Starting a new document:

\documentclass{article}

​

\begin{document}

%your writing here

\end{document}

​

8 of 13

BASICS OF LATEX: SECTIONING

  • Sectioning is to create different sections and subsections in your documents.
    • \section{name of section}: creates a section with the specific name, is numbered
    • \subsection{name of subsection}: creates a subsection under the larger section
    • \subsubsection{name of subsubsection}: I think you get the idea
    • \paragraph{name of paragraph}: like section but not numbered
    • \subparagraph{name of subparagraph}: like paragraph but indented, goes under a paragraph

9 of 13

BASICS OF LATEX: LISTS, TABLES, REFERENCES

  • Using the tabular environment(see environments next) can create very easy tables as shown below.
  • Can create ordered or unordered lists or sublists as shown on the right.
  • References/labels:
    • Can refer to section numbers, figures, equations, etc.
    • For sections, after the section command, on the next line put \label{labelname}. Then can refer to the section using \ref{labelname} anywhere.

​

10 of 13

BASICS OF LATEX: PACKAGES

  • Just like any other programming language, people can build packages that give the programming language to do certain things and other people can download said packages.
  • Most packages are already installed by default
  • To use them, do a \usepackage{packagename} before you begin your document

11 of 13

ADVANCED LATEX: CIRCUIT DIAGRAMS/SYNTAX HIGHLIGHTING

  • Include this because most of us here are EE/Compe majors
  • Can use the circuitikz package to create circuit diagrams
  • Can use the listings package to use syntax highlighting for various languages that you include code snippets in your document.

12 of 13

EXAMPLES

13 of 13

RESOURCES

  • overleaf.com: has good tutorials on the basics of LaTeX
  • tex.stackexchange.com: stack exchange specifically for LaTeX issues
  • https://latex-tutorial.com/: Good basic LaTeX tutorial