LaTeX and more

Since LaTeX is recommanded in VV186 and many other courses and LaTeX is unfriendly to newbies, I’m going to share my LaTeX writing style.

ShareLaTeX

ShareLaTeX is an online LaTeX editor, and even more it can compile LaTeX documents and return the PDF to you. It also enables you to collaborate with your colleagues. I cannot see any necessity to install local LaTeX environment since you can use ShareLaTeX online and be free from trouble.

Predifitions and Macros

I have used some packages, defined my own commands, and are going on. This part may be kept updating.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath} %general math format
\usepackage{amssymb} %special math symbols(Blackboard Bold)
\usepackage{enumitem} %advanced list
\usepackage{mathtools} %special math symbols(ceiling)
%change list behavior
\setenumerate[1]{label={\textbf{\arabic*.}}, itemsep=2em}
\setenumerate[2]{label={\roman*)}, leftmargin=-3em, itemsep=1em}
\linespread{1.2}
%define ceil, floor and abs functions
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
%add macro for common limits
\newcommand{\limn}{\lim\limits_{n\to\infty}}
\newcommand{\limx}{\lim\limits_{x\to\infty}}

Commonly used tricks

Tricks noted below may require packages used above.

  • Aligned equations

    1
    2
    3
    \begin{align*}
    ... %equations
    \end{align*}

    and place & before every $=$, $<$, $>$, $\leq$, $\geq$, etc.

  • Horst-like sectioning

    1
    2
    3
    4
    5
    6
    7
    \begin{enumerate}
    \item %start a Exercise
    \begin{enumerate}
    \item %start a sub-question
    ...
    \end{enumerate}
    \end{enumerate}
  • Triangle over equal sign: \triangleq, producing $\triangleq$

  • Conditions under quantifier: \underset{\varepsilon > 0}{\forall}, producing $\underset{\varepsilon > 0}{\forall}$. It works similarly for other conditions and quantifiers.

  • Binomial coefficient: \binom{n}{k}, producing $\binom{n}{k}$

Share