emacs - 如何避免组织模式下代码块后的新段落?

标签 emacs latex org-mode

当 Org 模式导出到 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。

最佳答案

这似乎不是 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

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}

输出

Output result

关于emacs - 如何避免组织模式下代码块后的新段落?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9445252/

相关文章:

javascript - js.erb 和 css.erb 文件上良好的代码突出显示、语法分析和代码辅助编辑器

emacs - Emacs 中 forward-word/backward-word 的任意字符

emacs - 如何在组织模式下组织信息,以便将表格作为输出?

org-mode - org-mode 表内的代码块

python - 使用 Emacs 进行 Django 调试

linux - valgrind vgdb 与 emacs 中的 gdb

latex - 在 latex 中并排标记表格

input - 如何从单独的文件中读取表体?

带换行符的 Latex 命令

emacs - 其他 Emacs 模式中的 org-mode 日期