Overview
After covering mathematical expressions in Markdown, further precise formatting—similar to what is achievable in word processors or academic writing—requires additional techniques.
Font Customization
Font Families
Different font styles can be applied using specific commands:
- Roman style:
\textrm{text} - Sans serif:
\textsf{text} - Typewriter/monospaced:
\texttt{text}
Example:
textrm{Roman} \quad \textsf{Sans} \quad \texttt{Mono}
Font Shapes
Various text shapes are also available:
- Upright:
\textup{text} - Italic:
\textit{text}
Example:
\textup{upright} \quad \textit{italic}
Size and Color
Font color can be set using background boxes for emphasis:
\colorbox{red}{highlighted}
Other colors like yellow can also be used:
\colorbox{yellow}{notice}
Spacing Control
Units of Measurement
Common units include:
- pt: Points (standard unit)
- pc: Picas (1 pc = 12 pt)
- in: Inches (1 in = 72.27 pt)
- bp: Big points (1 in = 72 bp)
- cm/mm: Centimeters and millimeters
- em: Relative to current font size (1 em ≈ 16 px)
- px: Pixels
Space Commands
The following commands introduce various spacing levels:
A \quad A \qquad A \enskip A \thinspace A \enspace A ~ A
Explanation:
\quad: Space equal to current font’s width\qquad: Double quad space\enskip: En-space (~1/6 of current font size)\thinspace: Thin space (~1/5 of current font size)\enspace: En-space (~1/2 of current font size)~: Non-breaking space
Horizontal Adjustment
Use \hspace too adjust horizontal spacing between elements:
A \hspace{2.5cm} B
Values may be specified in pt, in, cm, px, etc., depending on layout needs.
Summary
By lveeraging these formatting options, detailed document presentation in Markdown can closely emulate professional typesetting.