9

Is this possible? (I know it's possible for #+BEGIN_SRC latex blocks.)

8

It seems to be possible, by specifying latex as an extra parameter to the LaTeX fragment (!), as if it were a src block.

#+BEGIN_LaTeX latex
\begin{tikzpicture}
  \draw[dashed] (0,0) -- (1,1) ;
\end{tikzpicture}
#+END_LaTeX

To compare:

screenshot

(from Reddit)

I'm not sure the behavior is intentional, but it seems to be working great.

  • 1
    I don't care if this is intentional or not, it's incredible helpful, thank you @VanLaser! – Dieter.Wilhelm Oct 18 '16 at 15:32
  • I call it a beginner's luck, looking through Org mode source code :P What I can't understand is how this behavior wasn't already stumbled upon, even by mistake (it seems easy enough to (mis)type). – VanLaser Oct 18 '16 at 20:26
  • 1
    That is what I understood. My request is that you update your answer so that it is readable without relying on external links and any external links included are functional. – Andrew Swann Oct 21 '16 at 17:53
  • 2
    The links may work for you, but the point is to make the content available to your readers… Please don't rely on external links in your answer. Use the image tool to include images rather than linking to external images, that uploads the image to a service that partners with Stack Exchange (images on imgur ordinarily expire after a while, but not those on the SE/imgur partner site). – Gilles Oct 22 '16 at 10:53
  • 1
    Thanks for the edit. When volunteering my free time, I usually don't try to solve non-problems, especially when requested and there's not an actual need. – VanLaser Oct 22 '16 at 13:56
2

I believe that for the current version of Org Mode that I am using (Org mode 9.1.9), that the command has changed to #+BEGIN_EXPORT latex and #+END_EXPORT latex. See https://orgmode.org/manual/Quoting-LaTeX-code.html#Quoting-LaTeX-code for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.