emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] LaTeX: verbatim cannot be used in caption


From: Nicolas Goaziou
Subject: Re: [BUG] LaTeX: verbatim cannot be used in caption
Date: Sun, 06 Jun 2021 22:14:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello,

Timothy <tecosaur@gmail.com> writes:

> In exactly the same vein as
> https://orgmode.org/list/87mtujfj8k.fsf@tecosaur.com/, verbatim text in
> captions is very problematic with LaTeX (breaks compilation).
>
> I'd like to be submitting a patch instead of a bug, but I'm not sure
> what the best method of addressing this within ox-latex.el is.
> Do share if you have any ideas :)

I guess the solution is like the problem you mentioned above. You can
create a temporary back-end that exports code and verbatim objects
as \textt, using `org-latex--protect-texttt' function.

The calls to `org-export-data' at the end of
`org-latex--caption/label-string' can use this back-end instead.

I think it would be better to derive current back-end instead of `latex'
like we did in `org-latex-headline'. You can get current back-end with
(plist-get info :back-end).

HTH,
-- 
Nicolas Goaziou



reply via email to

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