2.3 Theorem styles
preamble/SoM.tex defines a range of theorem-like styles, and sets up sequential numbering indexed on chapter. Here is an example of a theorem and a proof environment. Theorem 2.1 and its proof will be in the exam:
Theorem 2.1.
Let , for and some . If , then as . Change
Proof.
We have
and so as if . ∎
Note that the align environment is used in the proof, and also works as expected in the HTML version.
There is also a numbered “Example” environment, which has a left-side bar to differentiate it from the rest of the notes. To remove the numbering, see SoM.tex.
Example 2.2.
Let
We want to put into row echelon form. We create zeros below the diagonal in the first column by subtracting multiples of the first row from the other rows:
Repeating this for the second column
The above procedure factorises as .
And some extra text after the example to show the return to the regular layout.
If you wish to use a different theorem style, you can do so by editing preamble/SoM.tex. To reflect these changes in the HTML, you can edit the CSS in bmluser/SoM.css. .ltx_theorem_theorem is the class for theorems, and .ltx_theorem_proof and similar. to edit specifically wish to edit the way it looks in sepia mode or night mode. Add css to .color-theme-1 .ltx_theorem_theorem and .color-theme-1 .ltx_theorem_theorem respectively.
2.3.1 Solutions
If you wish to hide create a version of the documents with and without solutions, this is generally done using the version package. This is not compatible with BookML. However, we can navigate this with a few options.
The first choice is to replicate the package using the comment package. Add this code to your preamble.
\iflatexml\usepackage{comment}% \excludecomment{sol}\includecomment{sol}\else\usepackage{version}% \excludeversion{sol}\includeversion{sol}\fi
Alternatively, if you wish to allow students to view solutions but have them hidden, you can use HTML to create a dropdown that students can access with the solution under. Uncomment the following code in SoM.tex.
\iflatexml\renewenvironment{solution}{\<details style="text-align: left; width: 100\%" open="">\<summary> \textbf{Solution} \</summary> \\}{\</details> }\else\usepackage{version}% \excludeversion{solution}\includeversion{solution}\fi
This would look like:
Solution
This is how we solve a quadratic.