From: John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Printing conditional parts - looking for suggestions
Date: Tue, 17 May 2016 10:08:04 -0700 [thread overview]
Message-ID: <20160517170804.GB6158@D25Q40BGFY13.berkeley.edu> (raw)
In-Reply-To: <nhf85b$lq2$1@ger.gmane.org>
I use a series of filters to build the pandoc man page from the README.
See https://github.com/jgm/pandoc/tree/master/man
+++ Simon Michael [May 17 16 07:00 ]:
>PS since I've linked it, I want to add that in the hledger project,
>pandoc (now with help from m4, but that's not strictly required) is
>helping me to generate, from the markdown source:
>
>- man pages
>- info manuals
>- plain text manuals
>- web manuals
>- combined one-page web manual
>
>which is awesome. Thank you John & all!
>
>https://github.com/simonmichael/hledger/blob/master/Shake.hs#L138
>
>
>On 5/17/16 6:49 AM, Simon Michael wrote:
>>I was using pandoc filters for conditional content, which worked quite
>>well. Here's the filter that strips out <div class=web>...</div> blocks,
>>you could probably write it more easily in python:
>>https://github.com/simonmichael/hledger/blob/master/doc/pandoc-drop-web-blocks.hs
>>https://raw.githubusercontent.com/simonmichael/hledger/6a97a246dd757e9821650deae54b3a4ee49bd5b9/hledger-api/doc/hledger-api.1.m4.md
>>
>>I wanted a little more, so right now I'm using m4 for conditional
>>content, file including and formatting macros.
>>https://github.com/simonmichael/hledger/blob/master/doc/lib.m4
>>https://raw.githubusercontent.com/simonmichael/hledger/master/hledger-api/doc/hledger-api.1.m4.md
>>
>>
>>
>>On 5/17/16 2:11 AM, BP Jonsson wrote:
>>>A filter which removes divs and/or spans with certain classes would be more
>>>robust. Ideally the classes to remove could be specified on the command
>>>line/in metadata. If the OP is interested I can write such a filter.
>>>
>>>Den 17 maj 2016 06:10 skrev "John MacFarlane" <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>:
>>>>You might find this useful:
>>>>https://randomdeterminism.wordpress.com/2012/06/01/how-i-stopped-worring-and-started-using-markdown-like-tex/
>>
>>
>
>
>--
>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/nhf85b%24lq2%241%40ger.gmane.org.
>For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2016-05-17 17:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 23:02 Adam Wood
[not found] ` <d79563cb-25d7-40e1-9d20-777eeaeb7189-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-05-17 4:10 ` John MacFarlane
[not found] ` <20160517041033.GE34153-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2016-05-17 9:11 ` BP Jonsson
[not found] ` <CAFC_yuQVdqUUVVWxFxXmjN1dsw=i+4O8r2yEJBDv7aKD5RB5_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-17 13:49 ` Simon Michael
2016-05-17 14:00 ` Simon Michael
2016-05-17 17:08 ` John MACFARLANE [this message]
[not found] ` <20160517170804.GB6158-4kKid1p5UN5kRMcaKpzQXBvRwXAb8BAkh13vi7wywA4@public.gmane.org>
2016-05-18 12:19 ` BP Jonsson
2016-05-18 17:04 ` Adam Wood
[not found] ` <17d1ffd2-b289-45e3-a5aa-885ad3b59e9f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-05-18 20:45 ` BP Jonsson
2016-05-17 14:24 ` John Muccigrosso
2016-05-18 21:45 ` D L
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=20160517170804.GB6158@D25Q40BGFY13.berkeley.edu \
--to=jgm-tvlzxgkolnx2fbvcvol8/a@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).