emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Liam Healy <lnp@healy.washington.dc.us>
To: Org-mode mailing list <emacs-orgmode@gnu.org>
Subject: LaTeX with embedded in-line code blocks and AucTeX
Date: Sun, 17 Mar 2013 17:52:10 -0400	[thread overview]
Message-ID: <CADe9tL7JOvhuyruU5mGKCEPDe6F-88Eb7aPkFodUbRwUTSyWYA@mail.gmail.com> (raw)

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

             reply	other threads:[~2013-03-17 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 21:52 Liam Healy [this message]
2013-03-19 17:20 ` LaTeX with embedded in-line code blocks and AucTeX Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADe9tL7JOvhuyruU5mGKCEPDe6F-88Eb7aPkFodUbRwUTSyWYA@mail.gmail.com \
    --to=lnp@healy.washington.dc.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).