9

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

0

2 Answers 2

9

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.

9
  • 1
    I don't care if this is intentional or not, it's incredible helpful, thank you @VanLaser! Oct 18, 2016 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, 2016 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. Oct 21, 2016 at 17:53
  • 3
    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). Oct 22, 2016 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, 2016 at 13:56
5

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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