0

我正在我的 org 文件中编写 LaTeX,并使用src_lang 内联代码块(在我的情况下为 lang=lisp)进行嵌入式代码评估。这在使用裸 LaTeX 进行导出时效果很好,但我希望 AUCTeX 编辑和突出显示在 org 文件中的裸 LaTeX 中不可用。我能看到获得 AUCTeX 的唯一方法是使用LaTeX 源代码块;这就是我想要的,但现在内联代码块没有展开;相反,它们按字面意思导出到 LaTeX。有没有办法让一个可导出的 LaTeX 源代码块在导出时扩展内联代码块,或者以某种方式让 AuCTeX 编辑功能与内联 src_lang 代码块得到扩展?

例子:

* This is an example
#+BEGIN_SRC latex
This is an example.  The sum of 2 and 2 is $src_lisp{(+ 2 2)}$.
#+END_SRC

产生(为了清楚起见,删除了很多序言)

\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}

然而

* This is an example
This is an example.  The sum of 2 and 2 is $src_lisp{(+ 2 2)}$.

生产

\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}
4

1 回答 1

0

我知道这是一个很晚的答案,但我认为CDLaTeX可能是您正在寻找的。

于 2016-07-27T04:56:25.137 回答