emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix caption format for custom latex src block


From: Timothy
Subject: Re: [PATCH] Fix caption format for custom latex src block
Date: Wed, 29 Jun 2022 23:26:33 +0800
User-agent: mu4e 1.6.11; emacs 28.0.92

Hi Matt,

As mentioned by Ihor, you’ll want to take a look at the curent version of
ox-latex, specifically `org-latex-src-block--custom' which now contains `(?c .
,caption)'. You may want to consider modifying 
`org-latex--caption/label-string' to
accept the form `(element info &optional content-only)' or reimplementing just 
the
bits needed for this purpose — which ever works out nicer. Looking at
`org-latex--caption/label-string' a substring approach looks quite fragile, 
though
you might be able to get away with an application of `replace-regexp-in-string',
though I’d personally consider this a bit of a last resort.

Matt Huszagh <huszaghmatt@gmail.com> writes:

> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> I think that it will be better if you use
>> org-latex–caption/label-string instead. It will take care about short
>> captions as well.
>
> Changing this to (?c . ,caption-str) yields for the original example
>
> {Perform inter-sample interpolation.
> }
>
> I could use substring to remove the leading { and trailing
> }. What do you think?

All the best,
Timothy

reply via email to

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