Skip to content

Comments

docs: 📝 enhance readability of KaTeX (#2)#3

Open
JamesNZL wants to merge 7 commits intouoa-ece209:masterfrom
JamesNZL:enhance-katex
Open

docs: 📝 enhance readability of KaTeX (#2)#3
JamesNZL wants to merge 7 commits intouoa-ece209:masterfrom
JamesNZL:enhance-katex

Conversation

@JamesNZL
Copy link
Member

@JamesNZL JamesNZL commented Aug 19, 2022

Description

Main Changes

  1. Uses \text{L} to distinguish between $\text{L}$ for 'load', and $L$ for an inductor

    • $v_\text{L}$ for load voltage
    • $v_L$ for inductor voltage
  2. Replaces one-line / fractions with \frac when possible

  3. \mathit{p.f.} to avoid extra whitespace added between each character in maths mode

    • $p.f.$ this is the default
    • $\mathit{p.f.}$ this is with \mathit
  4. \mathtt for register variables, eg $\mathtt{ADC0Value}$

  5. Uses \cos and \sin commands to property typeset sinusoidal functions

    • $sin(1000\pi f)$ before
    • $\sin(1000\pi f)$ after
  6. Properly typesets quantities and units

    • $0.5A$ before
    • $0.5\hspace{3mu} \text{A}$ after

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Why Should This Be Merged?

I believe these changes make it much easier to visually discriminate between the different mathematical content of the lecture slides by properly typesetting variables and text annotations.

How Has This Been Tested?

cs209.pdf
cs209.zip

I have tested this with a $\LaTeX$ document as above, with the source in the following format:

% original KaTeX source
original KaTeX converted to LaTeX
new LaTeX

% original KaTeX source
original KaTeX converted to LaTeX
new LaTeX

...

A staging environment is live at https://jamesnzl.github.io/uoa-ece209.github.io where all changes can be previewed.

I have also tried to respect line-width with inline equations and line-height with block equations to avoid slide overflows, and have fully tested this in the staging environment.

@JamesNZL
Copy link
Member Author

JamesNZL commented Aug 19, 2022

Deployed a GitHub Pages staging environment on my fork, changes can be previewed at https://jamesnzl.github.io/uoa-ece209.github.io.

@JamesNZL
Copy link
Member Author

Ready to be reviewed and merged!

@JamesNZL JamesNZL mentioned this pull request Aug 20, 2022
4 tasks
Copy link
Member Author

@JamesNZL JamesNZL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- Using this information we can derive the relation
\\[ P\_{is-loss} = I^2\_{L(RMS)} R\_s \quad \Rightarrow \quad 0.05 \geq 0.55^2 R\_s \quad \Rightarrow \quad R\_s \leq 165 m\Omega \\]
\\[ P\_\text{is-loss} = I^2\_\text{L(RMS)}\cdot R\_\text{s} \quad \Rightarrow \quad 0.05 \geq 0.55^2 R\_\text{s} \quad \Rightarrow \quad R\_\text{s} \leq 165\, \text{m}\Omega \\]
- If R<sub>s</sub> is choosen as 160m&Omega;, V<sub>is</sub> measured at both highest and lowest i<sub>L</sub> are
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning
This may cause merge conflicts with #4.

To resolve this conflict, accept the changes from this branch and manually apply the typo fix in #4 by changing choosen -> chosen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance KaTeX in lecture slides

1 participant