Embedded Formula Sheet and LaTeX Guide

Online Exams – Embedded Formula Sheet and LaTeX Guide

Want to embed a formula sheet displayed similar to the one below in your exam? Follow this quick guide.

Exercises

  1. National Income Formula: \(Y = C + I + G + (X-M)\)
  2. Discounting: \(PV = FV(1+r)^{-n}\)
  3. Compounding: \(FV = PV(1+r)^n\)
  4. Bond Evaluation: \[P = I\left[\frac{1-(1+r)^{-n}}{r}\right] + F(1+r)^{-n}\]
  5. Probability: \begin{align} P(A \cup B) &= P(A) + P(B) – P(A \cap B) \\ P(A \cap B) &= P(A) P(B|A) \\ P(A|B) &= \frac{P(B|A) P(A)}{P(B|A) P(A) + P(B|A’)P(A’)} \\ P(A_j | B) &= \frac{P(A_j) P(B|A_j)}{\sum P(A_i) P(B|A_i)} \end{align}
  6. Variance: \begin{align} &\mathrm{VAR}(X) = \sigma_X^2 = E[(X-\mu)^2] \\ &\mathrm{VAR}(X) = \sigma_X^2 = E(X^2)-[E(X)]^2 \\ &\mathrm{VAR}(X) = \sum_{i=1}^n \left( p_i \cdot (x_i – \mu)^2 \right) = \sum_{i=1}^n \left[ p_i \cdot \left(x_i – \sum_{i=1}^n p_i x_i \right)^2\right]\\ &\mathrm{COV}(X) = \sigma_{XY} = E(X\cdot Y)-[E(X)-E(Y)] \\ &\mathrm{VAR}(aX) = a^2 \sigma^2_X \\ &\mathrm{VAR}(aX + bY + cZ) = a^2 \sigma_X^2 + b^2 \sigma_Y^2 + c^2 \sigma_Z^2 + 2ac \sigma_{XZ} + 2bc \sigma{YZ} \end{align}
  7. Epsilon Delta Definition of Limits: \[ \lim_{x\to c}f(x)=L\iff (\forall\varepsilon\gt 0,\exists\delta\gt 0, \forall x\in D, 0\lt |x-c|\lt\delta \implies |f(x)-L|\lt \varepsilon) \]
  8. Definition of the Derivative: \begin{align} \frac{\mathrm{d}f}{\mathrm{d}x}(x) &= \lim_{\Delta x \to 0} \frac{f(x+\Delta x)-f(x)}{\Delta x} \\ \frac{\mathrm{d}f}{\mathrm{d}x}(c) &= \lim_{x \to c} \frac{f(x)-f(c)}{x-c} \end{align}
  9. Definition of the Integral: \begin{align} \Delta x &:= \frac{x_f – x_0}{n}\,,n\in\mathbb{N}\\ \int_{x_0}^{x_f} f(x)\mathrm{d}x &:= \lim_{\Delta x \to 0} \sum_{i=1}^{n} f(x_i^*) \Delta x \\ &\dots \\ f(x) &= \frac{\mathrm{d}F}{\mathrm{d}x}(x) \\ \implies \int_{x_0}^{x_f} f(x)\mathrm{d}x &= \left. F(x) \right|_{x_0}^{x_f} \end{align}
  10. Vectors: \begin{align} &\mathbf{a} + \mathbf{b} = \sum_{i}^{n} (a_i + b_i)\mathbf{\hat{e}}_i \\ & \mathbf{a} \cdot \mathbf{b} = \sum_{i}^{n} a_i \cdot b_i \\ & \mathbf{a} \times \mathbf{b} = (a_2b_3 – a_3b_2)\mathbf{\hat{i}} + (a_3b_1 – a_1b_3)\mathbf{\hat{j}} + (a_1b_2 – a_2b_1)\mathbf{\hat{k}} \\ & \mathrm{proj}_\mathbf{v} \mathbf{a} = \frac{\mathbf{a}\cdot\mathbf{v}}{{||\mathbf{v}||}^2} \mathbf{v} \\ \end{align}
  11. Static Equilibrium: \begin{align} & \sum \mathbf{F} = \mathbf{0} \\ & \implies \sum F_x = \sum F_y = \sum F_z = 0 \\ &{}\\ & \sum \mathbf{M}_P = \mathbf{0} \\ & \implies \left(\sum_i \mathbf{F}_i \times \mathbf{r}_{i}\right)_P = \sum_i \left( \det \begin{bmatrix} \mathbf{\hat{i}} & \mathbf{\hat{j}} & \mathbf{\hat{k}} \\ F_{i,x} & F_{i,y} & F_{i,z} \\ r_{i,x} & r_{i,y} & r_{i,z} \\ \end{bmatrix} \right)_P = \mathbf{0} \end{align}
  12. Schrödinger Wave Equation: \[ \left[-\frac{\hbar^2}{2m} \frac{\partial^2}{\partial x^2} +V(x,t)\right] \Psi(x,t) = i\hbar\frac{\partial}{\partial t} \Psi(x,t) \]
  13. Navier Stokes Equations: \begin{align} \nabla \cdot \mathbf{V} &= 0 \\ \rho\left[\frac{\partial \mathbf{V}}{\partial t}+(\mathbf{V}\cdot\nabla) \mathbf{V}\right] &= -\nabla p + \nabla \cdot \mathbf{\tau} + \rho\mathbf{g} \end{align}

