diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 991b539d7..f24bba987 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * org-latex.el (org-export-latex-fontify): Apply verbatim emphasis. + (org-export-latex-make-header): Insert \obeylines if line breaks + should be preserved. * org-exp.el (org-export-protect-verbatim): Add an `org-verbatim-emph' property to such text. diff --git a/lisp/org-latex.el b/lisp/org-latex.el index d161a9dad..af598c6f9 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1007,7 +1007,9 @@ OPT-PLIST is the options plist for current buffer." (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\\vspace*{1cm}\n" (min toc (plist-get opt-plist :headline-levels)))) (toc (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\\vspace*{1cm}\n" - (plist-get opt-plist :headline-levels)))))))) + (plist-get opt-plist :headline-levels))))) + (when (plist-get opt-plist :preserve-breaks) + "\\obeylines\n")))) (defun org-export-latex-first-lines (opt-plist &optional beg end) "Export the first lines before first headline.