Minor cleanup
This commit is contained in:
commit
563dd990a5
18
README.md
18
README.md
@ -1,7 +1,7 @@
|
|||||||
[tinymist]: https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist
|
[tinymist]: https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist
|
||||||
[latex-workshop]: https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop
|
[latex-workshop]: https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop
|
||||||
[CC BY-NC-SA 4.0]: https://creativecommons.org/licenses/by-nc-sa/4.0
|
[CC BY-NC-SA 4.0]: https://creativecommons.org/licenses/by-nc-sa/4.0
|
||||||
[betalupi.com/handouts]: https://static.betalupi.com/ormc
|
[betalupi.com/handouts]: https://betalupi.com/handouts
|
||||||
[ORMC]: https://circles.math.ucla.edu/circles/
|
[ORMC]: https://circles.math.ucla.edu/circles/
|
||||||
[Overleaf]: https://overleaf.com
|
[Overleaf]: https://overleaf.com
|
||||||
[Typst.app]: https://typst.app
|
[Typst.app]: https://typst.app
|
||||||
@ -26,7 +26,7 @@ By submitting or editing a handout in this repository, you agree to release it u
|
|||||||
|
|
||||||
## 🛠️ Contributing
|
## 🛠️ Contributing
|
||||||
|
|
||||||
If you want to use one of these handouts for a class, see [`betalupi.com/handouts`](https://betalupi.com/handouts). \
|
If you want to use one of these handouts for a class, see [betalupi.com/handouts]. \
|
||||||
You only need to read this section if you want to edit these handouts.
|
You only need to read this section if you want to edit these handouts.
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
@ -56,7 +56,7 @@ This repository is organized as follows:
|
|||||||
- [`./tools`](./tools) contains build scripts, [`./.github`](./.github) configures automation. \
|
- [`./tools`](./tools) contains build scripts, [`./.github`](./.github) configures automation. \
|
||||||
You can ignore everything in these directories.
|
You can ignore everything in these directories.
|
||||||
|
|
||||||
All handouts in this repository are based on `ormc_handout.cls` or `handout@0.1.0`.
|
All handouts in this repository are based on `handout.cls` or `handout@0.1.0`.
|
||||||
|
|
||||||
- If you're using Typst (preferred), read [`docs-typst.md`](./docs-typst.md)
|
- If you're using Typst (preferred), read [`docs-typst.md`](./docs-typst.md)
|
||||||
- If you're still using LaTeX, read [`docs-latex.md`](./docs-latex.md).
|
- If you're still using LaTeX, read [`docs-latex.md`](./docs-latex.md).
|
||||||
@ -95,8 +95,8 @@ _(I do not recommend this. The default toolchain makes it easier to share improv
|
|||||||
### For LaTeX:
|
### For LaTeX:
|
||||||
|
|
||||||
1. Get the handout's directory (i.e, download the whole repo as a zip and extract the folder you want.)
|
1. Get the handout's directory (i.e, download the whole repo as a zip and extract the folder you want.)
|
||||||
2. Download [`./resources/ormc_handout.cls`](./resources/ormc_handout.cls)
|
2. Download [`./resources/handout.cls`](./resources/handout.cls)
|
||||||
3. Put this `ormc_handout.cls` in the same directory as the handout.
|
3. Put this `handout.cls` in the same directory as the handout.
|
||||||
4. Fix the include path at the top of `main.tex`:
|
4. Fix the include path at the top of `main.tex`:
|
||||||
|
|
||||||
You'll need to replace
|
You'll need to replace
|
||||||
@ -104,7 +104,7 @@ You'll need to replace
|
|||||||
```latex
|
```latex
|
||||||
\documentclass[
|
\documentclass[
|
||||||
...
|
...
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
```
|
```
|
||||||
|
|
||||||
with
|
with
|
||||||
@ -112,11 +112,11 @@ with
|
|||||||
```latex
|
```latex
|
||||||
\documentclass[
|
\documentclass[
|
||||||
...
|
...
|
||||||
]{ormc_handout}
|
]{handout}
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Make a new overleaf project with the resulting directory.
|
5. Make a new overleaf project with the resulting directory.
|
||||||
6. **Do not use pdflatex**, it misbehaves with `ormc_handout`. Tell Overleaf to use XeLaTeX.
|
6. **Do not use pdflatex**, it misbehaves with `handout`. Tell Overleaf to use XeLaTeX.
|
||||||
|
|
||||||
### For Typst:
|
### For Typst:
|
||||||
|
|
||||||
@ -124,5 +124,5 @@ Out-of-band typst compilation isn't supported. Clone the repository and use vsco
|
|||||||
This is because typst can't import packages from a relative path.
|
This is because typst can't import packages from a relative path.
|
||||||
|
|
||||||
If you _really_ want it, standalone typst compilation _is_ possible. \
|
If you _really_ want it, standalone typst compilation _is_ possible. \
|
||||||
Follow the LaTeX instructions, but fix `handout@0.1.0` instead of `ormc_handout`. \
|
Follow the LaTeX instructions, but fix `handout@0.1.0` instead of `handout`. \
|
||||||
You'll figure it out.
|
You'll figure it out.
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
# LaTeX documentation
|
# 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.
|
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.
|
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
|
## Notes
|
||||||
- Compile your handouts with XeLaTeX. \
|
|
||||||
`pdflatex` is known to misbehave with `ormc_handout.cls`. \
|
- Compile your handouts with XeLaTeX. \
|
||||||
This will happen by default if you use vscode. \
|
`pdflatex` is known to misbehave with `handout.cls`. \
|
||||||
If you use Overleaf, you'll have to configure it manually (see document settings).
|
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
|
||||||
|
|
||||||
Document options are passed to `\documentclass`, as follows:
|
Document options are passed to `\documentclass`, as follows:
|
||||||
|
|
||||||
```latex
|
```latex
|
||||||
\documentclass[
|
\documentclass[
|
||||||
% Show solutions is `solutions` is provided,
|
% 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
|
% This should only be used for single-page handouts
|
||||||
% (e.g, warm-ups)
|
% (e.g, warm-ups)
|
||||||
nopagenumber
|
nopagenumber
|
||||||
]{ormc_handout}
|
]{handout}
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `geometry` to change margins and page dimensions. US letter is the default.
|
Use `geometry` to change margins and page dimensions. US letter is the default.
|
||||||
|
|
||||||
|
|
||||||
## Utilities
|
## Utilities
|
||||||
- `\say{text}`: Puts text in quotes, handling details like period spacing. Courtesy of `dirtytalk`.
|
|
||||||
- `\note[Type]{text}`: Makes a note.
|
- `\say{text}`: Puts text in quotes, handling details like period spacing. Courtesy of `dirtytalk`.
|
||||||
- `\hint{text}`: Shorthand for `\note[Hint]{text}`
|
- `\note[Type]{text}`: Makes a note.
|
||||||
|
- `\hint{text}`: Shorthand for `\note[Hint]{text}`
|
||||||
|
|
||||||
## Sections
|
## 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`.
|
Don't even try to load `titlesec`.
|
||||||
|
|
||||||
`ormc_handout.cls` supports two levels of sections:
|
`handout.cls` supports two levels of sections:
|
||||||
- `\section`, for large parts of the handout
|
|
||||||
- `\definition`, `\theorem`, `\proposition`, `\example`, `\remark`, `\problem`, and `\problempart`
|
- `\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>`
|
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. \
|
- `title` is the problem's title, and may be empty.
|
||||||
If a label is provided, this section may be referenced with `\ref{label}`.
|
- `label` is the problem's label. This is optional. \
|
||||||
|
If a label is provided, this section may be referenced with `\ref{label}`.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
- `\problem{}`
|
|
||||||
- `\problem{Bonus}`
|
- `\problem{}`
|
||||||
- `\problem{}<gcd>`, which may be referenced with `\ref{gcd}`
|
- `\problem{Bonus}`
|
||||||
|
- `\problem{}<gcd>`, which may be referenced with `\ref{gcd}`
|
||||||
|
|
||||||
Do **not** use `\begin{problem} ... \end{problem}`. \
|
Do **not** use `\begin{problem} ... \end{problem}`. \
|
||||||
Sections are macros, not environments.
|
Sections are macros, not environments.
|
||||||
|
|
||||||
## Environments:
|
## Environments:
|
||||||
|
|
||||||
- `\begin{solution}`: A fancy red for solutions to problems. \
|
- `\begin{solution}`: A fancy red for solutions to problems. \
|
||||||
This is hidden if the `nosolutions` is provided.
|
This is hidden if the `nosolutions` is provided.
|
||||||
- `\begin{instrutornote}`: A fancy blue box for instructor notes. \
|
- `\begin{instrutornote}`: A fancy blue box for instructor notes. \
|
||||||
This is hidden if the `nosolutions` is provided.
|
This is hidden if the `nosolutions` is provided.
|
||||||
- `\begin{examplesolution}`: A fancy gray for sample solutions. \
|
- `\begin{examplesolution}`: A fancy gray for sample solutions. \
|
||||||
This is never hidden.
|
This is never hidden.
|
||||||
|
|
||||||
All the above environments break across pages and may safely be nested.
|
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. \
|
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.
|
||||||
|
@ -4,23 +4,27 @@ See [typst.app/docs](https://typst.app/docs) for typst's documentation. \
|
|||||||
All typst handouts are based on [`handout@0.1.0`](./lib/typst/local/handout/0.1.0).
|
All typst handouts are based on [`handout@0.1.0`](./lib/typst/local/handout/0.1.0).
|
||||||
|
|
||||||
The best way to start a new document is to make a copy of an existing one.
|
The best way to start a new document is to make a copy of an existing one.
|
||||||
- [Advanced/Tropical Polynomials](./src/Advanced/Tropical%20Polynomials) is a good place to start.
|
|
||||||
- [Warm-Ups/Painting](./src/Warm-Ups/Painting) is a good example of tikz-like pictures.
|
|
||||||
|
|
||||||
|
- [Advanced/Tropical Polynomials](./src/Advanced/Tropical%20Polynomials) is a good place to start.
|
||||||
|
- [Warm-Ups/Painting](./src/Warm-Ups/Painting) is a good example of tikz-like pictures.
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
- Typst's equivalent of tikz is cetz ([homepage](https://cetz-package.github.io), [docs](https://cetz-package.github.io/docs/api))
|
|
||||||
- Typst handouts are always compiled with solutions. \
|
- Typst's equivalent of tikz is cetz ([homepage](https://cetz-package.github.io), [docs](https://cetz-package.github.io/docs/api))
|
||||||
Handouts without solutions are automatically compiled and published at [betalupi.com/handouts](https://static.betalupi.com/ormc). \
|
- Typst handouts are always compiled with solutions. \
|
||||||
If you'd like to compile a student handout manually, run the following command in a handout directory:
|
Handouts without solutions are automatically compiled and published at [betalupi.com/handouts](https://betalupi.com/handouts). \
|
||||||
|
If you'd like to compile a student handout manually, run the following command in a handout directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
typst compile main.typ --package-path ../../../lib/typst --input show_solutions=false
|
typst compile main.typ --package-path ../../../lib/typst --input show_solutions=false
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `package_path` is a relative path to [./lib/typst](./lib/typst).
|
Where `package_path` is a relative path to [./lib/typst](./lib/typst).
|
||||||
|
|
||||||
## Document Options
|
## Document Options
|
||||||
|
|
||||||
All typst handouts start with the following:
|
All typst handouts start with the following:
|
||||||
|
|
||||||
```typst
|
```typst
|
||||||
#show: handout.with(
|
#show: handout.with(
|
||||||
// Should match `meta.toml`
|
// Should match `meta.toml`
|
||||||
@ -38,39 +42,44 @@ All typst handouts start with the following:
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Notable commands
|
## Notable commands
|
||||||
- `#v(1fr)`: Like LaTeX's `\vfill`. Creates whitespace that grows automatically. \
|
|
||||||
`fr` means "fraction". `#v(2fr)` will fill twice as much space as `#v(1fr)` on the same page.
|
- `#v(1fr)`: Like LaTeX's `\vfill`. Creates whitespace that grows automatically. \
|
||||||
|
`fr` means "fraction". `#v(2fr)` will fill twice as much space as `#v(1fr)` on the same page.
|
||||||
|
|
||||||
## Utilities
|
## Utilities
|
||||||
- `#note([content], type: "Note type")`: Makes a note. `type` is optional.
|
|
||||||
- `#hint([content])`: Shorthand for `#note([content], type: "Hint")`
|
- `#note([content], type: "Note type")`: Makes a note. `type` is optional.
|
||||||
- `#solution([content])`: A pretty box for solutions. Hidden in student handouts.
|
- `#hint([content])`: Shorthand for `#note([content], type: "Hint")`
|
||||||
- `#examplesolution([content])`: Like `#solution()`, but is never hidden.
|
- `#solution([content])`: A pretty box for solutions. Hidden in student handouts.
|
||||||
- `#if_solutions([content])`: Shows content only if we are showing solutions.
|
- `#examplesolution([content])`: Like `#solution()`, but is never hidden.
|
||||||
- `#if_no_solutions([content])`: Shows content only if we **aren't** showing solutions.
|
- `#if_solutions([content])`: Shows content only if we are showing solutions.
|
||||||
|
- `#if_no_solutions([content])`: Shows content only if we **aren't** showing solutions.
|
||||||
|
|
||||||
## Sections
|
## Sections
|
||||||
|
|
||||||
High-level sections are denoted with `=`. \
|
High-level sections are denoted with `=`. \
|
||||||
Subsections start with `==`, subsubsections with `===`, and so on. \
|
Subsections start with `==`, subsubsections with `===`, and so on. \
|
||||||
**`handout@0.1.0` is only designed to use `=`, subsections might be ugly.**
|
**`handout@0.1.0` is only designed to use `=`, subsections might be ugly.**
|
||||||
|
|
||||||
|
|
||||||
`handout@0.1.0` also provides the following commands:
|
`handout@0.1.0` also provides the following commands:
|
||||||
- `problem`
|
|
||||||
- `definition`
|
- `problem`
|
||||||
- `theorem`
|
- `definition`
|
||||||
- `example`
|
- `theorem`
|
||||||
- `remark`
|
- `example`
|
||||||
|
- `remark`
|
||||||
|
|
||||||
These all have the same syntax: `#problem("title", label: "label")`
|
These all have the same syntax: `#problem("title", label: "label")`
|
||||||
- `title` is the problem's title, and may be omitted.
|
|
||||||
- `label` is the problem's label. This is optional. \
|
- `title` is the problem's title, and may be omitted.
|
||||||
If a label is provided, this problem can be referenced with `@label`
|
- `label` is the problem's label. This is optional. \
|
||||||
|
If a label is provided, this problem can be referenced with `@label`
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
- `#problem()`
|
|
||||||
- `#problem("Bonus")`
|
- `#problem()`
|
||||||
- `#problem(label: "gcd")`, which may be referenced with `@gcd`
|
- `#problem("Bonus")`
|
||||||
|
- `#problem(label: "gcd")`, which may be referenced with `@gcd`
|
||||||
|
|
||||||
### Complete example:
|
### Complete example:
|
||||||
|
|
||||||
@ -91,4 +100,4 @@ Consider the polynomial $f(x) = x^3 + 1x^2 + 3x + 6$.
|
|||||||
#problem()
|
#problem()
|
||||||
Recall @imaproblem.
|
Recall @imaproblem.
|
||||||
- use this graph to find the roots of $f$
|
- use this graph to find the roots of $f$
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{../../../lib/tex/ormc_handout}[2023/05/29 2.0.2 ORMC Handout]
|
\ProvidesClass{../../../lib/tex/handout}[2025/03/02 2.0.2 Mark's handout class]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
\@twocolumnfalse
|
\@twocolumnfalse
|
||||||
\@twosidefalse
|
\@twosidefalse
|
||||||
\@mparswitchfalse
|
\@mparswitchfalse
|
||||||
% ORMC-specific
|
% Handout-specific
|
||||||
\newif{\if@solutions} % If false, solutions and instructor notes are hidden.
|
\newif{\if@solutions} % If false, solutions and instructor notes are hidden.
|
||||||
\newif{\if@singlenumbering} % If true, the same counter is used for all objects.
|
\newif{\if@singlenumbering} % If true, the same counter is used for all objects.
|
||||||
\newif{\if@nopagenumber} % If true, don't number pages.
|
\newif{\if@nopagenumber} % If true, don't number pages.
|
||||||
@ -25,7 +25,7 @@
|
|||||||
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
|
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
|
||||||
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
|
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
|
||||||
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
|
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
|
||||||
% ORMC-specific options
|
% Handout-specific options
|
||||||
\DeclareOption{solutions}{\@solutionstrue}
|
\DeclareOption{solutions}{\@solutionstrue}
|
||||||
\DeclareOption{nosolutions}{\@solutionsfalse}
|
\DeclareOption{nosolutions}{\@solutionsfalse}
|
||||||
\DeclareOption{multinumbering}{\@singlenumberingfalse}
|
\DeclareOption{multinumbering}{\@singlenumberingfalse}
|
||||||
@ -37,7 +37,7 @@
|
|||||||
\DeclareOption{showwarning}{\@nowarningfalse}
|
\DeclareOption{showwarning}{\@nowarningfalse}
|
||||||
\DeclareOption{hidewarning}{\@nowarningtrue}
|
\DeclareOption{hidewarning}{\@nowarningtrue}
|
||||||
\DeclareOption{unfinished}{\@unfinishedtrue}
|
\DeclareOption{unfinished}{\@unfinishedtrue}
|
||||||
\DeclareOption*{\ClassWarning{ormc_handout}{\CurrentOption ignored}}
|
\DeclareOption*{\ClassWarning{handout}{\CurrentOption ignored}}
|
||||||
|
|
||||||
\@unfinishedfalse
|
\@unfinishedfalse
|
||||||
\ExecuteOptions{
|
\ExecuteOptions{
|
||||||
@ -629,12 +629,12 @@
|
|||||||
|
|
||||||
% Keep track of the current background color.
|
% Keep track of the current background color.
|
||||||
% Useful for transparent tikz drawings.
|
% Useful for transparent tikz drawings.
|
||||||
\def\ORMCbgcolor{white}
|
\def\bgcolor{white}
|
||||||
|
|
||||||
% Make a box environment.
|
% Make a box environment.
|
||||||
% These can safely be nested.
|
% These can safely be nested.
|
||||||
% Args: title, back color, frame color.
|
% Args: title, back color, frame color.
|
||||||
\newenvironment{ORMCbox}[3]{
|
\newenvironment{hobox}[3]{
|
||||||
% \linehack draws a line across a tcolorbox.
|
% \linehack draws a line across a tcolorbox.
|
||||||
% tcolorbox only supports two sections, but
|
% tcolorbox only supports two sections, but
|
||||||
% this hack allows us to have more.
|
% this hack allows us to have more.
|
||||||
@ -653,7 +653,7 @@
|
|||||||
|
|
||||||
% Keep track of the current background color.
|
% Keep track of the current background color.
|
||||||
% Useful for transparent tikz drawings.
|
% Useful for transparent tikz drawings.
|
||||||
\def\ORMCbgcolor{#2}
|
\def\bgcolor{#2}
|
||||||
|
|
||||||
\begin{tcolorbox}[
|
\begin{tcolorbox}[
|
||||||
enhanced,
|
enhanced,
|
||||||
@ -675,21 +675,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
\newenvironment{examplesolution}{
|
\newenvironment{examplesolution}{
|
||||||
\begin{ORMCbox}{Example Solution}{black!10!white}{black!65!white}
|
\begin{hobox}{Example Solution}{black!10!white}{black!65!white}
|
||||||
} {
|
} {
|
||||||
\end{ORMCbox}
|
\end{hobox}
|
||||||
}
|
}
|
||||||
|
|
||||||
\if@solutions
|
\if@solutions
|
||||||
\newenvironment{solution}{
|
\newenvironment{solution}{
|
||||||
\begin{ORMCbox}{Solution}{ored!10!white}{ored}
|
\begin{hobox}{Solution}{ored!10!white}{ored}
|
||||||
} {
|
} {
|
||||||
\end{ORMCbox}
|
\end{hobox}
|
||||||
}
|
}
|
||||||
\newenvironment{instructornote}{
|
\newenvironment{instructornote}{
|
||||||
\begin{ORMCbox}{Note for Instructors}{ocyan!10!white}{ocyan}
|
\begin{hobox}{Note for Instructors}{ocyan!10!white}{ocyan}
|
||||||
} {
|
} {
|
||||||
\end{ORMCbox}
|
\end{hobox}
|
||||||
}
|
}
|
||||||
\else
|
\else
|
||||||
\excludecomment{solution}
|
\excludecomment{solution}
|
@ -1,5 +1,5 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesPackage{../../../lib/tex/macros}[2023/10/16 ORMC Macros]
|
\ProvidesPackage{../../../lib/tex/macros}[2025/03/02 Handout macros]
|
||||||
|
|
||||||
\RequirePackage{hyperref}
|
\RequirePackage{hyperref}
|
||||||
\RequirePackage{pgf}
|
\RequirePackage{pgf}
|
||||||
|
@ -48,19 +48,28 @@
|
|||||||
// Text style
|
// Text style
|
||||||
set text(font: "New Computer Modern")
|
set text(font: "New Computer Modern")
|
||||||
set par(
|
set par(
|
||||||
leading: 0.55em,
|
leading: 0.5em,
|
||||||
first-line-indent: 0mm,
|
|
||||||
justify: true,
|
|
||||||
spacing: 0.5em,
|
spacing: 0.5em,
|
||||||
|
|
||||||
|
first-line-indent: 0mm,
|
||||||
|
hanging-indent: 0mm,
|
||||||
|
justify: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
// List style
|
// List style
|
||||||
show list: set block(spacing: 0.5em, below: 1em)
|
|
||||||
set list(
|
set list(
|
||||||
tight: false,
|
indent: 4mm,
|
||||||
indent: 5mm,
|
body-indent: 1.5mm,
|
||||||
spacing: 3mm,
|
|
||||||
|
// Manually set spacing,
|
||||||
|
// `tight` has no effect.
|
||||||
|
spacing: 2mm,
|
||||||
|
)
|
||||||
|
set enum(
|
||||||
|
indent: 4mm,
|
||||||
|
body-indent: 1.5mm,
|
||||||
|
spacing: 2mm,
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -93,7 +102,9 @@
|
|||||||
// Make handout title
|
// Make handout title
|
||||||
{
|
{
|
||||||
import "header.typ": make_header, solution_warning
|
import "header.typ": make_header, solution_warning
|
||||||
import "solution.typ": show_solutions
|
import "solution.typ": solutions_state, reset_solutions
|
||||||
|
|
||||||
|
reset_solutions()
|
||||||
|
|
||||||
let url = link(
|
let url = link(
|
||||||
"https://betalupi.com/handouts",
|
"https://betalupi.com/handouts",
|
||||||
@ -108,8 +119,10 @@
|
|||||||
top_right: url,
|
top_right: url,
|
||||||
)
|
)
|
||||||
|
|
||||||
if show_solutions {
|
context {
|
||||||
solution_warning()
|
if solutions_state.get() {
|
||||||
|
solution_warning()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,34 +1,63 @@
|
|||||||
#import "misc.typ": ored, oblue
|
#import "misc.typ": ored, oblue
|
||||||
|
|
||||||
|
|
||||||
/// If false, hide instructor info.
|
/// If false, hide instructor info.
|
||||||
///
|
/// If true, show it.
|
||||||
/// Compile with the following command to hide solutions:
|
|
||||||
/// `typst compile main.typ --input show_solutions=false`
|
|
||||||
///
|
///
|
||||||
/// Solutions are shown by default. This behavior
|
/// Solutions are shown by default. This behavior
|
||||||
/// is less surprising than hiding content by default.
|
/// is less surprising than hiding content by default.
|
||||||
#let show_solutions = {
|
#let solutions_state = state("solutions_state", true)
|
||||||
|
|
||||||
|
/// Force solutions to be hidden after this point.
|
||||||
|
///
|
||||||
|
/// This function produces content that must be
|
||||||
|
/// included in the document. If it is not included,
|
||||||
|
/// this function will have no effect.
|
||||||
|
#let hide_solutions() = {
|
||||||
|
return solutions_state.update(x => false)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Force solutions to be shown after this point.
|
||||||
|
///
|
||||||
|
/// This function produces content that must be
|
||||||
|
/// included in the document. If it is not included,
|
||||||
|
/// this function will have no effect.
|
||||||
|
#let show_solutions() = {
|
||||||
|
return solutions_state.update(x => true)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// Reset the solution flag to its default value.
|
||||||
|
/// This value is determined by compile flags:
|
||||||
|
/// Compile with the following command to hide solutions:
|
||||||
|
/// `typst compile main.typ --input show_solutions=false`
|
||||||
|
///
|
||||||
|
/// Solutions are shown by default.
|
||||||
|
///
|
||||||
|
/// This function produces content that must be
|
||||||
|
/// included in the document. If it is not included,
|
||||||
|
/// this function will have no effect.
|
||||||
|
#let reset_solutions() = {
|
||||||
if "show_solutions" in sys.inputs {
|
if "show_solutions" in sys.inputs {
|
||||||
// Show solutions unless they're explicitly disabled
|
if (
|
||||||
not (
|
|
||||||
sys.inputs.show_solutions == "false" or sys.inputs.show_solutions == "no"
|
sys.inputs.show_solutions == "false" or sys.inputs.show_solutions == "no"
|
||||||
)
|
) {
|
||||||
} else {
|
return solutions_state.update(x => false)
|
||||||
// Show solutions by default
|
}
|
||||||
true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#let if_solutions(content) = {
|
#let if_solutions(content) = context {
|
||||||
if show_solutions { content }
|
if solutions_state.get() { content }
|
||||||
}
|
}
|
||||||
|
|
||||||
#let if_no_solutions(content) = {
|
#let if_no_solutions(content) = context {
|
||||||
if not show_solutions { content }
|
if not solutions_state.get() { content }
|
||||||
}
|
}
|
||||||
|
|
||||||
#let if_solutions_else(if_yes, if_no) = {
|
#let if_solutions_else(if_yes, if_no) = context {
|
||||||
if show_solutions { if_yes } else { if_no }
|
if solutions_state.get() { if_yes } else { if_no }
|
||||||
}
|
}
|
||||||
|
|
||||||
#let solution(content) = {
|
#let solution(content) = {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\input{tikzset.tex}
|
\input{tikzset.tex}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
label/.style = {
|
label/.style = {
|
||||||
rectangle,
|
rectangle,
|
||||||
% For automatic red background in solutions
|
% For automatic red background in solutions
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
draw = none,
|
draw = none,
|
||||||
rounded corners = 0mm
|
rounded corners = 0mm
|
||||||
},
|
},
|
||||||
@ -32,7 +32,7 @@
|
|||||||
% Nodes
|
% Nodes
|
||||||
edg/.style = {
|
edg/.style = {
|
||||||
midway,
|
midway,
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
text = gray
|
text = gray
|
||||||
},
|
},
|
||||||
int/.style = {},
|
int/.style = {},
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
shortwarning,
|
shortwarning,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
unfinished
|
unfinished
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{multicol}
|
\usepackage{multicol}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
solutions,
|
solutions,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
shortwarning
|
shortwarning
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{multicol}
|
\usepackage{multicol}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\input{tikzset.tex}
|
\input{tikzset.tex}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
label/.style = {
|
label/.style = {
|
||||||
rectangle,
|
rectangle,
|
||||||
% For automatic red background in solutions
|
% For automatic red background in solutions
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
draw = none,
|
draw = none,
|
||||||
rounded corners = 0mm
|
rounded corners = 0mm
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\input{tikzset.tex}
|
\input{tikzset.tex}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
label/.style = {
|
label/.style = {
|
||||||
rectangle,
|
rectangle,
|
||||||
% For automatic red background in solutions
|
% For automatic red background in solutions
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
draw = none,
|
draw = none,
|
||||||
rounded corners = 0mm
|
rounded corners = 0mm
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
nosolutions,
|
nosolutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
solutions,
|
solutions,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
nopagenumber
|
nopagenumber
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\uptitlel{Advanced 2}
|
\uptitlel{Advanced 2}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[
|
\documentclass[
|
||||||
solutions
|
solutions
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\uptitlel{Advanced 2}
|
\uptitlel{Advanced 2}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
solutions,
|
solutions,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
shortwarning
|
shortwarning
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{tikz}
|
\usepackage{tikz}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[
|
\documentclass[
|
||||||
solutions
|
solutions
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\input{tikxset}
|
\input{tikxset}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
label/.style = {
|
label/.style = {
|
||||||
circle,
|
circle,
|
||||||
% For automatic red background in solutions
|
% For automatic red background in solutions
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
draw = none
|
draw = none
|
||||||
},
|
},
|
||||||
%
|
%
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
nosolutions,
|
nosolutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
\usepackage{units}
|
\usepackage{units}
|
||||||
\input{src/tikzset}
|
\input{src/tikzset}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../../lib/tex/ormc_handout}
|
]{../../../../lib/tex/handout}
|
||||||
\usepackage{../../../../lib/tex/macros}
|
\usepackage{../../../../lib/tex/macros}
|
||||||
\usepackage{units}
|
\usepackage{units}
|
||||||
\input{tikzset}
|
\input{tikzset}
|
||||||
|
@ -462,7 +462,7 @@ Thus,
|
|||||||
\end{equation*}
|
\end{equation*}
|
||||||
|
|
||||||
|
|
||||||
\begin{ORMCbox}{Review: Multiplying Vectors by Matrices}{black!10!white}{black!65!white}
|
\begin{hobox}{Review: Multiplying Vectors by Matrices}{black!10!white}{black!65!white}
|
||||||
\begin{equation*}
|
\begin{equation*}
|
||||||
Av =
|
Av =
|
||||||
\begin{bmatrix}
|
\begin{bmatrix}
|
||||||
@ -480,7 +480,7 @@ Thus,
|
|||||||
\end{equation*}
|
\end{equation*}
|
||||||
|
|
||||||
Note that each element of $Av$ is the dot product of a row in $A$ and a column in $v$.
|
Note that each element of $Av$ is the dot product of a row in $A$ and a column in $v$.
|
||||||
\end{ORMCbox}
|
\end{hobox}
|
||||||
|
|
||||||
\problem{}
|
\problem{}
|
||||||
Compute the following product:
|
Compute the following product:
|
||||||
|
@ -154,7 +154,7 @@ The \textit{Hadamard Gate} is given by the following matrix: \par
|
|||||||
\end{equation*}
|
\end{equation*}
|
||||||
\note{Note that we divide by $\sqrt{2}$, since $H$ must be orthonormal.}
|
\note{Note that we divide by $\sqrt{2}$, since $H$ must be orthonormal.}
|
||||||
|
|
||||||
\begin{ORMCbox}{Review: Matrix Multiplication}{black!10!white}{black!65!white}
|
\begin{hobox}{Review: Matrix Multiplication}{black!10!white}{black!65!white}
|
||||||
Matrix multiplication works as follows:
|
Matrix multiplication works as follows:
|
||||||
|
|
||||||
\begin{equation*}
|
\begin{equation*}
|
||||||
@ -196,7 +196,7 @@ The \textit{Hadamard Gate} is given by the following matrix: \par
|
|||||||
|
|
||||||
This is exactly the first column of the matrix product. \par
|
This is exactly the first column of the matrix product. \par
|
||||||
Also, note that each element of $Ac_0$ is the dot product of a row in $A$ and a column in $c_0$.
|
Also, note that each element of $Ac_0$ is the dot product of a row in $A$ and a column in $c_0$.
|
||||||
\end{ORMCbox}
|
\end{hobox}
|
||||||
|
|
||||||
|
|
||||||
\problem{}
|
\problem{}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
line width = 0.35mm
|
line width = 0.35mm
|
||||||
},
|
},
|
||||||
qubit/.style = {
|
qubit/.style = {
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
line width = 0.35mm
|
line width = 0.35mm
|
||||||
},
|
},
|
||||||
wire/.style = {
|
wire/.style = {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{ifthen}
|
\usepackage{ifthen}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
nosolutions,
|
nosolutions,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
\usepackage{units}
|
\usepackage{units}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
%shortwarning
|
%shortwarning
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\graphicspath{ {./images/} }
|
\graphicspath{ {./images/} }
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[
|
\documentclass[
|
||||||
solutions
|
solutions
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{amsmath}
|
\usepackage{amsmath}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\input{tikxset.tex}
|
\input{tikxset.tex}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
label/.style = {
|
label/.style = {
|
||||||
rectangle,
|
rectangle,
|
||||||
% For automatic red background in solutions
|
% For automatic red background in solutions
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
draw = none,
|
draw = none,
|
||||||
rounded corners = 0mm
|
rounded corners = 0mm
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
solutions,
|
solutions,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
shortwarning
|
shortwarning
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
\input{diagram}
|
\input{diagram}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
shortwarning
|
shortwarning
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{chessfss}
|
\usepackage{chessfss}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{units}
|
\usepackage{units}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
\usetikzlibrary{calc}
|
\usetikzlibrary{calc}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
label/.style = {
|
label/.style = {
|
||||||
rectangle,
|
rectangle,
|
||||||
% For automatic red background in solutions
|
% For automatic red background in solutions
|
||||||
fill = \ORMCbgcolor,
|
fill = \bgcolor,
|
||||||
draw = none,
|
draw = none,
|
||||||
rounded corners = 0mm
|
rounded corners = 0mm
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[
|
\documentclass[
|
||||||
solutions
|
solutions
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[
|
\documentclass[
|
||||||
solutions
|
solutions
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[
|
\documentclass[
|
||||||
solutions
|
solutions
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
% use [nosolutions] flag to hide solutions.
|
% use [nosolutions] flag to hide solutions.
|
||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[solutions]{../../../lib/tex/ormc_handout}
|
\documentclass[solutions]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
singlenumbering
|
singlenumbering
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\usepackage{units}
|
\usepackage{units}
|
||||||
|
@ -190,7 +190,7 @@ For example, see the proof of the statement in \ref{binomsum} on the next page.
|
|||||||
\pagebreak
|
\pagebreak
|
||||||
|
|
||||||
|
|
||||||
\begin{ORMCbox}{Alternative Proof}{ogrape!10!white}{ogrape}
|
\begin{hobox}{Alternative Proof}{ogrape!10!white}{ogrape}
|
||||||
Consider the following problem: \par
|
Consider the following problem: \par
|
||||||
How many ways are there to write a number $x$ as an ordered sum of positive integers? \par
|
How many ways are there to write a number $x$ as an ordered sum of positive integers? \par
|
||||||
\note{
|
\note{
|
||||||
@ -234,7 +234,7 @@ For example, see the proof of the statement in \ref{binomsum} on the next page.
|
|||||||
We've found that the number of ways to split $x$ can be written as either
|
We've found that the number of ways to split $x$ can be written as either
|
||||||
$\sum_{n = 1}^{x-1} \binom{x-1}{n}$ or $2^{x-1}$,
|
$\sum_{n = 1}^{x-1} \binom{x-1}{n}$ or $2^{x-1}$,
|
||||||
and therefore $\sum_{n = 1}^{x-1} \binom{x-1}{n} = 2^{x-1}$.
|
and therefore $\sum_{n = 1}^{x-1} \binom{x-1}{n} = 2^{x-1}$.
|
||||||
\end{ORMCbox}
|
\end{hobox}
|
||||||
|
|
||||||
|
|
||||||
\pagebreak
|
\pagebreak
|
@ -2,7 +2,7 @@
|
|||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[
|
\documentclass[
|
||||||
solutions
|
solutions
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
% use [nosolutions] flag to hide solutions.
|
% use [nosolutions] flag to hide solutions.
|
||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[solutions]{../../../lib/tex/ormc_handout}
|
\documentclass[solutions]{../../../lib/tex/handout}
|
||||||
\usepackage{adjustbox}
|
\usepackage{adjustbox}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
% use [nosolutions] flag to hide solutions.
|
% use [nosolutions] flag to hide solutions.
|
||||||
% use [solutions] flag to show solutions.
|
% use [solutions] flag to show solutions.
|
||||||
\documentclass[solutions]{../../../lib/tex/ormc_handout}
|
\documentclass[solutions]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
shortwarning,
|
shortwarning,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
nopagenumber
|
nopagenumber
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
\geometry{top = 20mm}
|
\geometry{top = 20mm}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
hidewarning,
|
hidewarning,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
nopagenumber
|
nopagenumber
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
hidewarning,
|
hidewarning,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
nopagenumber
|
nopagenumber
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
hidewarning,
|
hidewarning,
|
||||||
singlenumbering,
|
singlenumbering,
|
||||||
nopagenumber
|
nopagenumber
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
\def\utri#1#2{
|
\def\utri#1#2{
|
||||||
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
\vfill
|
\vfill
|
||||||
|
|
||||||
\begin{ORMCbox}{Notes}{ogrape!10!white}{ogrape}
|
\begin{hobox}{Notes}{ogrape!10!white}{ogrape}
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item
|
\item
|
||||||
Each player needs to make multiple groups before the first player's second turn. \par
|
Each player needs to make multiple groups before the first player's second turn. \par
|
||||||
@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
\item Groups are easiest to secure near the corners or along the edges. Play there first. \par
|
\item Groups are easiest to secure near the corners or along the edges. Play there first. \par
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\end{ORMCbox}
|
\end{hobox}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
\documentclass[
|
\documentclass[
|
||||||
solutions,
|
solutions,
|
||||||
shortwarning
|
shortwarning
|
||||||
]{../../../lib/tex/ormc_handout}
|
]{../../../lib/tex/handout}
|
||||||
\usepackage{../../../lib/tex/macros}
|
\usepackage{../../../lib/tex/macros}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user