public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Simon Michael <simon-jbxitMBJ2LLQT0dZR+AlfA@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Using Pandoc with m4
Date: Sat, 12 Nov 2016 07:28:43 -0800	[thread overview]
Message-ID: <o07cf5$lo0$1@blaine.gmane.org> (raw)
In-Reply-To: <8b828e5b-a178-4974-ac8e-46c34790e848-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

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.



  parent reply	other threads:[~2016-11-12 15:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12 12:42 Alec Clews
     [not found] ` <8b828e5b-a178-4974-ac8e-46c34790e848-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-11-12 15:28   ` Simon Michael [this message]
2016-11-13 12:11     ` BP Jonsson
     [not found]       ` <CAFC_yuQLQrOdfAT=nmya26GROZAj5UA1=ansDkvDzWkD3p8rPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-13 21:57         ` Alec Clews
2016-11-13 22:26         ` Joost Kremers
     [not found]           ` <87y40n3tkv.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2016-11-14 15:41             ` Bruce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='o07cf5$lo0$1@blaine.gmane.org' \
    --to=simon-jbxitmbj2llqt0dzr+alfa@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).