From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24808 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Christophe Demko Newsgroups: gmane.text.pandoc Subject: Re: Pandoc reaches inside math within dollars Date: Sun, 5 Apr 2020 09:54:35 -0700 (PDT) Message-ID: <1138a662-cc3e-4ec7-b0d2-177ad8b10f45@googlegroups.com> References: <8038d469-2445-4526-aa0b-0f41b1c6e21c@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1618_1223360785.1586105675971" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="39467"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDN5TJEC4AEBBTM2VD2AKGQEANHJEEY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Apr 05 18:54:41 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f187.google.com ([209.85.167.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jL8Xg-000A8G-9U for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 05 Apr 2020 18:54:40 +0200 Original-Received: by mail-oi1-f187.google.com with SMTP id e203sf12073330oif.5 for ; Sun, 05 Apr 2020 09:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=gUtPVjX5N1Aomsve3NzidcLG7zXHlcw0RbPQxPtfdcM=; b=LC3WIDT+kE4Fz9pukidC9/BrB6EzhJVc4GOEnprEZJbkjp+f6muMJwBuEIarknMXNK 9Vs+OI2Z8UZ7OfQ0zhdy0u72/BME/OejzCO3pLhneDXV9lqCpcd4/28VJgieTMze2v4U BAK/41YKsyc/7TeP0WaLrPZylo9OhHFdq3mVvyLK3S/1MGdk6TTuYU65CT0m+1vJBHBc ui0AdF/ew8YiDPiRxRuwH37sE0oK7cVJhDHFewJMoe9Re9mNrF//SmNRd/fpm0HfGwfI vIexlEwwAWi0MuKI7Ms9klBjj7vWWvqKNTLfoJju8NZPtAXTGVUsA0RjdxR5mDW01Xw3 Vjqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=gUtPVjX5N1Aomsve3NzidcLG7zXHlcw0RbPQxPtfdcM=; b=HiEiLgk2izgxqxiUrC3Z1vTgFm466U1WJd2O3k2naiUlalknVVltwLabzdGSw5MuhZ O90dzrumnmc60peVVBaVl5bJSu20mDwmRqyXAh1g9DE+9k+jN2e8gCx1hELHyD7p5k3Q 3VX9VSiSS2OTFaufO4TmEaV6xPqvyIt2mZky1w1Trh9XzBrNNRmFQa6U4Ln3PFR+YcsA a/qC9MOXPlEe72CmEY+kcr86DvAj8YqL62I+vw6VYfEbrVTIkK2daKMJKwrg3guuyG3h uAt/lTzupvX0ZEIbyIUy0C++9jPoCquWxf3uEohy1IZgoMRjXzJKpmBgv5cKpWPmdAph hocg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=gUtPVjX5N1Aomsve3NzidcLG7zXHlcw0RbPQxPtfdcM=; b=S/q9Eb74sgAAcvtAEp2yH7xEIC/nf5cjsisYsqrVMIHP1yXp4XrEc4NorpFQ5oYA5h 0nvJK56Jr/+xxuKrCzevltZWFzp0QHe0AMacwE3EyCDl1nnPYlB1NV4fm20pguUqaqn4 7whJof6898Y/nG3WxSHxr+XLjL8kBmlJGl/2yk4mRBK6hcqkYlFfxberhKkGCUPmjNjz I/OXOY0QQV0bVgvt4fwx3HrOG5qQVlygJ+tNPUXy0S5iTXRLpPI6vHdCQ5W8LxcQF9QL cHzS60Txv1FIw77h8okAvT892Knj8EqwhsqFWVK9zi4LtA/dWxfgZeSgIsMUCm1CVjrj e+gw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AGi0PuZUBOe/OsH3oZgd1OzAx/nS/3sPQXScA356iODYtDtdvcFt/ZFN kSGDus5eCV/nV05810jGRY0= X-Google-Smtp-Source: APiQypJ4Ak0lhd9cKXSJX2PXzOJEEe0qtOfKGrLOZ6PppBnqhdXezmSnRKtjXKeh2cHh9jTiZO/18g== X-Received: by 2002:aca:3983:: with SMTP id g125mr10312926oia.13.1586105679341; Sun, 05 Apr 2020 09:54:39 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:5606:: with SMTP id k6ls6435056oib.1.gmail; Sun, 05 Apr 2020 09:54:36 -0700 (PDT) X-Received: by 2002:aca:3110:: with SMTP id x16mr10554579oix.47.1586105676684; Sun, 05 Apr 2020 09:54:36 -0700 (PDT) In-Reply-To: <8038d469-2445-4526-aa0b-0f41b1c6e21c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: chdemko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:24808 Archived-At: ------=_Part_1618_1223360785.1586105675971 Content-Type: multipart/alternative; boundary="----=_Part_1619_452071400.1586105675972" ------=_Part_1619_452071400.1586105675972 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =C3=A9crit : > > Hi Folks, > > I'm trying to figure out how to have pandoc put a span with class math or= =20 > class math+display around math but not do anything inline. > > Here is my markdown fragment: > > =E2=9E=9C Blogs cat a.md > Inline $\alpha +\beta$ is good... > > > $$ > Sensitivity \equiv TPR =3D \frac{TP}{OP} =3D P(T+ | D+) =3D 0.938 > $$ > > > $$ > Specificity \equiv TNR =3D \,\,\frac{TN}{ON} =3D \,\,P(T- | D-) > $$ > > > > > Thus, (given no $disease$ you either test positive or negative): > > > $$ Specificity =3D 1 - P(T+ | D-) =3D 0.956 $$ > > > > > Solving for the probability of a positive test, we get: > > > $$ > P(T+ | D-) =3D 1 - 0.956 =3D 0.044 > $$ > > > > > Here is simple output: > =E2=9E=9C Blogs pandoc a.md -t html -f markdown > [WARNING] Could not convert TeX math ' > Sensitivity \equiv TPR =3D \frac{TP}{OP} =3D P(T+ | D+) =3D 0.938 > ', rendering as TeX > [WARNING] Could not convert TeX math ' > Specificity \equiv TNR =3D \,\,\frac{TN}{ON} =3D \,\,P(T- | D-) > ', rendering as TeX >

