emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX filter for captions
@ 2015-06-28 21:40 Suvayu Ali
  2015-06-28 21:52 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Suvayu Ali @ 2015-06-28 21:40 UTC (permalink / raw)
  To: Emacs Org mode

Hi,

I wanted to apply a filter to normal text and captions.  So I initially
used org-export-filter-body-functions, however this also applies on the
section title.  Handling that case would make my filter a bit more
complicated.  So I switched to using
org-export-filter-paragraph-functions.  However I can't find what would
be the corresponding filter list for captions (both figures and tables).

Any ideas?

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LaTeX filter for captions
  2015-06-28 21:40 LaTeX filter for captions Suvayu Ali
@ 2015-06-28 21:52 ` Nicolas Goaziou
  2015-06-29  5:22   ` Suvayu Ali
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2015-06-28 21:52 UTC (permalink / raw)
  To: Emacs Org mode

Hello,

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> I wanted to apply a filter to normal text and captions.  So I initially
> used org-export-filter-body-functions, however this also applies on the
> section title.  Handling that case would make my filter a bit more
> complicated.  So I switched to using
> org-export-filter-paragraph-functions.  However I can't find what would
> be the corresponding filter list for captions (both figures and
> tables).

There is no such filter. By the time filters are called, captions have
already been merged with their element. IOW,
`org-export-filter-paragraph-functions' is applied to a string
containing both the caption and the paragraph.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LaTeX filter for captions
  2015-06-28 21:52 ` Nicolas Goaziou
@ 2015-06-29  5:22   ` Suvayu Ali
  0 siblings, 0 replies; 3+ messages in thread
From: Suvayu Ali @ 2015-06-29  5:22 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, Jun 28, 2015 at 11:52:06PM +0200, Nicolas Goaziou wrote:
> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> 
> > I wanted to apply a filter to normal text and captions.  So I initially
> > used org-export-filter-body-functions, however this also applies on the
> > section title.  Handling that case would make my filter a bit more
> > complicated.  So I switched to using
> > org-export-filter-paragraph-functions.  However I can't find what would
> > be the corresponding filter list for captions (both figures and
> > tables).
> 
> There is no such filter. By the time filters are called, captions have
> already been merged with their element. IOW,
> `org-export-filter-paragraph-functions' is applied to a string
> containing both the caption and the paragraph.

Indeed, this makes sense.  I was mistaken about what I was looking at.
When I noticed my filter was not being applied to captions, I had
forgotten those particular figures were exported via latex blocks, not
as usual figures!  Adding my filter to
org-export-filter-export-block-functions solved my issue.

Thanks!

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-29  5:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28 21:40 LaTeX filter for captions Suvayu Ali
2015-06-28 21:52 ` Nicolas Goaziou
2015-06-29  5:22   ` Suvayu Ali

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).