簡體   English   中英

帶有嵌入式嵌入式代碼塊和AucTeX的LaTeX

[英]LaTeX with embedded in-line code blocks and AucTeX

我正在使用src_lang 內聯代碼塊 (在我的情況下為lang = lisp) 具有嵌入式代碼評估的組織文件中編寫LaTeX。 在使用裸機LaTeX進行導出時,這可以很好地工作,但是我希望AUCTeX進行編輯和突出顯示,而org文件中的裸機LaTeX則不提供這些功能。 我看到的唯一獲得AUCTeX的方法是使用LaTeX源代碼塊 這就是我想要的,但是現在內聯代碼塊沒有擴展; 而是直接將它們導出到LaTeX。 有沒有一種方法可以使可導出的LaTeX源代碼塊在導出時擴展行內代碼塊,或者以某種方式具有經過擴展的行內src_lang代碼塊的AuCTeX編輯功能?

例:

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

我知道這是一個很晚的答案,但是我認為CDLaTeX可能正是您想要的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM