2012-02-25 9 views
6

Gdy eksportuje się w trybie Org do LaTeX, tworzy nowy akapit po blokach kodu. Jak mogę tego uniknąć?Jak uniknąć nowego akapitu po bloku kodu w trybie Org?

Rozważmy następujący przykład:

#+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 

eksportuje go do następnego 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} 

który wyprowadza jako

The output I get

Należy zauważyć, że tekst po pierwszym bloku kodu jest ustawiony jako nowy akapit. Nie chcę, aby był ustawiony jako nowy akapit. I ma to być ustawiony jako

The output I want

który jest wyjście:

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

Używam Org-mode 7.6 w Emacsa 23.3.1.

Odpowiedz

2

to nie wydaje się być problemem w Org 7.8.03. Testowanie dokładnie blok kodu zapewnia następujący wynik

Org
#+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} 
Wyjście

Output result

2

Obawiam się, nie jest to rozwiązanie tylko chcesz, ale tak czy inaczej, można ustawić wcięcia ręcznie z

#+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 
Powiązane problemy