Video Guides

Video: Common Usage Guide

Navigate with Panopto Timestamps

Solution presented in video:

<!DOCTYPE html>
<html>
<head>
<!-- un-comment the below line if you want display math to align left: -->
<!-- <script>MathJax={chtml:{displayAlign:'left'}}</script> -->
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<h3 style="text-align:center; font-size: 1.6em;"><b>Formula Sheet</b></h3>
<p>Math inline: \( 1 + 1 = 2 \)</p>
<p>Math on separate line (display math): \[ 1 + 1 = 2 \] </p>
<p>Superscript: \( x^2 \) </p>
<p>Subscript: \( x_i \) </p>
<p>Fractions: \[ \frac{1}{2} \]  </p>
<p>Summation: \( \sum_{i=1}^{n} \) </p>
<p>Size-fitting-brackets: \[ \left( \sum \right) \]</p>
<p>Greek letter: \( \Gamma \gamma \)<p>
</body>
</html>

Video: Comprehensive LaTeX Equations Guide / Walkthrough

  • Navigate with Panopto Timestamps
  • NOTE: this video deals with more niche equations that are not typically seen. Content may be varyingly applicable.

Solutions produced from video:

<!DOCTYPE html>
<html>
<head>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<!-- type formula sheet below --!>
<p>Exercises</p>
<ol>
<li>
National Income Formula: 
\( Y = C + I + G + (X - M) \)
</li>
<li>Discounting:
\(PV = FV(1+r)^{-n}\)</li>
<li>Compounding:
\( FV = PV(1+r)^n\)</li>
<li>Bond Evaluation:
\[ 
P = I \left[ \frac{1-(1+r)^{-n}}{r}\right] + F(1+r)^{-n}
\]
</li>
<li>Probabiliy
\begin{align}
P(A \cup B) &= P(A) + P(B) - P(A \cap B) \\
P(A \cap B) &= P(A)P(B|A) \\
P(A|B) &= \frac{P(B|A)P(A)}{P(B|A)P(A)+P(B|A')P(A')} \\
P(A_j|B) &= \frac{P(A_j)P(B|A_j)}{\sum P(A_i)P(B|A_i)}
\end{align}
</li>
<li>
Variance:
\begin{align}
&\mathrm{VAR}(X)=\sigma^2_X = E[(X-\mu)^2]\\
&\mathrm{VAR}(X)=\sigma^2_X = E(X^2)-[E(X)]^2 \\
&\mathrm{VAR}(X)=\sum_{i=1}^n \left( p_i \cdot (x_i - \mu)^2 \right) = \sum_{i=1}^n 
\left[ p_i \cdot \left( x_i - \sum_{i=1}^n p_i x_i \right)^2\right] \\
&\mathrm{COV}(X) = \sigma_{XY} = E(X \cdot Y) - [E(X) - E(Y)] \\
&\mathrm{VAR}(aX) = a^2 \sigma^2_X\\
&\mathrm{VAR}(aX + bY + cZ) = a^2\sigma^2_X + b^2\sigma^2_Y + c^2\sigma^2_Z + 2ac\sigma_{XZ} + 2bc\sigma_{YZ}
\end{align}
</li>
<li>
Epsilon Delta Definition of Limits:
\[
\lim_{x \to c} f(x) = L \iff (\forall \varepsilon > 0, \exists \delta > 0, \forall x \in D, 0 < |x-c| < \delta \implies |f(x) - L| < \varepsilon)
\]
</li>
<li>
Definition of the Derivative:
\begin{align}
\frac{\mathrm{d}f}{\mathrm{d}x}(x) &= \lim_{\Delta x \to 0} \frac{f(x+\Delta x)-f(x)}{\Delta x} \\
\frac{\mathrm{d}f}{\mathrm{d}x}(c) &= \lim_{x\to c} \frac{f(x) - f(c)}{x-c}
\end{align}
</li>
<li>
Definition of the Integral:
\begin{align}
\Delta x &:= \frac{x_f - x_0}{n}, n \in \mathbb{N} \\
\int_{x_0}^{x_f} f(x) \mathrm{d}x&:= \lim_{\Delta x \to 0}\sum_{i=1}^n f(x_i^*)\Delta x \\
& \dots \\
f(x) &= \frac{\mathrm{d}F}{\mathrm{d}x}(x) \\
\implies \int_{x_0}^{x_f} f(x) \mathrm{d}x 
&= \left. F(x) \right|_{x_0}^{x_f}
\end{align}
</li>
<li>
Vectors:
\begin{align}
&\mathbf{a} + \mathbf{b} = \sum_i^n (a_i + b_i) \mathbf{\hat{e}}_i\\
&\mathbf{a} \cdot \mathbf{b} = \sum_i^n a_i \cdot b_i \\
&\mathbf{a} \times \mathbf{b} = (a_2b_3 - a_3b_2)\mathbf{\hat{i}} + (a_3b_1 - a_1b_3) \mathbf{\hat{j}} + (a_1b_2 - a_2b_1) \mathbf{\hat{k}} \\
&\mathrm{proj}_\mathbf{v}\mathbf{a} = \frac{\mathbf{a}\cdot\mathbf{v}}{||\mathbf{v}||^2} \mathbf{v}
\end{align}
</li>
<li>
Static Equilibrium:
\begin{align}
& \sum \mathbf{F} = \mathbf{0} \\
&\implies \sum F_x = \sum F_y = \sum F_z = 0 \\
&\sum \mathbf{M}_P = \mathbf{0} \\
&\implies \left( \sum_i \mathbf{F}_i \times \mathbf{r}_i \right)_P = \sum_i
\left( \mathrm{det}
\begin{bmatrix}
\mathbf{\hat{i}} & \mathbf{\hat{j}} & \mathbf{\hat{k}} \\
F_{i,x} & F_{i,y} & F_{i,z} \\
r_{i,x} & r_{i,y} & r_{i,z} \\
\end{bmatrix}
\right)_P = \mathbf{0}
\end{align}
</li>
<li>Schrödinger Wave Equation
\[
\left[ - \frac{\hbar^2}{2m} \frac{\partial^2}{\partial x^2} + V(x,t)\right] \Psi (x, t) = i \hbar \frac{\partial}{\partial t} \Psi (x, t)
\]
</li>
<li>
Navier Stokes Equations:
\begin{align}
\nabla \cdot \mathbf{V} &= 0 \\
\rho \left[ \frac{\partial \mathbf{V}}{\partial t} + (\mathbf{V} \cdot \nabla) \mathbf{V}\right] &= -\nabla p + \nabla \cdot \tau + \rho \mathbf{g}
\end{align}
</li>
<li>
Bonus meme:
\[ \Huge{\mathscr{B}\mathfrak{onus}\,\mathscr{M}\mathfrak{eme}}\]
</li>
</ol>
<!-- type formula sheet above --!>
</body>
</html>

