emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Timothy <tecosaur@gmail.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [BUG] LaTeX: verbatim cannot be used in caption
Date: Sun, 06 Jun 2021 22:14:08 +0200	[thread overview]
Message-ID: <87a6o2bvjj.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87k0n64zph.fsf@gmail.com> (Timothy's message of "Mon, 07 Jun 2021 02:26:02 +0800")

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	other threads:[~2021-06-06 20:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06 18:26 [BUG] LaTeX: verbatim cannot be used in caption Timothy
2021-06-06 20:14 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6o2bvjj.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=tecosaur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).