2012-02-25 56 views
6

當組織模式導出到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 

它輸出給下面的乳膠

\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

這是輸出:我在Emacs 23.3.1運行組織模式7.6

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

回答

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

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