Procedures

Step 0: Assess Usage Case

See this sample Canvas quiz: Sample Quiz – Embedded Formula Sheet for a demonstration of how the formula sheet set-up presented below looks in an actual exam on Canvas.

If your exam …

  • Is long OR
  • Requires lots of formula use OR
  • Prohibits switching tabs (e.g. in LDB) OR
  • Needs strict mathematical formatting

… then consider using the method in this quiz to create & embed your formula sheet.

While it may take longer to set-up, this method:

  • Reduces load time
  • Reduces scrolling / tab switching for students
  • Offers flexibility (formula sheet collapsible)
  • Has more consistent formatting

Step 1: Download Template

Download this file: blank_formula_template.html or copy the below code to a plain text file and save as an HTML.

<!DOCTYPE html>
<html>
<head>
<!-- un-comment the below line if you want display math to align left: -->
<!-- <script>MathJax={chtml:{displayAlign:'left'}}</script> -->
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<!-- type formula sheet below -->

<!-- type formula sheet above -->
</body>
</html>

Step 2: Edit The File Using HTML and LaTeX

This page lays out the comprehensive syntax guide for typing the formula sheets. Also consider the video guides above.

Step 3: Embed File to Quiz

  • Open / create quiz (classic engine).
  • Add question of type “Text (no question)”.
  • Open HTML editor, paste in the following snippet

<p>
<span class="element_toggler btn btn-primary" style="padding: 8px; background-color: navy; color: white; border: 0px;" role="button" aria-controls="toggle-content" aria-label="Toggler toggle list visibility" aria-expanded="false"><i>Click to expand button</i></span>
</p>
<ul id="toggle-content" style="list-style: none; display: none;">
<li>
<iframe src="<file link>" width="100%" height="500px"></iframe>
</li>
</ul>
  • After pasting, open course “files” in another tab
  • Click Upload and upload HTML file from Step 2
  • Right click on uploaded file, click “Copy link”
  • Go back to quiz
  • In the Canvas html editor, paste copied link into <file link>
  • In the pasted URL, change download?download_frd=1 to download?inline=1
  • Save question & quiz

Short Walk-Through Quiz

Want to see what the quiz will look like?

here is an example: Quiz – Embedded Formula Sheet Minimal. This will also walk you through the steps.
Includes code snippets and blank template. Blank template also below.

LaTeX Comprehensive Guide

Spam prevention powered by Akismet