# Syntax highlighting in org mode #+BEGIN_LATEX block

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

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:

(from Reddit)

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

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

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.