Ver código fonte

ox-latex: Fix texttt usage in headlines

* lisp/ox-latex.el (org-latex-headline): Properly call
`org-latex--protect-texttt' on verbatim objects.

Reported-by: Greg Minshall <minshall@umich.edu>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00134.html>
Nicolas Goaziou 4 anos atrás
pai
commit
7575678959
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      lisp/ox-latex.el

+ 2 - 2
lisp/ox-latex.el

@@ -1961,8 +1961,8 @@ holding contextual information."
                ;; commands (like \section, etc.), and this causes compilation to fail.
                ;; commands (like \section, etc.), and this causes compilation to fail.
                ;; So, within headings it's a good idea to replace any instances of \verb
                ;; So, within headings it's a good idea to replace any instances of \verb
                ;; with \texttt.
                ;; with \texttt.
-               (code . (lambda (_ c _) (org-latex--protect-texttt c)))
-               (verbatim . (lambda (_ c _) (org-latex--protect-texttt c))))))
+               (code . (lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o))))
+               (verbatim . (lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o)))))))
 	   (text
 	   (text
 	    (org-export-data-with-backend
 	    (org-export-data-with-backend
 	     (org-element-property :title headline) section-back-end info))
 	     (org-element-property :title headline) section-back-end info))