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 -vpandoc 2.9.2.1Compiled with pandoc-types 1.20, texmath 0.12.0.1, skylighting 0.8.3.2Default user data directory: /Users/rahul/.local/share/pandoc or /Users/rahul/.pandoc Copyright (C) 2006-2020 John MacFarlaneWeb: https://pandoc.orgThis is free software; see the source for copying conditions.There is no warranty, not even for merchantability or fitnessfor a particular purpose.Thanks!Rahul