Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

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.

@@ -851,10 +851,10 @@
- We need to consider the highest i<sub>L</sub> to be measured measured to ensure P<sub>is-loss</sub> &le; 50mW
- Highest I<sub>L(RMS)</sub> is at lowest V<sub>L(RMS)</sub> and highest VA specified (i.e., I<sub>L(RMS)</sub> = 7.5VA/13.6V = 0.55A<sub>RMS</sub>)
- 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