LaTeX
In computer science, LaTeX is a software system for document preparation. It is used for high-quality typesetting of technical and scientific documents. LaTeX uses markup tagging conventions to define a document's structure, stylize text throughout a copy, and add citations and cross-references.
Typewriterโ
\texttt{Lorem Ipsum}
TOCโ
\tableofcontents
H1โ
In preamble
\title{My Title}
\author{Sunghyun Cho -- [email protected]}
\date{2023-09-07}
\maketitle
H2โ
\section{Lorem Ipsum}
H3โ
\subsection{Lorem Ipsum}
Tableโ
\begin{center}
\begin{tabular}{ll}
Col 1 & Col 2 \\ \hline
Value 1 & Value 2 \\
Value 3 & Value 4 \\
\end{tabular}
\end{center}
Verbatimโ
\begin{verbatim}
\NewDocumentCommand{Lorem Ipsum}
\end{verbatim}
Big-Oโ
Big-$\mathcal{O}$
Ordered Listโ
\begin{enumerate}
\item $f(n) = 2^{2n}$
\item $f(n) = 2^{n+1}$
\item $f(n) = 2^{n}$
\item $f(n) = 2^{\frac{n}{2}}$
\end{enumerate}
Unordered Listโ
\begin{itemize}
\item $f(n) = 2^{2n}$
\item $f(n) = 2^{n+1}$
\item $f(n) = 2^{n}$
\item $f(n) = 2^{\frac{n}{2}}$
\end{itemize}
Font Sizeโ
Globalโ
In preamble
\documentclass[12pt]{article}
\documentclass[14pt]{extarticle}
Font Heightโ
In preamble
\linespread{1.6}
Page Breakโ
\pagebreak
Boldโ
\textbf
Variables and Footersโ
%% Preamble %%
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt} % Remove line
%% Doc %%
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,LO]{\myname}
\fancyfoot[CE,CO]{\mytitle}
\fancyfoot[RE,RO]{\thepage}
Algorithmโ
preamble
\usepackage{algpseudocode}
\usepackage{algorithm}
\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}
\begin{algorithm}
\caption{An algorithm with caption}
\begin{algorithmic}
\Require $n \geq 0$
\Ensure $y = x^n$
\State $y \gets 1$
\State $X \gets x$
\State $N \gets n$
\While{$N \neq 0$}
\If{$N$ is even}
\State $X \gets X \times X$
\State $N \gets \frac{N}{2}$ \Comment{This is a comment}
\ElsIf{$N$ is odd}
\State $y \gets y \times X$
\State $N \gets N - 1$
\EndIf
\EndWhile
\end{algorithmic}
\end{algorithm}
\listofalgorithms
Graphโ
\begin{center}
\begin{tikzpicture}[main/.style = {node distance={15mm}, thick, draw, circle}]
\node[main] (H) {H};
\node[main] (A) [above right of=H] {A};
\node[main] (B) [right of=A] {B};
\node[main] (C) [right of=B] {C};
\node[main] (S) [below right of=C] {S};
\node[main] (D) [below right of=H] {D};
\node[main] (E) [right of=D] {E};
\node[main] (F) [right of=E] {F};
\draw[->] (H) -- node[midway, above, sloped] {5} (A);
\draw[->] (A) -- node[midway, above] {6} (B);
\draw[->] (B) -- node[midway, above] {7} (C);
\draw[->] (C) -- node[midway, above, sloped] {6} (S);
\draw[->] (D) -- node[midway, above, sloped] {5} (B);
\draw[->] (B) -- node[midway, above, sloped] {4} (F);
\draw[->] (H) -- node[midway, above, sloped] {8} (D);
\draw[->] (D) -- node[midway, above] {4} (E);
\draw[->] (E) -- node[midway, above] {3} (F);
\draw[->] (F) -- node[midway, above, sloped] {6} (S);
\draw[->] (A) -- (B);
\draw[->] (B) -- (C);
\draw[->] (C) -- (S);
\draw[->] (H) -- (D);
\draw[->] (D) -- (E);
\draw[->] (E) -- (F);
\draw[->] (F) -- (S);
\draw[->] (D) -- (B);
\draw[->] (B) -- (F);
\end{tikzpicture}
\end{center}
Sumโ
\sum_{i=0}^k 2^i
Big Parenthesisโ
\left( {n \over n} \right)
Arrowโ
\rightarrow
\leftarrow
Quoteโ
`` <quoted text here> ''
Force Locationโ
[htbp]