emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ox-latex: Replace \verb instances in headings with \texttt


From: Timothy
Subject: Re: [PATCH] ox-latex: Replace \verb instances in headings with \texttt
Date: Fri, 02 Apr 2021 23:26:43 +0800
User-agent: mu4e 1.4.15; emacs 28.0.50

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Timothy <tec@tecosaur.com> writes:
>
>> * lisp/ox-latex.el (org-latex-format-headline-default-function): Convert
>> any instances of \verb text with \texttt.  This is required to work
>> around LaTeX peculiarities that would otherwise cause compilation to
>> fail (see the code comment for more information).
>
> This is not the appropriate location for the fix.
>
> In `section-back-end' variable within `org-latex-headline', you can
> extend the local export back-end to handle correctly verbatim markup.
>
> Regards,

I've just had a look; I don't feel that confident with my usage after
checking the docstring for `org-export-create-backend'. Would you mind
giving the below a quick look and letting me know if it looks right to
you?

#+begin_src diff
@@ -1960 +1960,3 @@ (defun org-latex-headline (headline contents info)
-            '((underline . (lambda (o c i) (format "\\underline{%s}" c))))))
+            '((underline . (lambda (o c i) (format "\\underline{%s}" c))))
+        :options
+        '((:latex-text-markup-alist ((code . protectedtexttt))))))
#+end_src diff

--
Timothy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]