Hello
Alan,
I'm not 100% sure, but I think the distorted PNG file is generated by dvipng. It seems that dvipng cannot handle tikz blocks very well, and one must use imagemagick for those blocks. I think this line:
#+header: :imagemagick :iminoptions -density 600 :imoutoptions -geometry 800
should be
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 800
so that imagemagick would be used instead of dvipng, which is the global default.
As said by Andreas, it's probably that
your
by
-backend
macro
is not working
properly, or, maybe you are not using a recent enough version of org-mod
e
. This
magic, if I remember correctly,
is
act
uall
y
done
by
a
special
case
added
to
some
latex
babel
export
function
, wh
ich is contributed by Andreas somehow recently. You may want to try upgrade your org-mode and try again.
Also please follow this link [1] to fix a bug
in htlatex as mentioned in Andreas's mail, or your html export will fail silently (showing success on emacs, but no images generated).
[1] http://tex.stackexchange.com/a/232739