From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16006 Path: news.gmane.org!.POSTED!not-for-mail From: Alec Clews Newsgroups: gmane.text.pandoc Subject: Re: Using Pandoc with m4 Date: Mon, 14 Nov 2016 08:57:43 +1100 Organization: Personal System Message-ID: <4f77b0cb-3a7b-b34d-9445-f33f5f5a7cbe@gmail.com> References: <8b828e5b-a178-4974-ac8e-46c34790e848@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------B27C4C90CB5B7D18C1B09328" X-Trace: blaine.gmane.org 1479074291 3143 195.159.176.226 (13 Nov 2016 21:58:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 13 Nov 2016 21:58:11 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBD6YPRGFYQLRBXGDUPAQKGQETFJWZ5Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Nov 13 22:58:06 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ua0-f186.google.com ([209.85.217.186]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c62mX-0006Bs-Fv for gtp-pandoc-discuss@m.gmane.org; Sun, 13 Nov 2016 22:57:45 +0100 Original-Received: by mail-ua0-f186.google.com with SMTP id 51sf24457336uai.0 for ; Sun, 13 Nov 2016 13:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:subject:to:references:from:organization:message-id:date :user-agent:mime-version:in-reply-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=6ZOEuKdFzhyOXS3uyIxeMM6YvJgEM38HYvrAA5lyDls=; b=R1aY3kqAjxaLEsgW/eGxA68BG3zCZrG8B8RwsR7vC0FgwsKHze86cfoRXxXSgHHqtI dx6i9sKivjEk2A3vbMwVDYBJQ2GHYbyhtAj7tw0hkVYFzyENtf9UVugU0oenw+i7dDFh clLLTETbDoAL32raGi8jKIg2xTmsUsYpuNPtxVhAfaCipMdvjJSNe41JBEvOLZCTxwAu 3m2oLoBa26lRdoMCdp1FGnaXEcEH5mQtMRox4vZT7ogkC/2A0bm31QpPkcv0w5/iuuX+ jBzPXneCKkSUsYtHgsPgYt/g3Zz1IrIebqu8WYsdhSMyff/BAfjRtFReAgH3brWZDpNs ivAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-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=6ZOEuKdFzhyOXS3uyIxeMM6YvJgEM38HYvrAA5lyDls=; b=Ivc/BOm+tF2xhSnbh1umnuaRwW1MjmO3FTMeq7jJKsobcILG7NvpM23RVPIGoUgXWP xbLjwDLubsYU9fYmfA2CP2fplJmtjU7nnI+XxIo1GLpXd8MX4MDy6nma4vDJuG82W79w /KSJ9DuD+7PO6HgbYmvP0A7JOoXK9hsawuXW9lGHpbGFIbWEa07s7xAHf1R9JHCZgecm RwvFi+otl9fGrqyuB3kM8umSLfvchReYIEiiRaOD/gp8DTqOuul46X/arJlh0Eg1Ix97 ayB1DgOx1BkcPLxkuEbjO43PeYmB8/dnsB1HeTEFSFeqFzh2AjmvWN4EmC+LCPyDa/9R 1fHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-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=6ZOEuKdFzhyOXS3uyIxeMM6YvJgEM38HYvrAA5lyDls=; b=YlHMLcHgfoLWjDwJHwYaSAefoTBZ+FuggS0OTUGmr4tWJpEW6UY/zls+bUfF6Ejc5v hn1Pfy6QkP/FJuDRXHci6J0ipFOdpNvD6xbna8jiK0WzZbXAIrbeOt5r8VNXIP+WPszg B3j4PcQg7e1og4F5aBbqkNAAA1XZK2GlIFRJgS40kAj3pK2q1c7zYBpSwdf5BpQ8FvVQ fvjtu3TYrfKkUdtQejltX4q02O3Fs59q4njjolcPKdQz6Jnkw4qOONg17rsO5+rwgM3K UueM5iFiQKD7/q4wtDbexKwumE+xiGVZazWXvN4l5xG0OKyOTMmPXV2BF8fPVbHpLvrF Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABUngve2TVX4KWzep7AojJboMPwdgymwN2xPNF8nBGCjCukE39v0gl/GY6bLRSGlHTLb+g== X-Received: by 10.157.40.215 with SMTP id s81mr940344ota.7.1479074268402; Sun, 13 Nov 2016 13:57:48 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.34.166 with SMTP id y35ls6114481ota.49.gmail; Sun, 13 Nov 2016 13:57:47 -0800 (PST) X-Received: by 10.157.36.199 with SMTP id z65mr5560347ota.113.1479074267899; Sun, 13 Nov 2016 13:57:47 -0800 (PST) Original-Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com. [2607:f8b0:400e:c05::243]) by gmr-mx.google.com with ESMTPS id gg10si4967592pac.1.2016.11.13.13.57.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Nov 2016 13:57:47 -0800 (PST) Received-SPF: pass (google.com: domain of alecclews-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400e:c05::243 as permitted sender) client-ip=2607:f8b0:400e:c05::243; Original-Received: by mail-pg0-x243.google.com with SMTP id 3so7181713pgd.0 for ; Sun, 13 Nov 2016 13:57:47 -0800 (PST) X-Received: by 10.98.21.148 with SMTP id 142mr29304224pfv.38.1479074267509; Sun, 13 Nov 2016 13:57:47 -0800 (PST) Original-Received: from [10.100.65.12] (pap2288650.lnk.telstra.net. [139.130.165.134]) by smtp.gmail.com with ESMTPSA id d197sm30095752pfd.38.2016.11.13.13.57.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Nov 2016 13:57:46 -0800 (PST) In-Reply-To: X-Original-Sender: alecclews-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com; spf=pass (google.com: domain of alecclews-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400e:c05::243 as permitted sender) smtp.mailfrom=alecclews-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE 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:16006 Archived-At: This is a multi-part message in MIME format. --------------B27C4C90CB5B7D18C1B09328 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Apparently the GCC C preprocessor (cpp) can support utf-8 https://gcc.gnu.org/onlinedocs/cpp/Character-sets.html I believe the cpp in CLANG does as well? On 13/11/16 23:11, BP Jonsson wrote: > I looked at m4 earlier this year and found it interesting, but as it > apparently lacks UTF-8 support I thought it would be of limited > usefulness to me. Does anyone know a macro processor which does > support UTF-8? > > l=C3=B6rdag 12 november 2016 skrev Simon Michael >: > > On 11/12/16 4:42 AM, Alec Clews wrote: > > I thought people might be interested in how I've used Pandoc > and the m4 > macro processor together recently > > I wrote an article about using Git; with lots of examples, the > output from > running the examples and various diagrams to illustrate the > effect of the > examples. > > So I wrote some small (but complex) m4 macros to execute the > various > example commands and turn the output into Pandoc content for > processing > inline with the rest of my writing. > > You can see the input files here > > https://github.com/alecthegeek/version-control-basics > > > Big thanks to John for creating such an awesome tool as Pandoc. > > Hi Alec, > > thanks for sharing this! I am reading with interest and learning > useful things. > > Here's my own m4 & pandoc setup: > > utils: > https://github.com/simonmichael/hledger/blob/master/doc/lib.m4 > > a doc: > https://raw.githubusercontent.com/simonmichael/hledger/master/hledger= -ui/doc/hledger-ui.1.m4.md > > makefile: > https://github.com/simonmichael/hledger/blob/master/Shake.hs > ) > > I'm new to m4, but I find it's power seductive and complementary > to pandoc. I could do some or all of this (conditionals, macros..) > with pandoc filters, but it felt like more boilerplate and more work. > > > --=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 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/o07cf5%24lo0%241%40b= laine.gmane.org > . > For more options, visit https://groups.google.com/d/optout > . > > > > --=20 > > ------------------------------------------------------------------------ > SavedURI :Show URLShow URLSavedURI : > SavedURI :Hide URLHide URLSavedURI : > https://mail.google.com/_/scs/mail-static/_/js/k=3Dgmail.main.sv.G3GZFwvc= niQ.O/m=3Dm_i,t,it/am=3DfUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPi= BD8qOMw/rt=3Dh/d=3D1/rs=3DAItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvwhttps://mail.go= ogle.com/_/scs/mail-static/_/js/k=3Dgmail.main.sv.G3GZFwvcniQ.O/m=3Dm_i,t,i= t/am=3DfUAcTAoZawdGHAZ2YD-g9N_f7LL4CX7WlSgHQKgABHaCv9kToPiBD8qOMw/rt=3Dh/d= =3D1/rs=3DAItRSTO5CF1YB_frDRXLXTeUsQ1zItcBvw > > ------------------------------------------------------------------------ > > --=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 email to pandoc-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://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuQLQrOdfAT%3Dnmya2= 6GROZAj5UA1%3DansDkvDzWkD3p8rPw%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. --=20 Alec Clews Personal Melbourne, Australia. Jabber: alecclews-/eSpBmjxGS63Zbb/xt2tYQ@public.gmane.org PGPKey ID: 0x9BBBFC7C blog:http://alecthegeek.github.io/ --=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/4f77b0cb-3a7b-b34d-9445-f33f5f5a7cbe%40gmail.com. For more options, visit https://groups.google.com/d/optout. --------------B27C4C90CB5B7D18C1B09328 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Apparently the GCC C preprocessor (cpp) can support utf-8