Inline =CE=B1 + =CE=B2 is good > =E2=80=A6

>


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

>


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

>

Thus, (given no dis< > /em>ease you either test=20 > positive or negative):

>


Spec= em>ificity= =20 > =3D 1 =E2=88=92 P(T + |D =E2=88=92 ) =3D 0.956=

>

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

>


P(T + |D= =E2=88=92=20 > ) =3D 1 =E2=88=92 0.956 =3D 0.044

> > > > You can see that pandoc reaches inside and puts "ems". Same thing=20 > 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 i= n=20 > and replaces \, (backslash comma) by comma. Happens with and without raw = tex > > =E2=9E=9C Blogs pandoc a.md -t html -f gfm+raw_tex >

Inline $\alpha +\beta$ is good...

>

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

>

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

>

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

>

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

>

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

>

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

> > > Very confused! Please help! > > > This is my version: > > =E2=9E=9C 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=20 > /Users/rahul/.pandoc > Copyright (C) 2006-2020 John MacFarlane > Web: https://pandoc.org > 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 > > > > --=20 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 e= mail 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/1138a662-cc3e-4ec7-b0d2-177ad8b10f45%40googlegroups.com. ------=_Part_1619_452071400.1586105675972 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
See=C2=A0https://pandoc.org/MANUAL.html#math-rendering-in-html<= div>You have several choices

Le dimanche 5 avril 2020 10:59:23 UTC+2= , Rahul Dave a =C3=A9crit=C2=A0:
Hi Folks,

I'm trying to figure ou= t how to have pandoc put a span with class math or class math+display aroun= d math but not do anything inline.

Here is my mark= down fragment:

=E2=9E=9C=C2=A0 Blogs cat a.md=
<= span style=3D"color:#606">Inline $= \alpha = +\beta$ is good...

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


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



<= br>
Thus= , (given no $disease$ you either test positive <= span style=3D"color:#008">or negative):

<= br>$$
Specificity =3D 1 - P<= /span>(T+ | D-) =3D 0.956 $$




=
Solving= for th= e probability of a positive test,<= span style=3D"color:#000"> we
get<= span style=3D"color:#660">:



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




