mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 00:32:54 +00:00
org-latex: check for protection before wrapping ": " lines as verbatim
* lisp/org-latex.el (org-export-latex-fixed-width): check for protection before wrapping ": " lines as verbatim
This commit is contained in:
parent
a8a26f245b
commit
da8fffa5a4
|
@ -1537,20 +1537,20 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
||||||
"When OPT is non-nil convert fixed-width sections to LaTeX."
|
"When OPT is non-nil convert fixed-width sections to LaTeX."
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "^[ \t]*:\\([ \t]\\|$\\)" nil t)
|
(while (re-search-forward "^[ \t]*:\\([ \t]\\|$\\)" nil t)
|
||||||
(if opt
|
(org-if-unprotected
|
||||||
(progn (goto-char (match-beginning 0))
|
(if opt
|
||||||
(insert "\\begin{verbatim}\n")
|
(progn (goto-char (match-beginning 0))
|
||||||
(while (looking-at "^\\([ \t]*\\):\\(\\([ \t]\\|$\\).*\\)$")
|
(insert "\\begin{verbatim}\n")
|
||||||
(replace-match (concat (match-string 1)
|
(while (looking-at "^\\([ \t]*\\):\\(\\([ \t]\\|$\\).*\\)$")
|
||||||
(match-string 2)) t t)
|
(replace-match (concat (match-string 1)
|
||||||
(forward-line))
|
(match-string 2)) t t)
|
||||||
(insert "\\end{verbatim}\n\n"))
|
(forward-line))
|
||||||
(progn (goto-char (match-beginning 0))
|
(insert "\\end{verbatim}\n\n"))
|
||||||
(while (looking-at "^\\([ \t]*\\):\\(\\([ \t]\\|$\\).*\\)$")
|
(progn (goto-char (match-beginning 0))
|
||||||
(replace-match (concat "%" (match-string 1)
|
(while (looking-at "^\\([ \t]*\\):\\(\\([ \t]\\|$\\).*\\)$")
|
||||||
(match-string 2)) t t)
|
(replace-match (concat "%" (match-string 1)
|
||||||
(forward-line))))))
|
(match-string 2)) t t)
|
||||||
|
(forward-line)))))))
|
||||||
|
|
||||||
(defvar org-table-last-alignment) ; defined in org-table.el
|
(defvar org-table-last-alignment) ; defined in org-table.el
|
||||||
(defvar org-table-last-column-widths) ; defined in org-table.el
|
(defvar org-table-last-column-widths) ; defined in org-table.el
|
||||||
|
|
Loading…
Reference in a new issue