https://gcc.gnu.org/onlinedocs/cpp/Character= -sets.html


I believe the cpp in CLANG does as well?



On 13/11/16 23:11, BP Jonsson wrote:
I looked at m4 earlier this year and found it interesting, but as it apparently lacks UTF-8 support I thought it would be of limited usefulness to me. Does anyone know a macro processor which does support UTF-8?

l=C3=B6rdag 12 november 2016 skrev Simon Michael <simon@joy= ful.com>:
On 11/12/16 4:42 AM, Alec Clews wrote:
I thought people might be interested in how I've used Pandoc and the m4
macro processor together recently

I wrote an article about using Git; with lots of examples, the output from
running the examples and various diagrams to illustrate the effect of the
examples.

So I wrote some small (but complex) m4 macros to execute the various
example commands and turn the output into Pandoc content for processing
inline with the rest of my writing.

You can see the input files here

https://github.com/alecthegeek/version-c= ontrol-basics

Big thanks to John for creating such an awesome tool as Pandoc.
Hi Alec,

thanks for sharing this! I am reading with interest and learning useful things.

Here's my own m4 & pandoc setup:

utils: https://github.com/simonmichael/hledger/bl= ob/master/doc/lib.m4
a doc: https://raw.githubusercontent.com/simonmic= hael/hledger/master/hledger-ui/doc/hledger-ui.1.m4.md
makefile: https://github.com/simonmichael/hledger/bl= ob/master/Shake.hs)

I'm new to m4, but I find it's power seductive and complementary to pandoc. I could do some or all of this (conditionals, macros..) with pandoc filters, but it felt like more boilerplate and more work.


--
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+uns= ubscribe@googlegroups.com.
To post to this group, send email to pa= ndoc-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-d= iscuss/o07cf5%24lo0%241%40blaine.gmane.org.
For more options, visit htt= ps://groups.google.com/d/optout.


--

--
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 post to this group, send email to pandoc-discuss@goog= legroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA= FC_yuQLQrOdfAT%3Dnmya26GROZAj5UA1%3DansDkvDzWkD3p8rPw%40mail.gmail.com.=
For more options, visit https://groups.google.c= om/d/optout.

--=20

Alec Clews
Personal <alec.clews-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>             Melbourne, Australia.
Jabber:  alecclews-/eSpBmjxGS63Zbb/xt2tYQ@public.gmane.org             PGPKey ID: 0x9BBBFC7C
blog:http://alecthegeek.github.io/

--
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://groups.google.com/d/msgid/p= andoc-discuss/4f77b0cb-3a7b-b34d-9445-f33f5f5a7cbe%40gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--------------B27C4C90CB5B7D18C1B09328--