From: Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Inaccurate parsing with tex_math_dollars
Date: Tue, 24 Jan 2023 15:35:43 +0100 [thread overview]
Message-ID: <87y1psj8ie.fsf@zeitkraut.de> (raw)
In-Reply-To: <6599e581-5fc3-4a77-8be1-d6d962d54600n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Claudio Di Vita <claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87y1psj8ie.fsf%40zeitkraut.de.
next prev parent reply other threads:[~2023-01-24 14:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 8:58 Claudio Di Vita
[not found] ` <d0ebb8c1-bced-44cc-869d-bae152411448n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-01-17 11:53 ` Albert Krewinkel
[not found] ` <87fsc9xs68.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-17 13:35 ` Claudio Di Vita
[not found] ` <CAMBF16uoWv5=UtiMRvWQ8139hk64bGqL-+ejfO6+CiatgvBTBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-17 14:06 ` Albert Krewinkel
[not found] ` <87bkmxxn5r.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-17 14:31 ` Claudio Di Vita
2023-01-17 16:07 ` John MacFarlane
[not found] ` <4AB3C54A-0054-4E50-9DD7-FBA2D4DA281A-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-01-24 9:56 ` Claudio Di Vita
[not found] ` <c9214947-3546-4322-9523-f80998e60e32n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-01-24 10:42 ` Albert Krewinkel
[not found] ` <877cxcky9v.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-24 12:09 ` Claudio Di Vita
[not found] ` <CAMBF16tbV8W-h_AkmLGyKzbcufgapHL77qP1=93dWiddrQXkcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-24 13:04 ` Duncan Murdoch
[not found] ` <1a7053ea-0a6d-94af-2a67-d209420b9039-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-01-24 13:19 ` Claudio Di Vita
2023-01-24 14:25 ` Claudio Di Vita
[not found] ` <6599e581-5fc3-4a77-8be1-d6d962d54600n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-01-24 14:35 ` Albert Krewinkel [this message]
[not found] ` <87y1psj8ie.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-01-24 17:11 ` Claudio Di Vita
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1psj8ie.fsf@zeitkraut.de \
--to=albert+pandoc-9eawchwdxg8hfhg+jk9f0w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/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.
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 NNTP newsgroup(s).