Browse Source

Chamberlin: change formula to latex graphic

Replace the text formula with a png graphic generated from some
LaTeX source.
Formulas in HTML apparently never made it in the mainstream,
and the recommendation is to use LaTex to generate images. See:
https://www.w3.org/MarkUp/HTMLPlus/htmlplus_45.html

To convert the .tex to a png, try:
  pdflatex formulas.tex
  convert -density 300 formulas.pdf -quality 95 formulas.png

Signed-off-by: Graham Whaley <graham.whaley@gmail.com>
dds
Graham Whaley 4 years ago
parent
commit
739c6c31f7
3 changed files with 17 additions and 3 deletions
  1. +16
    -0
      gui/formulas.tex
  2. BIN
      gui/img/filter_formula.png
  3. +1
    -3
      gui/index.html

+ 16
- 0
gui/formulas.tex View File

% Generate plain formulas to be turned into png files via a pdf. Code hints taken
% from:
%
% https://tex.stackexchange.com/questions/287481/using-latex-to-generate-png-images-of-an-equation/287501
%
\documentclass[multi={mymath},border=1pt]{standalone}
% \usepackage{amsmath}
\newenvironment{mymath}{$\displaystyle}{$}

\begin{document}

\begin{mymath}
F = Fcenter * 2^{(signal * octaves)}
\end{mymath}

\end{document}

BIN
gui/img/filter_formula.png View File

Before After
Width: 555  |  Height: 47  |  Size: 3.6KB

+ 1
- 3
gui/index.html View File

frequency is: frequency is:
</p> </p>
<p> <p>
F = Fcenter * 2^<sup>(signal * octaves)</sup>
<br><small>If anyone knows how to do HTML equations, please
help me improve this.....</small>
<img src="img/filter_formula.png">
</p> </p>
<p>When operating with signal control of corner frequency, this <p>When operating with signal control of corner frequency, this
object uses approximately 4% of the CPU time on Teensy 3.1. object uses approximately 4% of the CPU time on Teensy 3.1.

Loading…
Cancel
Save