emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Import and run tizk code in org-mode
@ 2017-01-13 13:37 Lawrence Bottorff
  2017-01-13 15:13 ` Nick Dokos
  0 siblings, 1 reply; 2+ messages in thread
From: Lawrence Bottorff @ 2017-01-13 13:37 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1784 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Import and run tizk code in org-mode
  2017-01-13 13:37 Import and run tizk code in org-mode Lawrence Bottorff
@ 2017-01-13 15:13 ` Nick Dokos
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2017-01-13 15:13 UTC (permalink / raw)
  To: emacs-orgmode

Lawrence Bottorff <borgauf@gmail.com> writes:

> ...
> 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?

Teach MathJax how to interpret \input perhaps? I don't know if it's
possible (and even if it is, it might be a lot of work).

I would start by visiting

   https://github.com/mathjax/MathJax-third-party-extensions

The README is useful and also contains a couple of pointers to
tutorials and doc pages on the MathJax site.

-- 
Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-13 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13 13:37 Import and run tizk code in org-mode Lawrence Bottorff
2017-01-13 15:13 ` Nick Dokos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).