3

In org-mode, try to push LaTex code to generate matrix like this

enter image description here

The code is like this:

#+BEGIN_SRC latex
  \[ G_{x} = \left[ \begin{array}{ccc}
  -1 & 0 & 1 \\
  -2 & 0 & 2 \\
  -1 & 0 & 1 \end{array} \right] {\hspace{2em}} G_{y} = \left[ \begin{array}{ccc}
  -1 & -2 & -1 \\
   0 &  0 &  0 \\
  1 & 2 & 1 \end{array} \right] \]
#+END_SRC

But when I try to export ORG file to ODT document, the matrix are not presented. Do I need any options or configuration for my org-mode?

Thanks

enchanter
  • 884
  • 8
  • 20

1 Answers1

1

Untested, but there are a couple of answers to this in the Org-mode manual, specifically they involve wrapping the snippet in \begin{equation}and \end{equation} rather than #+begin_src (which I think will result in embedding the source in the ODT), and setting an option (such as #+OPTIONS: tex:imagemagick) which will ask Org-mode to embed LaTeX as images.

http://orgmode.org/manual/Working-with-LaTeX-math-snippets.html#Working-with-LaTeX-math-snippets

Note: this may be specific to your version of Org-mode -- the exporter framework was significantly overhauled for 8.0 and I believe this documentation applies to Org-mode 8.0.

  • thanks for you answer. I tried \begin|\end, it works only for preview in Emacs. But I will not export it to ODT by default. I follow the link you provide and I can see the equations there with some minor problems. 1) It always has a upside down "?" before equations. 2) The index of the equations are all "(1)", not increment numbers. – enchanter Mar 17 '14 at 22:49
  • Hmmm. I suggest posting to the Org-mode mailing list (http://orgmode.org/community.html). I'm pretty sure that you'll hook up with someone who does exactly this -- I'd post your question and clarify the platform you're using (Windows/Linux/Mac) and the version of Org-mode you're on (`M-x org-version`). – Stuart Hickinbottom Mar 18 '14 at 07:56