Sfoglia il codice sorgente

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 anni fa
parent
commit
739c6c31f7
3 ha cambiato i file con 17 aggiunte e 3 eliminazioni
  1. +16
    -0
      gui/formulas.tex
  2. BIN
      gui/img/filter_formula.png
  3. +1
    -3
      gui/index.html

+ 16
- 0
gui/formulas.tex Vedi File

@@ -0,0 +1,16 @@
% 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 Vedi File

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

+ 1
- 3
gui/index.html Vedi File

@@ -4519,9 +4519,7 @@ double s_freq = .0625;</p>
frequency is:
</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>When operating with signal control of corner frequency, this
object uses approximately 4% of the CPU time on Teensy 3.1.

Loading…
Annulla
Salva