소스 검색

ox-latex.el (org-latex--text-markup): Replace newlines by whitespaces in \verb constructs

* ox-latex.el (org-latex--text-markup): Replace newlines by
whitespaces in \verb constructs.

Thanks to Alan Schmitt for reporting this.
Bastien Guerry 11 년 전
부모
커밋
f8cb7803cc
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      lisp/ox-latex.el

+ 3 - 1
lisp/ox-latex.el

@@ -998,7 +998,9 @@ See `org-latex-text-markup-alist' for details."
      ;; and use "\\verb" command.
      ((eq 'verb fmt)
       (let ((separator (org-latex--find-verb-separator text)))
-	(concat "\\verb" separator text separator)))
+	(concat "\\verb" separator
+		(replace-regexp-in-string "\n" " " text)
+		separator)))
      ;; Handle the `protectedtexttt' special case: Protect some
      ;; special chars and use "\texttt{%s}" format string.
      ((eq 'protectedtexttt fmt)