From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liam Healy Subject: LaTeX with embedded in-line code blocks and AucTeX Date: Sun, 17 Mar 2013 17:52:10 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHLVJ-000441-6e for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 17:52:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHLVI-0004WD-5o for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 17:52:33 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:55890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHLVH-0004Vx-Vp for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 17:52:32 -0400 Received: by mail-pb0-f52.google.com with SMTP id ma3so5889559pbc.39 for ; Sun, 17 Mar 2013 14:52:30 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode mailing list I am writing LaTeX in my org file with embedded code evaluation using src_lang in-line code blocks (in my case, lang=lisp). This works fine when using bare LaTeX for export, but I would like AUCTeX editing and highlighting which are not available with bare LaTeX in the org file. The only way I can see to get AUCTeX is to use a LaTeX source code block; this does what I want, but now the inline code blocks are not expanded; instead, they are exported literally to the LaTeX. Is there a way to have an exportable LaTeX source code block that expands in-line code blocks on export, or somehow have the AuCTeX editing features with in-line src_lang code blocks that get expanded? Example: * This is an example #+BEGIN_SRC latex :exports code :file example.pdf This is an example. The sum of 2 and 2 is $src_lisp{(+ 2 2)}$. #+END_SRC produces (removing a lot of preamble for clarity) \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \section{This is an example} \label{sec-1} This is an example. The sum of 2 and 2 is $src_lisp{(+ 2 2)}$. \end{document} whereas * This is an example This is an example. The sum of 2 and 2 is $src_lisp{(+ 2 2)}$. produces \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \section{This is an example} \label{sec-1} This is an example. The sum of 2 and 2 is $=4=$. \end{document} Is this a bug in org-mode, or is there some configuration I need to change? Org-mode version 8.0-pre (release_8.0-pre-111-g7b3601) Thanks, Liam