Here is simple output:
=
=E2=9E=9C=C2=A0 Blogs pandoc=C2=A0 a.md -t html -f markdown
=
[WARNING] C= ould no= t convert TeX math '
=C2=A0 Sensitivity \equiv TPR =3D \frac{TP}{OP} =3D P(T+ | D+= ) =C2=A0=3D 0.938
=C2=A0 '
,= rendering as<= /span> TeX
[WARNING] Could not convert TeX math '=
=C2=A0 Specificity \equiv TNR =3D \,\,\frac{TN}{ON} =3D \,\,P(T- | D-)<= br>=C2=A0 '
, rendering as TeX
<p>Inline <span class=3D"math inline"
><em>=CE=B1</em>=E2=80=85+=E2=80=85&= lt;em>=CE=B2</em></span> is good=E2=80=A6</p><= span style=3D"color:#000">
<p><br /><= span class=3D"math display">$$
<= span style=3D"color:#606">Sensitivity
\equiv TPR= =3D \frac{TP<= span style=3D"color:#660">}{OP} =3D P(T+ | D+) =C2=A0=3D 0.938
$$
</span><br /></p>

<p>
<br /><= span cl= ass=3D&= quot;math display">$$
Specificity \equiv TNR =3D \,\,\frac{TN}{ON} =3D \,\,P(T- | D-)$$</span><br /></p>
<p>Thus
,
(given no <span class=3D"math inline&q= uot;><em>d</em><em>i</em><em>s<= span style=3D"color:#660"></em><= em>e</em><em>a</em><em>s</<= /span>em>&l= t;em>= ;e<<= /span>/em></span> you either test positive or<= span style=3D"color:#000"> negative):<= /p><= /span>
<= p><br /><span class=3D"math display"><em<= /span>>S</em>= ;<em>p</em><em>e</em><em>c&= lt;/em&= gt;<em>i= </em><em>f</em><em>= i</em><em>c</em><em>i</em><em>t</em= ><em>= y</e= m>=E2=80=84=3D=E2=80=841=E2=80=85=E2=88=92=E2=80=85<em>P</em>(<<= /span>em>T</em>=E2=80=85+=E2=80=85|<em>D</em>=E2= =80=85=E2=88=92=E2=80=85)=E2=80=84=3D=E2=80=840.956</span><br /></<= span style=3D"color:#000">p>
<p>Solving for the pr= obability of a positive test, we get:</p>

<p>
<br /><= span cl= ass=3D&= quot;math display"><em>P
</em>(<em>T</em>=E2=80=85+=E2=80=85|<= em><= span style=3D"color:#000">D
</em>=E2=80=85=E2=88=92=E2=80=85)=E2=80=84=3D=E2= =80=841=E2=80=85=E2=88=92=E2=80=850.956=E2=80=84=3D=E2=80=840.044</span><= br />= ;</p= >



You can see that pandoc reaches i= nside and puts "ems". Same thing with=C2=A0pandoc=C2=A0 a.md -t h= tml -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

=
=E2=9E=9C=C2=A0 Blogs pandoc=C2=A0 a.md -t html -f gfm+raw_= tex
<p>Inline $\alpha +\bet= a$ is good...</p>
<p>$$ Sensitivity \equiv TPR =3D \frac{TP}{OP} =3D P(T+ = | D+) =3D 0.938 $$</p>
<p>= $$ Specificity \equiv TNR =3D ,,\frac{TN}{ON} = =3D ,,P(T- | D-) $$</p>
<p>
Thus, (given no $disease$ you either test posit= ive or negative):</p>
<p><= span style=3D"color:#000">$$ Specificity =3D 1 - P(T+ | D-) =3D 0.956 $$</p>=
<p>Solving for the probability of a positive test, we get:</p>
= <p>$$ P(= T+ | D-) =3D 1 - 0.956 =3D 0.044 $$</p= >


Very confu= sed! Please help!


This is my versio= n:

=E2=9E=9C=C2=A0 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/.l= ocal/share/pandoc or /Users/rahul/.pandoc
Copyright (C) 2006= -2020 John MacFarlane
This is free software; see the so= urce for copying conditions.
There is no warranty, not even for m= erchantability or fitness
for a particular purpose.
Thanks!

Rahul



--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/1138a662-cc3e-4ec7-b0d2-177ad8b10f45%40googlegroups.co= m.
------=_Part_1619_452071400.1586105675972-- ------=_Part_1618_1223360785.1586105675971--