在组织模式下代码阻止后如何避免新段落?

时间:2012-02-25 15:19:08

标签: emacs latex org-mode

当Org-mode导出到LaTeX时,它会在代码块之后生成一个新段落。我怎么能避免这个?

考虑以下示例:

#+TITLE: Example

#+BEGIN_SRC emacs-lisp
(setq foo "bar")
#+END_SRC
A paragraph contains some text and this text only serves as example text.
#+BEGIN_SRC emacs-lisp
(setq bar "foo")
#+END_SRC

导出到以下LaTeX

\begin{verbatim}
(setq foo "bar")
\end{verbatim}



A paragraph contains some text and this text only serves as example text.

\begin{verbatim}
(setq bar "foo")
\end{verbatim}

输出

The output I get

请注意,第一个代码块后面的文本被设置为新段落。我不希望它被设置为新段落。我希望它被设置为

The output I want

这是输出:

\begin{verbatim}
(setq foo "bar")
\end{verbatim}
A paragraph contains some text and this text only serves as example text.
\begin{verbatim}
(setq bar "foo")
\end{verbatim}

我在Emacs 23.3.1中运行Org-mode 7.6。

2 个答案:

答案 0 :(得分:2)

我担心这不是您想要的解决方案,但无论如何,您可以手动设置缩进

#+BEGIN_SRC emacs-lisp
(setq foo "bar")
#+END_SRC
#+LATEX:\noindent
A paragraph contains some text and this text only serves as example text.
#+BEGIN_SRC emacs-lisp
(setq bar "foo")
#+END_SRC

答案 1 :(得分:2)

这似乎不是Org 7.8.03中的问题。测试您的确切代码块提供以下输出

组织
#+TITLE: Example

#+BEGIN_SRC emacs-lisp
(setq foo "bar")
#+END_SRC
A paragraph contains some text and this text only serves as example text.
#+BEGIN_SRC emacs-lisp
(setq bar "foo")
#+END_SRC
胶乳
\begin{verbatim}
(setq foo "bar")
\end{verbatim}
A paragraph contains some text and this text only serves as example text.

\begin{verbatim}
(setq bar "foo")
\end{verbatim}
产量

Output result