From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/14970 Path: news.gmane.org!not-for-mail From: BP Jonsson Newsgroups: gmane.text.pandoc Subject: Re: Printing conditional parts - looking for suggestions Date: Wed, 18 May 2016 22:45:55 +0200 Message-ID: <573CD483.6050504@gmail.com> References: <20160517041033.GE34153@MacBook-Air-2.local> <17d1ffd2-b289-45e3-a5aa-885ad3b59e9f@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed X-Trace: ger.gmane.org 1463604387 28065 80.91.229.3 (18 May 2016 20:46:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 May 2016 20:46:27 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDIY76M674FRBGFJ6O4QKGQE7U6HT5Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 18 22:46:20 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-io0-f186.google.com ([209.85.223.186]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b38MD-0003KE-Pm for gtp-pandoc-discuss@m.gmane.org; Wed, 18 May 2016 22:46:17 +0200 Original-Received: by mail-io0-f186.google.com with SMTP id 190sf14830191iow.0 for ; Wed, 18 May 2016 13:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:subject:to:references:from: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=wpVn79HQXfrhZC6XdTnjaW1bV7knQDda8ikAN15iejo=; b=xC7LoXF9ia4XeF+DE2WdsKwpg91y0yzcJViJPgbZC43Dw919RYVGs3Zhn9MWi/QJiC di5Diaue6uLakB8NNi3GPmYyvb77Y9aqO7ULwSub4RP8RAPWwahxRoCWCACfUaUGQUJV mUCk26qcFXVndN/5/l2yzvpS1SWm+wP8sU8GN5CPahKdprAeLjOysA11hv7HC/mMwCxu 7fzqLG4XxCte0vqthkJqvKuJ61QKZcgvDNyyuhXQ92EQVRJz+ycFaH1I5on4DerSQs5B DLYZMN7EwYjX0FZ6uGVRPKEkR5OrRs3zI00b16clwizg+2eWmwS8RJo43DQRCbfjqkRK WaBw== 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: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=wpVn79HQXfrhZC6XdTnjaW1bV7knQDda8ikAN15iejo=; b=XSLkecixB3iTTCQvGf/4E9qNyQE+P/ot+sLFNURBsgBCl5t9R6sKUKfCaKX15Exvq1 DEajbzGPkqm8Z5IwK2fnW17xOGnVk64/Gndf5kCYa/xUfT2GoYTljaW33Jn/xy2lAkyF 0FSn+hBenGKeqMgKM7feSddiPhCL5X6PXeLW6pu5PysK4ktQJBWkSGBe7/C1PVe67MRh RyR8N0navuVRz44nxwE3eVJ2gShkbpQ8gxgGxY49RNZ6Q+lg1JVrjdYxPKBrMkq54n+n +0kpoXspIKU2eACJqZT9eWvQJ9rM4iiaazy4OMTLzQFNq6rNPq3vxS2morQdC/uDOuO6 O9Dg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOPr4FW/QM2i/q4Bgb+C6t1gB3gGBYCsQY7qYS7m2ehJL5HgOcdrj6+DudJ/WzJiLUeoRg== X-Received: by 10.140.44.9 with SMTP id f9mr1323738qga.20.1463604377035; Wed, 18 May 2016 13:46:17 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.140.106.134 with SMTP id e6ls1637900qgf.48.gmail; Wed, 18 May 2016 13:46:16 -0700 (PDT) X-Received: by 10.141.28.198 with SMTP id f189mr30727494qhe.0.1463604376476; Wed, 18 May 2016 13:46:16 -0700 (PDT) Original-Received: from manu6.manufrog.com (manu6.manufrog.com. [72.29.89.222]) by gmr-mx.google.com with ESMTPS id q78si546092vkb.1.2016.05.18.13.46.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 18 May 2016 13:46:16 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org does not designate 72.29.89.222 as permitted sender) client-ip=72.29.89.222; Original-Received: from [178.249.150.192] (port=34840 helo=[192.168.1.248]) by manu6.manufrog.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.87) (envelope-from ) id 1b38Lw-000joa-9d for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Wed, 18 May 2016 22:46:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 In-Reply-To: <17d1ffd2-b289-45e3-a5aa-885ad3b59e9f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-OutGoing-Spam-Status: No, score=0.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - manu6.manufrog.com X-AntiAbuse: Original Domain - googlegroups.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gmail.com X-Get-Message-Sender-Via: manu6.manufrog.com: authenticated_id: bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org X-Authenticated-Sender: manu6.manufrog.com: bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org X-Original-Sender: bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=softfail (google.com: domain of transitioning bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org does not designate 72.29.89.222 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=fail (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-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:14970 Archived-At: Den 2016-05-18 kl. 19:04, skrev Adam Wood: > HTML divs would work, I assume. (Yes? Even with output to PDF or otherwise > a generalized solution?) Sure. Pandoc just (ab)uses the HTML syntax for its own element type. > I imagine a panflute or pandocfilters filter that accomplishes this would > be used by more people than just me. I Python slowly (And am about to have > a baby) so if you are interested in doing this before I ever get to it, > that would be amazing and appreciated. Try the one here: I haven't tested it very much but it's very simple. You can either include only divs or spans with certain classes, or exclude only divs or spans with certain classes. Not both at the same time. > > Incidentally, it makes more sense to me to _include_ classes as specified > on command line. I imagine two classes for all the conditional sections - > one marking them all as "conditional" and then one marking each's specific > condition (which might be multiple, I suppose). > > > I also do like the gpp solution JMacF and might use that at least for now. I got frustrated with that approach because you have to double-escape your backslashes, which makes the markdown broken even if you remove the macros. /bpj > > > On Tuesday, May 17, 2016 at 2:11:59 AM UTC-7, 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. >> >> /bpj >> Den 17 maj 2016 06:10 skrev "John MacFarlane" > >: >> >>> You might find this useful: >>> >>> >>> https://randomdeterminism.wordpress.com/2012/06/01/how-i-stopped-worring-and-started-using-markdown-like-tex/ >>> >>> >>> +++ Adam Wood [May 16 16 16:02 ]: >>> >>>> I'm a church musician and liturgist. I print a lot of worship >>>> bulletins, as well as "full scripts" for ministers. >>>> The congregational books don't need everything that the altar books >>>> need, and the organist or music director might need other things. >>>> I'd like to be able to sync all of this in a single source document, >>>> and then use some kind of conditional formatting for printing out three >>>> (or more) different versions. >>>> I imagine there are other use cases (lecturer who wants a script plus >>>> slides plus handouts from single source) where this sort of conditional >>>> multi-version printing would be helpful. >>>> I'm just starting to think about how I would tackle this --- especially >>>> how the source file (Markdown) would look. Any thoughts, ideas, or >>>> pointers to existing projects would be really appreciated. >>>> (Maybe this exact thing exists already?) >>>> 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 [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . >>>> To post to this group, send email to >>>> [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . >>>> To view this discussion on the web visit >>>> [3] >>>> https://groups.google.com/d/msgid/pandoc-discuss/d79563cb-25d7-40e1- >>>> 9d20-777eeaeb7189%40googlegroups.com. >>>> For more options, visit [4]https://groups.google.com/d/optout. >>>> >>>> References >>>> >>>> 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>> 2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>> 3. >>>> https://groups.google.com/d/msgid/pandoc-discuss/d79563cb-25d7-40e1-9d20-777eeaeb7189-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer >>>> 4. https://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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . >>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>> . >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/20160517041033.GE34153%40MacBook-Air-2.local >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >