Typography & Layout

Text Formatting, Fonts & Environments

Master LaTeX font styles, semantic emphasis, font sizes, custom list environments, blockquotes, and typographic characters.

Text Styles & Formatting

Text Styles & Formatting

Comprehensive syntax, arguments, options, and copyable snippets for text styles & formatting.

Command Mandatory { }

\textbf{text}

Bold text

💡 Deep Dive Explanation & Options

Bold Font: Renders text in boldface weight. For bold math letters use \mathbf{...} or \boldsymbol{...} for bold Greek symbols.

Example Code
\textbf{important}
Command Mandatory { }

\textit{text}

Italic text

💡 Deep Dive Explanation & Options

Italic Font (Slanted): Renders text in slanted italic serif typeface. If text is nested inside already-italicized passages, prefer \emph{text}.

Example Code
\textit{Physica Scripta}
Command Mandatory { }

\textsl{text}

Slanted text

Example Code
\textsl{slanted note}
Command Mandatory { }

\textsc{text}

Small caps text

Example Code
\textsc{Ramanuj Gupta College}
Command Mandatory { }

\texttt{text}

Monospace/typewriter text

Example Code
\texttt{goscat.py}
Command Mandatory { }

\textrm{text}

Roman family text

Example Code
\textrm{normal roman text}
Command Mandatory { }

\textsf{text}

Sans-serif text

Example Code
\textsf{sans-serif text}
Command Mandatory { }

\textup{text}

Upright shape text

Example Code
\textup{upright text}
Command Mandatory { }

\textmd{text}

Medium weight text

Example Code
\textmd{medium weight text}
Command Mandatory { }

\emph{text}

Emphasized (usually italic) text

💡 Deep Dive Explanation & Options

Context-Aware Semantic Emphasis: In upright text, \emph{...} produces italics. In italicized text, \emph{...} switches back to upright font automatically.

Example Code
\emph{note this carefully}
Command Mandatory { }

\underline{text}

Underlined text

Example Code
\underline{key result}
Command Mandatory { }

\uline{text}

Underlined text (soul/ulem package)

Example Code
\uline{underlined phrase}
Command Mandatory { }

\sout{text}

Strikethrough text (ulem package)

Example Code
\sout{deleted phrase}
Command Mandatory { }

\textsuperscript{text}

Superscript text

Example Code
1\textsuperscript{st}
Command Mandatory { }

\textsubscript{text}

Subscript text

Example Code
H\textsubscript{2}O
Command

\tiny

Sets tiny font size

Example Code
{\tiny tiny text}
Command

\scriptsize

Sets script font size

Example Code
{\scriptsize script text}
Command

\footnotesize

Sets footnote font size

Example Code
{\footnotesize footnote-sized text}
Command

\small

Sets small font size

Example Code
{\small small text}
Command

\normalsize

Sets normal font size

Example Code
{\normalsize normal text}
Command

\large

Sets large font size

Example Code
{\large large text}
Command

\Large

Sets larger font size

Example Code
{\Large larger text}
Command

\LARGE

Sets even larger font size

Example Code
{\LARGE even larger text}
Command

\huge

Sets huge font size

Example Code
{\huge huge text}
Command

\Huge

Sets largest font size

Example Code
{\Huge largest text}
Command

\bfseries

Switches to bold series (declaration form)

Example Code
{\bfseries bold text}
Command

\itshape

Switches to italic shape (declaration form)

Example Code
{\itshape italic text}
Command

\slshape

Switches to slanted shape (declaration form)

Example Code
{\slshape slanted text}
Command

\scshape

Switches to small caps shape (declaration form)

Example Code
{\scshape small caps text}
Command

\ttfamily

Switches to typewriter family (declaration form)

Example Code
{\ttfamily typewriter text}
Command

\sffamily

Switches to sans-serif family (declaration form)

Example Code
{\sffamily sans-serif text}
Command

\rmfamily

Switches to roman family (declaration form)

Example Code
{\rmfamily roman text}
Command

\mdseries

Switches to medium series (declaration form)

Example Code
{\mdseries medium text}
Command

\upshape

Switches to upright shape (declaration form)

Example Code
{\upshape upright text}
Command

\normalfont

Resets to document's normal font

Example Code
{\normalfont reset text}
Command

\centering

Centers content (declaration form)

Example Code
\centering Centered text
Command

\raggedright

Left-aligns, ragged right

Example Code
\raggedright Left aligned text
Command

\raggedleft

Right-aligns, ragged left

Example Code
\raggedleft Right aligned text
Lists, Quotes & Environments

Lists, Quotes & Environments

Comprehensive syntax, arguments, options, and copyable snippets for lists, quotes & environments.

Environment Mandatory { }

\begin{center}...\end{center}

Centers content

Example Code
\begin{center}
Centered text
\end{center}
Environment Mandatory { }

\begin{flushleft}...\end{flushleft}

Left-aligns content

Example Code
\begin{flushleft}
Left text
\end{flushleft}
Environment Mandatory { }

\begin{flushright}...\end{flushright}

Right-aligns content

Example Code
\begin{flushright}
Right text
\end{flushright}
Environment Mandatory { }

\begin{quote}...\end{quote}

Short quotation, indented both sides

Example Code
\begin{quote}
A short quotation.
\end{quote}
Environment Mandatory { }

\begin{quotation}...\end{quotation}

Longer quotation with paragraph indents

Example Code
\begin{quotation}
A longer quotation with multiple paragraphs.
\end{quotation}
Environment Mandatory { }

\begin{verse}...\end{verse}

Poetry formatting

Example Code
\begin{verse}
Roses are red \\
Violets are blue
\end{verse}
Environment Mandatory { }

\begin{itemize}...\end{itemize}

Bulleted list

💡 Deep Dive Explanation & Options

Unordered Bullet List: Encloses \item entries with standard bullets or custom markers (\item[--]).

Example Code
\begin{itemize}
  \item First point
  \item Second point
\end{itemize}
Environment Mandatory { }

\begin{enumerate}...\end{enumerate}

Numbered list

💡 Deep Dive Explanation & Options

Ordered Numbered List: Encloses numbered \item entries with automatic counter hierarchy (1., (a), (i), A.).

Example Code
\begin{enumerate}
  \item First step
  \item Second step
\end{enumerate}
Environment Mandatory { }

\begin{description}...\end{description}

Description list

💡 Deep Dive Explanation & Options

Term-Definition List: Uses \item[Term] for bold title headers followed by indented descriptions.

Example Code
\begin{description}
  \item[Term] Explanation
\end{description}
Command

\item

List item marker

Example Code
\item First item
Command Optional [ ]

\item[label]

List item with custom label

Example Code
\item[(a)] Custom labeled item
Environment Mandatory { }

\begin{verbatim}...\end{verbatim}

Verbatim text (no interpretation)

Example Code
\begin{verbatim}
print("hello")
\end{verbatim}
Environment Mandatory { }

\begin{tabular}{cols}...\end{tabular}

Basic table environment

💡 Deep Dive Explanation & Options

Column Alignment & Border Specifiers:
l: Left-aligned column.
c: Centered column.
r: Right-aligned column.
p{width}: Paragraph column with top-aligned text and automatic line wrapping (e.g. p{4cm}).
m{width}: Paragraph column with vertically centered text (requires \usepackage{array}).
b{width}: Paragraph column with bottom-aligned text.
|: Single vertical grid line.
||: Double vertical grid line.
@{text}: Replaces default column padding with custom text, or removes margin with @{}.

Example Code
\begin{tabular}{cc}
A & B \\
1 & 2 \\
\end{tabular}
Environment Mandatory { }

\begin{table}...\end{table}

Floating table wrapper

💡 Deep Dive Explanation & Options

Float Placement Parameter [htbp]:
h (here): Try placing the table at the exact current position in the source code.
t (top): Place the table at the top of the current or next page.
b (bottom): Place the table at the bottom of the page.
p (page): Place the table on a separate page dedicated to floating objects.
! (override): Relaxes LaTeX internal float packing parameters (e.g. [!htbp]).

Example Code
\begin{table}
\centering
\caption{Results}
\begin{tabular}{cc}
A & B\\
\end{tabular}
\end{table}
Environment Mandatory { }

\begin{figure}...\end{figure}

Floating figure wrapper

💡 Deep Dive Explanation & Options

Float Placement Parameter [htbp]:
h: Place here at point of insertion.
t: Top of page.
b: Bottom of page.
p: Float page.
!: Overrides LaTeX restrictive float limits.

Example Code
\begin{figure}
\centering
\includegraphics{plot.png}
\caption{A plot}
\end{figure}
Environment Mandatory { }

\begin{minipage}{width}...\end{minipage}

Miniature page block

Example Code
\begin{minipage}{0.5\textwidth}
Left column text
\end{minipage}
Environment Mandatory { }

\begin{abstract}...\end{abstract}

Abstract section

Example Code
\begin{abstract}
This paper presents...
\end{abstract}
Environment Mandatory { }

\begin{titlepage}...\end{titlepage}

Custom title page

Example Code
\begin{titlepage}
\centering
\Huge My Thesis
\end{titlepage}
Environment Mandatory { }

\begin{array}{cols}...\end{array}

Math-mode array

Example Code
$\begin{array}{cc} a & b \\ c & d \end{array}$
Environment Mandatory { }

\begin{equation}...\end{equation}

Single numbered equation

Example Code
\begin{equation}
E = mc^2
\end{equation}
Environment Mandatory { }

\begin{equation*}...\end{equation*}

Single unnumbered equation (amsmath)

Example Code
\begin{equation*}
E = mc^2
\end{equation*}
Environment Mandatory { }

\begin{align}...\end{align}

Aligned multi-line equations (amsmath)

💡 Deep Dive Explanation & Options

AMS Multiline Alignment: Place & before equality or relational operators to align equations vertically across lines. Use \\ to break lines. Each line is numbered individually; suppress numbers on specific lines using \nonumber or \notag.

Example Code
\begin{align}
x &= a + b \\
y &= c + d
\end{align}
Environment Mandatory { }

\begin{align*}...\end{align*}

Aligned unnumbered equations (amsmath)

Example Code
\begin{align*}
x &= a + b \\
y &= c + d
\end{align*}
Environment Mandatory { }

\begin{gather}...\end{gather}

Centered multi-line equations (amsmath)

Example Code
\begin{gather}
x = a+b \\
y = c+d
\end{gather}
Environment Mandatory { }

\begin{multline}...\end{multline}

Single long equation split across lines (amsmath)

Example Code
\begin{multline}
a + b + c \\
+ d + e
\end{multline}
Environment Mandatory { }

\begin{cases}...\end{cases}

Piecewise case definitions (amsmath)

💡 Deep Dive Explanation & Options

Piecewise Function: Renders multiple mathematical condition branches enclosed by a large auto-scaling left curly brace.

Example Code
$f(x)=\begin{cases}1 & x>0\\0 & x\le 0\end{cases}$
Environment Mandatory { }

\begin{matrix}...\end{matrix}

Matrix without delimiters (amsmath)

Example Code
$\begin{matrix}a & b\\ c & d\end{matrix}$
Environment Mandatory { }

\begin{pmatrix}...\end{pmatrix}

Matrix with parentheses (amsmath)

Example Code
$\begin{pmatrix}a & b\\ c & d\end{pmatrix}$
Environment Mandatory { }

\begin{bmatrix}...\end{bmatrix}

Matrix with square brackets (amsmath)

Example Code
$\begin{bmatrix}a & b\\ c & d\end{bmatrix}$
Environment Mandatory { }

\begin{vmatrix}...\end{vmatrix}

Matrix with vertical bars (determinant, amsmath)

Example Code
$\begin{vmatrix}a & b\\ c & d\end{vmatrix}$
Environment Mandatory { }

\begin{Bmatrix}...\end{Bmatrix}

Matrix with curly braces (amsmath)

Example Code
$\begin{Bmatrix}a & b\\ c & d\end{Bmatrix}$
Environment Mandatory { }

\begin{theorem}...\end{theorem}

Theorem environment (amsthm)

Example Code
\begin{theorem}
Every bounded sequence has a convergent subsequence.
\end{theorem}
Environment Mandatory { }

\begin{proof}...\end{proof}

Proof environment (amsthm)

Example Code
\begin{proof}
By construction...\qed
\end{proof}
Environment Mandatory { }

\begin{lemma}...\end{lemma}

Lemma environment (amsthm)

Example Code
\begin{lemma}
The function is continuous.
\end{lemma}
Environment Mandatory { }

\begin{definition}...\end{definition}

Definition environment (amsthm)

Example Code
\begin{definition}
A set is open if...
\end{definition}
Special Characters & Accents

Special Characters & Accents

Comprehensive syntax, arguments, options, and copyable snippets for special characters & accents.

Command

\%

Escaped percent sign

Example Code
50\% efficiency
Command

\$

Escaped dollar sign

Example Code
Cost: \$50
Command

\&

Escaped ampersand

Example Code
Smith \& Jones
Command

\#

Escaped hash/pound sign

Example Code
Item \#3
Command

\_

Escaped underscore

Example Code
file\_name
Command Mandatory { }

\{

Escaped left brace

Example Code
\{x\}
Command

\}

Escaped right brace

Example Code
\{x\}
Command

\textasciitilde

Tilde character

Example Code
\textasciitilde
Command

\textasciicircum

Circumflex character

Example Code
\textasciicircum
Command

\textbackslash

Backslash character

Example Code
\textbackslash
Command

\ldots (text mode)

Horizontal ellipsis in text mode

Example Code
and so on\ldots
Command

\dag

Dagger symbol (text mode)

Example Code
Note\dag
Command

\ddag

Double dagger symbol (text mode)

Example Code
Note\ddag
Command

\S

Section sign

Example Code
\S 2.1
Command

\P

Pilcrow/paragraph sign

Example Code
\P 3
Command

\pounds

Pound sterling symbol

Example Code
\pounds 50
Command

\dots

Ellipsis (context-sensitive)

Example Code
one, two, \dots
Command

\ss

German sharp s (eszett)

Example Code
stra\ss e
Command

\ae

ae ligature

Example Code
\ae sthetic
Command

\oe

oe ligature

Example Code
\oe uvre
Command

\aa

Nordic a-ring

Example Code
\aa ngstrom