texdrive is an emacs minor-mode for adding mathematical equations to html-pages; things like Euler's , Pythagoras
and so on... It's a replacement for a little tool called WebTex that I wrote a few years ago.
M-x texdrive-insert-formula Formula: $P(A|B) = \frac{P(B|A)P(A)}{P(B|A)P(A) + P(B|\overline{A})P(\overline{A})}$ Title: bayes-theoremEt voilą; the following is inserted:
<img src="bayes-theorem.png" title="bayes-theorem" class="texdrive-formula" name="$P(A|B) = \frac{P(B|A)P(A)}{P(B|A)P(A) + P(B|\overline{A})P(\overline{A})}$" border="0">Now, all we need to do is texdrive-generate-images-from-html RET, and the corresponding image will be generated:
(require 'texdrive)to your .emacs. Then, to enable the texdrive minor mode:
(texdrive-mode)This will enable two keybindings:
#!/bin/sh emacs -batch -nw --eval="(load-library \"~/.elisp/texdrive.el\")" --eval="(texdrive-create-png \"$1\" \"$2\")" 2>&1 | grep -v 'Loading\|Skipping'Now, use
$ texdrive.sh abc 'a^2 + b^2 = c^2'to create abc.png. (Note: you'll probably need to update the path to 'texdrive.el'.)