Thanks, this is rather interesting. Works on calling --mathjax with nothing ( i am not in standalone mode), Do you understand the reason why its done this way? I had expected raw_tex would leave things alone, but perhaps it does make sense that invoking an extra math processor would work. Would have loved for it to use the dollar syntax instead of the \( or \[ syntax, though!

On Sunday, April 5, 2020 at 10:24:36 PM UTC+5:30, Christophe Demko wrote:
See https://pandoc.org/MANUAL.html#math-rendering-in-html
You have several choices

Le dimanche 5 avril 2020 10:59:23 UTC+2, Rahul Dave a écrit :
Hi Folks,

I'm trying to figure out how to have pandoc put a span with class math or class math+display around math but not do anything inline.

Here is my markdown fragment:

➜  Blogs cat a.md
Inline $\alpha +\beta$ is good...


$$
Sensitivity \equiv TPR = \frac{TP}{OP} = P(T+ | D+)  = 0.938
$$


$$
Specificity \equiv TNR = \,\,\frac{TN}{ON} = \,\,P(T- | D-)
$$




Thus, (given no $disease$ you either test positive or negative):


$$
Specificity = 1 - P(T+ | D-) = 0.956 $$




Solving for the probability of a positive test, we get:


$$
P
(T+ | D-) = 1 - 0.956 = 0.044
$$




Here is simple output:
➜  Blogs pandoc  a.md -t html -f markdown
[WARNING] Could not convert TeX math '
  Sensitivity \equiv TPR = \frac{TP}{OP} = P(T+ | D+)  = 0.938
  '
, rendering as TeX
[WARNING] Could not convert TeX math '
  Specificity \equiv TNR = \,\,\frac{TN}{ON} = \,\,P(T- | D-)
  '
, rendering as TeX
<p>Inline <span class="math inline"><em>α</em> + <em>β</em></span> is good…</p>
<p><br /><span class="math display">$$
Sensitivity \equiv TPR = \frac{TP}{OP} = P(T+ | D+)  = 0.938
$$
</span><br /></p>
<p><br /><span class="math display">$$
Specificity \equiv TNR = \,\,\frac{TN}{ON} = \,\,P(T- | D-)
$$
</span><br /></p>
<p>Thus, (given no <span class="math inline"><em>d</em><em>i</em><em>s</em><em>e</em><em>a</em><em>s</em><em>e</em></span> you either test positive or negative):</p>
<p><br /><span class="math display"><em>S</em><em>p</em><em>e</em><em>c</em><em>i</em><em>f</em><em>i</em><em>c</em><em>i</em><em>t</em><em>y</em> = 1 − <em>P</em>(<em>T</em> + |<em>D</em> − ) = 0.956</span><br /></p>
<p>Solving for the probability of a positive test, we get:</p>
<p><br /><span class="math display"><em>P</em>(<em>T</em> + |<em>D</em> − ) = 1 − 0.956 = 0.044</span><br /></p>



You can see that pandoc reaches inside and puts "ems". Same thing with pandoc  a.md -t html -f markdown+tex_math_dollars.

If i use gfm for example, this goes away, but then pandoc still reaches in and replaces \, (backslash comma) by comma. Happens with and without raw tex

➜  Blogs pandoc  a.md -t html -f gfm+raw_tex
<p>Inline $\alpha +\beta$ is good...</p>
<p>$$ Sensitivity \equiv TPR = \frac{TP}{OP} = P(T+ | D+) = 0.938 $$</p>
<p>$$ Specificity \equiv TNR = ,,\frac{TN}{ON} = ,,P(T- | D-) $$</p>
<p>Thus, (given no $disease$ you either test positive or negative):</p>
<p>$$ Specificity = 1 - P(T+ | D-) = 0.956 $$</p>
<p>Solving for the probability of a positive test, we get:</p>
<p>$$ P(T+ | D-) = 1 - 0.956 = 0.044 $$</p>


Very confused! Please help!


This is my version:

➜  Blogs pandoc -v
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.1, skylighting 0.8.3.2
Default user data directory: /Users/rahul/.local/share/pandoc or /Users/rahul/.pandoc
Copyright (C) 2006-2020 John MacFarlane
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

Thanks!

Rahul



--
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/2987acc2-0769-41a2-a28e-2101ba6c7b6e%40googlegroups.com.