Hi Albert,

it works, thanks for the support.

The documentation is clear now, I guess that it was more concise for pandoc 2.x. Moreover, I started my filter implementation looking at the include-files filter, that doesn't seem to care about the current extensions configuration.

Cheers,

Claudio

Il giorno martedì 24 gennaio 2023 alle 15:46:12 UTC+1 Albert Krewinkel ha scritto:

Claudio Di Vita <claudio...@gmail.com> writes:

> Confirmed: when tex_math_dollars is disabled pandoc doesn't create
> Math elements, while under the same conditions (inheriting
> PANDOC_READER_OPTIONS) pandoc.read create Math elements for the same
> document.

That's a problem in the docs: it should be noted more clearly that the
format extensions are taken from the format, not from the ReaderOptions.
Try with

pandoc.read('$2^a$', 'markdown-tex_math_dollars')

or (with pandoc 3)

md = {
format = 'markdown',
extensions = {tex_math_dollars = 'disable'}
}
pandoc.read('$a$', md)

> Il giorno martedì 17 gennaio 2023 alle 09:58:14 UTC+1 Claudio Di Vita
> ha scritto:
>
> Hi folks,
>
> reading the documentation, with the extension tex_math_dollars
> enabled (that's the default) anything between two $ (or two $$)
> characters will be treated as TeX math.
>
> However, I think that when such extension is enabled, the
> document parsing, including the metadata, is a bit inaccurate,
> because also strings like ${value1}/${value2} are treated like
> TeX math.
>
> Of course disabling the extension or escaping the $ characters
> there are no issues, but it would be nice to avoid that, if
> possible.
>
> Any idea of what can be the wrong parsing cause ?
>
> Cheers,
>
> Claudio


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a05750c3-a66c-44ff-a4c5-1434378aea0dn%40googlegroups.com.