From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Import and run tizk code in org-mode Date: Fri, 13 Jan 2017 08:37:35 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114098d4c8bcf30545f9ef01 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS230-0001wp-GK for emacs-orgmode@gnu.org; Fri, 13 Jan 2017 08:37:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cS22z-0000th-F5 for emacs-orgmode@gnu.org; Fri, 13 Jan 2017 08:37:38 -0500 Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:35769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cS22z-0000tR-8P for emacs-orgmode@gnu.org; Fri, 13 Jan 2017 08:37:37 -0500 Received: by mail-oi0-x22c.google.com with SMTP id j15so57004113oih.2 for ; Fri, 13 Jan 2017 05:37:36 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode Mailinglist --001a114098d4c8bcf30545f9ef01 Content-Type: text/plain; charset=UTF-8 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 --001a114098d4c8bcf30545f9ef01 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
If I have an org-mode file where I want to embed a Ti= kZ rendering at a certain place, I've found the simplest is just to thr= ow something like this in where you want it, i.e., no latex code block nece= ssary:

\begin{figure}
=C2=A0 =C2=A0 \cen= tering
=C2=A0 =C2=A0 \newlength\figureheight=C2=A0
=C2= =A0 =C2=A0 \newlength\figurewidth=C2=A0
=C2=A0 =C2=A0 \setlength\= figureheight{6cm}=C2=A0
=C2=A0 =C2=A0 \setlength\figurewidth{8cm}=
=C2=A0 =C2=A0 \input{x2vxlogx.tikz}
=C2=A0 =C2=A0 %\ca= ption{A graph}
=C2=A0 =C2=A0 %\label{fig:graph}
\end{fi= gure}

Works just fine. The whole motivation of . .= .\imput{mytikzfile} being, the .tikz code can be huge (e.g., GeoGebra some= times coughs up massive TikZ code brute-force-style), i.e., you don't w= ant your orgmode file thousands of lines longer just for a single tikz imag= e. 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:imagem= agick

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 l= ine up poorly on the page.

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

LB
--001a114098d4c8bcf30545f9ef01--