If I have an org-mode file where I want to embed a TikZ rendering at a
certain place, I've found the simplest is just to throw something like this
in where you want it, i.e., no latex code block necessary:

\begin{figure}
    \centering
    \newlength\figureheight
    \newlength\figurewidth
    \setlength\figureheight{6cm}
    \setlength\figurewidth{8cm}
    \input{x2vxlogx.tikz}
    %\caption{A graph}
    %\label{fig:graph}
\end{figure}

Works just fine. The whole motivation of . . .\imput{mytikzfile} being, the
.tikz code can be huge (e.g., GeoGebra sometimes coughs up massive TikZ
code brute-force-style), i.e., you don't want your orgmode file thousands
of lines longer just for a single tikz image. But in order to have it work,
I've had to change my file headers, i.e., before I had

#+OPTIONS: tex:t

this makes MathJax work, but the above tex code import not

versus

#+OPTIONS: tex:imagemagick

This makes MathJax not work, but the tex code import work. Is there anyway
to get both, i.e., have my math done by MathJax and my tikz file import
work too? I could leave it with #+OPTIONS: tex:imagemagick, but then my
math formulae are done as little pngs, which line up poorly on the page.

If no one knows a quick answer, fine. I'm coming to believe TikZ and
orgmode is just too heroic a struggle for an irregular like me. Better to
simply embed ready-made pngs and call it a day.

LB

Reply via email to