From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/22443 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Conditional compilation - How to? Date: Sat, 6 Apr 2019 20:16:52 +0200 Message-ID: References: <61bdaf46-d88a-4ef1-b145-71ad5900fed8@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f5e58f0585e09b32" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="192675"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBHG2UPSQKGQEIRXVKYI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Apr 06 20:17:03 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-lj1-f186.google.com ([209.85.208.186]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hCpsE-000nwy-01 for gtp-pandoc-discuss@m.gmane.org; Sat, 06 Apr 2019 20:17:02 +0200 Original-Received: by mail-lj1-f186.google.com with SMTP id v18sf1299lja.21 for ; Sat, 06 Apr 2019 11:17:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554574621; cv=pass; d=google.com; s=arc-20160816; b=0J3OOsXnhwA5k4yqqJXJATF5K9GvMLIZS+TZ0L6lHbq0BuxDy4ECDQgilnWj9THUqu y2QAO6qyEfSTPgBXfsRb8TvadSHosFu1NjQ7jVqbK0j9jjkIghAgyHX6KbGDjWh6UFmH vyI/aHl+nZcj0POsZElYpZq25fuOVHxK2QxGX/519HxkSRPmSt3nsPg+NNzZ8xC7AqLM y5Z1EzUBFwJQ41B9hXlnHQFbku8F/KqekCwJLRIDTI3s9wxw+4QlOkxY9bxglbNf26AF qckVv5DsolmShvSVW5D9CMVwxCfJRHkXKeS1JzANq31qc553nbmUl9oTystE79xOY0+S r8OA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=0ape+EPUa0LyWDCQ/q4uMlPOP5fve/vy55RxH/0mcCo=; b=OuDdV/6KfQSUY+2EnFy2pWvN07Efcx/MFZVYMACzXmDqfFoncgGvNBvkeU269JSVLo btUKY0mEjFnqxfzrIBYjbtp24XOXGaQF+PNQFOToHnx2OwrVYvVa1xoLu5mtQTZSK8lj uXPTGwnh4w5ADVjzNlws7bJ2Opnj+P3bHTb/jbem1ANDABFhUFEhk36IsWnvZgrqXa4n 6djwGF7gJNtRGlBxnjuwf7yspW2w7CtQdfJRGtqwN4KTNcZ8IVyBt9zRmHGkH+xXVXBL PU7RgfRec0F38TVzdx2PECrFot7+nHqAtj+PIqB04PLAy4d7TDB2Spt8kE+wdiviDREj R+Kw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="iib2bI/W"; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=0ape+EPUa0LyWDCQ/q4uMlPOP5fve/vy55RxH/0mcCo=; b=K32nJymIjJWmBc9HQmFytbwtSAC47Ma37PW3CYz5kOGM+zmjfLHd9CY5qM7kQ2W5ru RA8U21y186cgdN4Pe78yzKyiW1la/w/ZfyFZmbmArCX4ClYLK0eKqwGHhCfAn5xHLxbc MPg18Ya/gCdU1102VwPPya3jDfOvNfIU1oUGv6BAcd5cIbqcasLNhAJXaTsJKrdPJiyS Bheq/BAy66ynlnMItWPzSQFD2+MXSnOMlFXx8rFv8SiRTTrsTCLmw84olDhRMZZDEqrY JAJmqOaPBeMxN4niwI+yZii/BCYT0tr3xLsHN+s6g7Gw+/MdDleITw78PcRr58FCNOJ6 qI9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=0ape+EPUa0LyWDCQ/q4uMlPOP5fve/vy55RxH/0mcCo=; b=eM9FQkup7qj0aJYUc/YQARm/xDMvtkeziGiKYjrXOJess+cYl+M/9YUoBBtKvdzOa0 ZrWqdPeafH8BQWOowaLxQaKrbrX6MTYZ2+Km68NfuGu7l0q518O1PxzXBwNJnpKJbVEd G1Jvp4GEQD+Md409SRoWIBaLknU9twa9gVXEmvS3zHCekGATLPHPVDvO0bR4pPy4SAyY vf6fNU+ySaYfZSGtvNzNpmUHQ3FqtlrWRENi41+1FDnhz/RwC+y4h+ZemuE/KQcWKYI3 GyIl5UyMHurcuxRPHnpPb/V/kq0YrYqMTe6511ftuPGM9ys9bc+9u4QDX2dqiLGPaDwY V9Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=0ape+EPUa0LyWDCQ/q4uMlPOP5fve/vy55RxH/0mcCo=; b=UmK9bieBJAqh7wRvv8MGXCddKX/y2o2b14iMvW+NCscIcdcZBAia14XBQprW15Oq3+ IbNAJzgwz2S4jnYTe+JFwwvKtXT9do4WvQ93+FO/vaOuWlF4RV/rBwanuTWXmLsH5tgf X55dz4x3jcG90OO8vIKVgbs/I1RCP5EpR3xSqRxc3g+f+0bgIu51NRRwrpWS6U4RLqeq xzp8qU/tGcAloG+on4W5mMmLPxynAf1kx1ZF4nPeR/wMD5BfCjlEo1C2noxucC6kJuUQ 1ii3Fz92K8iacwmKGmHFQ+LlkFkihu7VYBpUeILRSJeEAWfM+aZE4ewo+YuM1Z3vDM08 PMdQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWFbUiqtWFRwIoCiy319MUWwmCscdBHxAF/k9kUoPTc7UmcmSwq KOOCy+qF7wo6S9zUmLqx7mI= X-Google-Smtp-Source: APXvYqweKdnT9xqR/YzXs3wYfkqxbo3ptDEw9NhCzK/2mINgmF42tR9dgZhawXahASrnRpqjgmYoEA== X-Received: by 2002:a2e:8ece:: with SMTP id e14mr10576699ljl.66.1554574621027; Sat, 06 Apr 2019 11:17:01 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:96ce:: with SMTP id d14ls1380226ljj.5.gmail; Sat, 06 Apr 2019 11:16:59 -0700 (PDT) X-Received: by 2002:a2e:5b81:: with SMTP id m1mr1032323lje.27.1554574619964; Sat, 06 Apr 2019 11:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554574619; cv=none; d=google.com; s=arc-20160816; b=tL6kMkyfQl7vLJDYI52u9voa0LzM/UrpjolFlaXYmZD/3jPF+8EYqP9POLAU57nlSq Qpz1VR4rfI+rlWaM6iMjS1hBfrZdtFzOEIGu8kIGzfJoXKVffOHq3m+f0p8Y0rG4gNrv AFgb0G5yqdFSRXS1D/4xCDoirTgEf4jOz1xrtIkz8t5E4VJs0aHxwQ0ZbmMYklvPtwi8 mFti8CPYc5iJaSnig2TD1IyA86Z5W4V/QN+3ZsLsDKPnWvkHG/YtMJBcadEz+HC7wvwj jzXY58eSvqWAhulsrYncn2gMknLLgfZ9tOpCISLhMpG2rx9UiJNlf6i3LnPxXvTgcTrg ifiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9PhJgtSjgRPukkQTMoVW4aIiCDY7BsQlpF4k5UBgMys=; b=tM2Hp+arDKGmWx8TmYyTVl9nIi7/SaRz3++SYQftLBV63CQjACl14ZguUX4Ycnsn9u zY2N8eEgUx4o3F9XHche+ib1oRcCel87530K6Un2fjwdDuq1MLS3KPOAw6+ZW48ZRuPI 1rQ9kH3HwV0IRiAJraBv8gCkdm4PStdNNZDRPPvhFDc4dNxl6l5DaDut19njhDGf3jNe lZoJ+beFjYkeZ/xc43a3zR+RDZcevaSVPBe11WZWMe6lqnB6ZyW5G4kMBWVjRXAvMQik xzuRLUJLl3HQ9NBQYdT/XKtSn28YiWV1dG5MB3s62at0+3VtiMWhb8NuTxSXRBOrFqOZ yAUQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="iib2bI/W"; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com. [2a00:1450:4864:20::42a]) by gmr-mx.google.com with ESMTPS id h7si1508785ljj.5.2019.04.06.11.16.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 11:16:59 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) client-ip=2a00:1450:4864:20::42a; Original-Received: by mail-wr1-x42a.google.com with SMTP id s15so11595624wra.12 for ; Sat, 06 Apr 2019 11:16:59 -0700 (PDT) X-Received: by 2002:a5d:6b04:: with SMTP id v4mr11140603wrw.69.1554574619303; Sat, 06 Apr 2019 11:16:59 -0700 (PDT) In-Reply-To: <61bdaf46-d88a-4ef1-b145-71ad5900fed8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="iib2bI/W"; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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.org gmane.text.pandoc:22443 Archived-At: --000000000000f5e58f0585e09b32 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I use a div with a class and a filter which removes divs with that class like this: ````markdown :::answer **Answer:** 42. ::: ```` ````lua function Div (elem) if elem.classes:includes('answer') then return {} -- delete it else return elem end end ```` HTH, /bpj Den l=C3=B6r 6 apr. 2019 18:44pbeltran skrev: > My purpose is to generate two versions from the same markdown file. Think > in a worksheet or a set of reveal slides with and without solutions. > > If I use gpp, like suggested here, > the > math expressions in my .md (mathjax) get messed, since \ are escaped. > > Is there a way out of the box? For instance, by using custom fenced_divs > and them telling pandoc to remove that specific div? I've taken a look at > custom filters but I don't know haskell... > > Thanks > > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/61bdaf46-d88a-4ef1-b145-= 71ad5900fed8%40googlegroups.com > > . > For more options, visit https://groups.google.com/d/optout. > --=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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/CADAJKhBNWpmcKAAaNw_xo_EeT-JWKVPcnFo9EdDfzyA0%2BFpydw%40mail= .gmail.com. For more options, visit https://groups.google.com/d/optout. --000000000000f5e58f0585e09b32 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I use a div with a class and a filter w= hich removes divs with that class like this:

````markdown
:::answer
**Answer:** 42.
:::
````

````lua
=
function Div (elem)
=C2=A0 if elem= .classes:includes('answer') then
=C2=A0 =C2= =A0 return {} -- delete it
=C2=A0 else
=C2=A0 =C2=A0 return elem
=C2=A0 end
=
end
````
HTH,

/bpj

Den l=C3=B6r 6 apr. 2019 18:44pbeltran <pabelpe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
My purpose is to generate two versions= from the same markdown file. Think in a worksheet or a set of reveal slide= s with and without solutions.

If I use gpp, like suggest= ed here,=C2=A0the math expressions in my .md (mathjax) get mes= sed, since \ are escaped.

Is there a way out of th= e box? For instance, by using custom fenced_divs and them telling pandoc to= remove that specific div? I've taken a look at custom filters but I do= n't know haskell...

Thanks

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To post to this group, send email to pandoc-discuss@googlegrou= ps.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/61bdaf46-d88a= -4ef1-b145-71ad5900fed8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhBNWpmcKAAaNw_xo_EeT-JWKVPcnFo9Ed= DfzyA0%2BFpydw%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--000000000000f5e58f0585e09b32--