LaTeX
A random collection of things archived for future use.
General
Section titled General- Tables Generator
- Setting
Default table style
toBooktabs table style
can be nice.
- Setting
- Equation Editor
- For looking up rarely used symbols.
- Include your figures/graphs in
.pdf
format instead of as a rasterised image (e.g,.png, .jpg
).
Commands
Section titled Commands\cite{}
\Cref
and\cref
(cleverref)\footnote{\href{https://google.com}{Google}}
, maybe even\url{https://google.com}
, or a file in CWD\href{run:./file.txt}{File.txt}
. See Overleaf - Hyperlinks.\today
, for the current date (day; updates every compile).\num{200000}
will print200 000
. Can use\usepackage[binary-units]{siunitx}
for this.- Rounding commands
\newcommand{\roundup}[1]{\ensuremath{\lceil#1\rceil}}
\newcommand{\rounddown}[1]{\ensuremath{\lfloor#1\rfloor}}
Symbols
Section titled Symbols\cdot
for•
.\mathbb{N}
for Math blackboard bold font, e.g., ℕ.\bot
and\top
for ⊤ and ⊥.\textasciitilde
for ~.
Custom Sections
Section titled Custom SectionsParagraph Spacing
Section titled Paragraph SpacingSimilar to Word (you probably don’t want this).
Enumeration
Section titled EnumerationAlphabet
Section titled Alphabeta), b), c)…
Custom
Section titled CustomCreate an enumeration with a custom pre- or postfix. Instead of 1, 2, 3, or A, B, C, you use FR1, FR2 (e.g., for functional requirements). Setting the ref=
ensures that \cref{}
is as intended (e.g., FR1, FR2). Of course if you use a reference, then you can easily click on it to view the item (e.g., requirement).
Source: https://tex.stackexchange.com/a/229542
Algorithms
Section titled AlgorithmsHighlighted Code
Section titled Highlighted CodeUse the minted package. AFAIK requires a certain environment (e.g., with Python) if you’re compiling your LaTeX locally.
Proofs
Section titled ProofsSee: Overleaf - Theorems and proofs.
Graphs
Section titled GraphsBasic.
Empty vertices.
Positioning
Section titled PositioningTwo Figures Side-By-Side
Section titled Two Figures Side-By-SideIn a 1 column document, this will display two figures side-by-side (so each 50% of the width). Works with TikZ and other graphics (e.g., images).
Two Column Document
Section titled Two Column DocumentGraphic spans 1 column.
Graphic spans 2 columns.