Replace "ORMC" with generic "handout"

This commit is contained in:
2025-03-02 14:18:25 -08:00
parent a4e5a065b0
commit acf57ceab6
57 changed files with 152 additions and 138 deletions

View File

@ -1,23 +1,25 @@
# LaTeX documentation
All LaTeX handouts are based on [`ormc_handout.cls`](./lib/tex/ormc_handout.cls). \
All LaTeX handouts are based on [`handout.cls`](./lib/tex/handout.cls). \
This class is based on `article.cls`, and should work with most LaTeX packages.
The best way to start a new document is to make a copy of an existing one.
- [Advanced/Cryptography](./src/Advanced/Cryptography) is a good example of a simple handout.
- [Advanced/DFAs](./src/Advanced/DFAs) is a good example of a handout with graphs.
- [Advanced/Geometric Optimization](./src/Advanced/Geometric%20Optimization) is a good example of a handout with geometry.
- [Advanced/Cryptography](./src/Advanced/Cryptography) is a good example of a simple handout.
- [Advanced/DFAs](./src/Advanced/DFAs) is a good example of a handout with graphs.
- [Advanced/Geometric Optimization](./src/Advanced/Geometric%20Optimization) is a good example of a handout with geometry.
## Notes
- Compile your handouts with XeLaTeX. \
`pdflatex` is known to misbehave with `ormc_handout.cls`. \
This will happen by default if you use vscode. \
If you use Overleaf, you'll have to configure it manually (see document settings).
- Compile your handouts with XeLaTeX. \
`pdflatex` is known to misbehave with `handout.cls`. \
This will happen by default if you use vscode. \
If you use Overleaf, you'll have to configure it manually (see document settings).
## Document Options
Document options are passed to `\documentclass`, as follows:
```latex
\documentclass[
% Show solutions is `solutions` is provided,
@ -37,49 +39,52 @@ Document options are passed to `\documentclass`, as follows:
% This should only be used for single-page handouts
% (e.g, warm-ups)
nopagenumber
]{ormc_handout}
]{handout}
```
Use `geometry` to change margins and page dimensions. US letter is the default.
## Utilities
- `\say{text}`: Puts text in quotes, handling details like period spacing. Courtesy of `dirtytalk`.
- `\note[Type]{text}`: Makes a note.
- `\hint{text}`: Shorthand for `\note[Hint]{text}`
- `\say{text}`: Puts text in quotes, handling details like period spacing. Courtesy of `dirtytalk`.
- `\note[Type]{text}`: Makes a note.
- `\hint{text}`: Shorthand for `\note[Hint]{text}`
## Sections
The usual LaTeX title-customization techniques *WILL NOT WORK* with this class. \
The usual LaTeX title-customization techniques _WILL NOT WORK_ with this class. \
Don't even try to load `titlesec`.
`ormc_handout.cls` supports two levels of sections:
- `\section`, for large parts of the handout
- `\definition`, `\theorem`, `\proposition`, `\example`, `\remark`, `\problem`, and `\problempart`
`handout.cls` supports two levels of sections:
- `\section`, for large parts of the handout
- `\definition`, `\theorem`, `\proposition`, `\example`, `\remark`, `\problem`, and `\problempart`
All these macros have the following syntax: `\problem{title}<label>`
- `title` is the problem's title, and may be empty.
- `label` is the problem's label. This is optional. \
If a label is provided, this section may be referenced with `\ref{label}`.
- `title` is the problem's title, and may be empty.
- `label` is the problem's label. This is optional. \
If a label is provided, this section may be referenced with `\ref{label}`.
Examples:
- `\problem{}`
- `\problem{Bonus}`
- `\problem{}<gcd>`, which may be referenced with `\ref{gcd}`
- `\problem{}`
- `\problem{Bonus}`
- `\problem{}<gcd>`, which may be referenced with `\ref{gcd}`
Do **not** use `\begin{problem} ... \end{problem}`. \
Sections are macros, not environments.
## Environments:
- `\begin{solution}`: A fancy red for solutions to problems. \
This is hidden if the `nosolutions` is provided.
- `\begin{instrutornote}`: A fancy blue box for instructor notes. \
This is hidden if the `nosolutions` is provided.
- `\begin{examplesolution}`: A fancy gray for sample solutions. \
This is never hidden.
- `\begin{solution}`: A fancy red for solutions to problems. \
This is hidden if the `nosolutions` is provided.
- `\begin{instrutornote}`: A fancy blue box for instructor notes. \
This is hidden if the `nosolutions` is provided.
- `\begin{examplesolution}`: A fancy gray for sample solutions. \
This is never hidden.
All the above environments break across pages and may safely be nested.
Each of these environments also provides the `\linehack` macro, which draws a line across the box. \
This is useful for, say, solutions to multipart problems.
This is useful for, say, solutions to multipart problems.