From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29721 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Weber Newsgroups: gmane.text.pandoc Subject: Two treatments of same input file Date: Wed, 8 Dec 2021 18:52:34 -0800 (PST) Message-ID: <736c254f-44fe-49f8-9556-2f4c83c4e5a0n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_50_8884232.1639018354577" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9721"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDVM5VNNVUEBB466YWGQMGQEKSAOUUA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Dec 09 03:52:38 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f55.google.com ([209.85.161.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mv9Xy-0002P5-6f for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 09 Dec 2021 03:52:38 +0100 Original-Received: by mail-oo1-f55.google.com with SMTP id z20-20020a4a8e54000000b002c632ba3a12sf2541609ook.7 for ; Wed, 08 Dec 2021 18:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=kqcyMuAcaSUCqneasphAjE79FPQyb8MeE14M2Dohbsw=; b=qVmRkgX6RKJgOgJXXAo4C8OOSMk223vJHB6baEtIsw32yXXcDAA4qcAedEwtAsUBJo S3ALFxSIOanvKDh4T/eOPFNXH49h718LTM41oispftLwyBCQuIVIq4ZGMp9XFoI3bAAi p8fa+wiSPpUZwu+kS9NXPvuPLgGTp0sUdch2jPPpGzsp8E1oYypI0AFXuxba5R9/Feom pEMXP1pPz1jxxfUXaQYa8JOSNZeghti46Hhtit1DZOdplyBI40XxFYVriWhr/u8YJ0VS oJatBCEe//gR0IRU4nUQ3uXEKkPdN0PuFmyxM2nEz26mtWjot1cM662WoKG9tBImA0xH +6mg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=kqcyMuAcaSUCqneasphAjE79FPQyb8MeE14M2Dohbsw=; b=pnPN7THQv7mTzY/2b/fu1tJG0/l8p1QXMyN7ZXKk6T5m+YWa0/AJ6NSY/v5vaYJeVG 5o3DGl6sRqqouaQldpDHi84mr4VLNj/3Gfs8H/K/0iqu4h8sVBMmTi7Fw4QU8hmPXun/ NUgvxcxyHRbN8Nxh54gqbkYv5zk0M4Nc1ZrT7/MQy3ysCcmeSRw2CegXvaqwe/rljd4E QRoPRKnEtkLr5jsr7msVee3y/yjQvkkvr9H+DRpVsBHEwpSxvj8NlTdr57O5OTJzgmJc 9wxD1cxOl9JmgJ8s5C32tKc+8540htQ4KOjaFXNf6nvxJ0anX/HorjdZ1rH9joLd2ckO h17Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id: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=kqcyMuAcaSUCqneasphAjE79FPQyb8MeE14M2Dohbsw=; b=WM1uZK6jcF8b5c51ZtcPsQmGr+Y8FtfyAYboOYbVJl9caDV6O3oSby2NCri0br/e5O XbUA2zfWHV/OwKXUdgczUbK1Lq2EJq5OHJ4uFaAYYA4MOiYgx8Qa/QNO4UeAp5XElnkH FEP5NLWKwTY/skegHvNdJbp0nAbtF6PJJbF4RGy1g/UmrYCGkH2aQ4o0byVEon1GUJT3 s035eKbdQoHHr1z2fp6RULkPM6v4mjciYtx8aegDhLCbCwdQ7rU5yuyc7Lq5RSO31edv ecPxabyAqphhyJfbODFrnhKQlsJXWIh8PUuEFfXs1EpLNG/M+S9rig+eUIT3A4o9e67o s3ZQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532+hCOtdyYT/KAhA0OpUF6FzpGN7aN+cU9i6NyfRu/1f7XYsx5W z/s/tj9/6oP/fRxk1M/iCkA= X-Google-Smtp-Source: ABdhPJxfyrDPSFxDSaLU/tZvbDwuRDXjHvjv+PLj55XRcG1Pi5VO/trLEd/G1kGnWN3d4RftDFQnAw== X-Received: by 2002:a05:6808:179d:: with SMTP id bg29mr3450538oib.138.1639018357153; Wed, 08 Dec 2021 18:52:37 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:41d5:: with SMTP id o204ls1238060oia.9.gmail; Wed, 08 Dec 2021 18:52:35 -0800 (PST) X-Received: by 2002:aca:1b08:: with SMTP id b8mr3301417oib.148.1639018355214; Wed, 08 Dec 2021 18:52:35 -0800 (PST) X-Original-Sender: spottedMetal-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:29721 Archived-At: ------=_Part_50_8884232.1639018354577 Content-Type: multipart/alternative; boundary="----=_Part_51_1831110745.1639018354577" ------=_Part_51_1831110745.1639018354577 Content-Type: text/plain; charset="UTF-8" I'm work on creating a set of examples of HTML, JavaScript, and SVG code. Each comes from a single source file, from which I want to produce a web page showing (a) the result of rendering the HTML or SVG or executing the JavaScript; (b) the code itself, viewed as if in a text editor, and (ideally) with syntax highlighting. The best way I can think of doing this involves making two transformations of the source file, running pandoc on each of them, and the combining the outputs, probably by running pandoc a third time with a custom template. I'm wondering if there's any better way? Here's a small example: (1) Original source file:
(2) Intermediate file 1: ```{=html5}
``` (3) Intermediate file 2: ~~~~{.html}
~~~~ (4) Desired final output would be something like this: ...

A Form with a Button

Code to Produce a Form with a Button

... -- 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/736c254f-44fe-49f8-9556-2f4c83c4e5a0n%40googlegroups.com. ------=_Part_51_1831110745.1639018354577 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm work on creating a set of examples of HTML, JavaScript, and SVG code.Each comes from a single source file, from which I want to produce a
w= eb page showing
(a) the result of rendering the HTML or SVG or executing= the JavaScript;
(b) the code itself, viewed as if in a text editor, and= (ideally) with
syntax highlighting.

The best way I can think of = doing this involves making two
transformations of the source file, runni= ng pandoc on each of them,
and the combining the outputs, probably by ru= nning pandoc a third time
with a custom template.

I'm wondering i= f there's any better way?

Here's a small example:

(1) Origina= l source file:

<form>
<input id=3D"b1" type=3D"button" v= alue=3D"Apply" title=3D"Button"/>
</form>


(2) Interm= ediate file 1:

```{=3Dhtml5}
<form>
<input id=3D"b1" = type=3D"button" value=3D"Apply" title=3D"Button"/>
</form>
`= ``

(3) Intermediate file 2:

~~~~{.html}
<form>
&l= t;input id=3D"b1" type=3D"button" value=3D"Apply" title=3D"Button"/>
= </form>
~~~~

(4) Desired final output would be something li= ke this:

...

<h2>A Form with a Button</h2>
<form>
<input id=3D"b1" type=3D"button" value=3D"Apply" title= =3D"Button"/>
</form>

<h2>Code to Produce a Form w= ith a Button</h2>

<div class=3D"sourceCode" id=3D"cb1">&= lt;pre class=3D"sourceCode html"><code class=3D"sourceCode html">&= lt;a class=3D"sourceLine" id=3D"cb1-1" title=3D"1"><span class=3D"kw"= >&lt;form&gt;</span></a>
<a class=3D"sourceLin= e" id=3D"cb1-2" title=3D"2"><span class=3D"kw">&lt;input</s= pan><span class=3D"ot"> id=3D</span><span class=3D"st">= ;&quot;b1&quot;</span><span class=3D"ot"> type=3D</s= pan><span class=3D"st">&quot;button&quot;</span><= span class=3D"ot"> value=3D</span><span class=3D"st">&qu= ot;Apply&quot;</span><span class=3D"ot"> title=3D</span&= gt;<span class=3D"st">&quot;Button&quot;</span><span= class=3D"kw">/&gt;</span></a>
<a class=3D"sourceL= ine" id=3D"cb1-3" title=3D"3"><span class=3D"kw">&lt;/form&= ;gt;</span></a></code></pre></div>

...=

--
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/736c254f-44fe-49f8-9556-2f4c83c4e5a0n%40googlegroups.= com.
------=_Part_51_1831110745.1639018354577-- ------=_Part_50_8884232.1639018354577--