From 3e018d0afd8665248037d4a3beda1b132a1fa2b2 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 4 Aug 2014 15:21:51 +0200 Subject: [PATCH] ox-texinfo: Fix verse block export * lisp/ox-texinfo.el (org-texinfo-verse-block): Generate somewhat meaningful Texinfo code instead of LaTeX. --- lisp/ox-texinfo.el | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 6727ad53b..1cc874477 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -1609,20 +1609,7 @@ channel." "Transcode a VERSE-BLOCK element from Org to Texinfo. CONTENTS is verse block contents. INFO is a plist holding contextual information." - ;; In a verse environment, add a line break to each newline - ;; character and change each white space at beginning of a line - ;; into a space of 1 em. Also change each blank line with - ;; a vertical space of 1 em. - (progn - (setq contents (replace-regexp-in-string - "^ *\\\\\\\\$" "\\\\vspace*{1em}" - (replace-regexp-in-string - "\\(\\\\\\\\\\)?[ \t]*\n" " \\\\\\\\\n" contents))) - (while (string-match "^[ \t]+" contents) - (let ((new-str (format "\\hspace*{%dem}" - (length (match-string 0 contents))))) - (setq contents (replace-match new-str nil t contents)))) - (format "\\begin{verse}\n%s\\end{verse}" contents))) + (format "@display\n%s@end display" contents)) ;;; Interactive functions -- 2.11.4.GIT