From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23043 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: pbeltran Newsgroups: gmane.text.pandoc Subject: Re: Conditional compilation - How to? Date: Wed, 26 Jun 2019 01:25:01 -0700 (PDT) Message-ID: <9ab5d37d-74c0-4793-81fe-c6cdab9e253d@googlegroups.com> References: <61bdaf46-d88a-4ef1-b145-71ad5900fed8@googlegroups.com> <44645f9a-1670-4f4e-93cc-e24394fa10f4@googlegroups.com> <5fc2de0f-82db-4d02-9dc9-ff5db8a8b9b4@googlegroups.com> <5a4d26a3-b9b7-dda1-d437-6e7cdd519dba@gmail.com> <1375b479-60d6-4514-8c72-db60f3355ab8@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1924_543139498.1561537502054" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="188760"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDR3TD5H7MBRBXWXZTUAKGQEI47OC3Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 26 10:25:05 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi1-f186.google.com ([209.85.167.186]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hg3Em-000mxa-Nj for gtp-pandoc-discuss@m.gmane.org; Wed, 26 Jun 2019 10:25:04 +0200 Original-Received: by mail-oi1-f186.google.com with SMTP id j22sf698840oib.7 for ; Wed, 26 Jun 2019 01:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=RQqfqdAjtxMZF5564RiO/TNM791lhp8DxVKiwaNOtm8=; b=ZSnNCMvrTTSwUkCgAYSmpXsgBUrrwGQcMbe1L1Is9baT9TXzaDhO4TMQhalZ0bsV6l MLPfv4XV1XsSrZ43N3TpSVwYoaXDdhjriDQgVa/BCv7+WHq//HK9Spg7PmwyL8ZSXXEC 74/lCp04n8mHgyz9v0DpJ00/CMKiCJY9XYbkErOVc7ct6OhzP7Hx56bW/2nvQoH0aLkS DIIzHuS5bi6dLz9LX9PZKQMfUxoodR9S4/2pSHeyB0gbW4kgu6RoFCbVNaNDJzyio+O4 H0sBEAq+OpNf6rMOv2X1H8DFtgLxi7iV4aQ+NItdWHZ+R27HNfcBsnsNuhP5/o8nYFaZ hVUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=RQqfqdAjtxMZF5564RiO/TNM791lhp8DxVKiwaNOtm8=; b=BogqSTnQDBxCK1QwU5Mnr8V7KPnYKB2sX7hTMt8Jxni0HqxowfNc9zEkgKZCq5GCW+ cNQ0g5HP+FbfX+dv/pNfD38v0uyw0+YYS56qbzNHjpkpaJo1P4KLoZYs/Uqrl2LPXL/D Yu+mr6lbeEIvWAUKrLwxygVDoHGFRSxtc4Mhe384kBiQ5EbOIB25FCqE2ir2IpjN2SaI ZQ8CRNAuKB5ehtlnDJDAISuyefMvJohwcCTonqLpshaWVUFaKVGm12VDmhYsFnUelxKp UMIT2fg4aKE7u35BH94LOGps7QaLI0b0QUtIbl+MLXUs75O1fas7v8drvmq59hNeD7Ln MZjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references: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=RQqfqdAjtxMZF5564RiO/TNM791lhp8DxVKiwaNOtm8=; b=VV7mBAX88ALWFVoV0s5G5Ne50Y8MbGeKzt5iRtWWd8E4MpHNhIKDjfKkdrU4mQNk+k gR0O/jPzTgC/DZkRsRwB8ugjqELbA7FkxDgGTC+Xk04kxP9tyvAp73SOxKmEcOsWxiCq ESzRkpM4WiFMVkPRODFiW9yZoJFOEMC4HMxoSwsAtWlcZvBaQRGkuRhZrss38K7Y1+zy wkzebTOO5cGaPTpH9jauKeDEfZLW6wRRvOlmvTcj957F3fwUad/AcHcOxEvkgKWYlZ/B vCS9PdnOMnDHMPsfqUQu74tQx1FHNHzc2bws9MmTQcMfwlYkqwORQD/lo/AIDmTeBazo sV5A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAVsVXdfBWb3LY1R4nrzbt8yyc6LXCceRNuNOeNNSXkUD6PnsuGt gWKx9PMnx8z1avnfIaxQJno= X-Google-Smtp-Source: APXvYqwjiyQSuV63VOgyqtqHD/8pcJUyWTBl1nP6Q8cN8Qif5hNRw2M0KxhpPjjwKUv0kmBeiQE6Hg== X-Received: by 2002:aca:4256:: with SMTP id p83mr1026554oia.125.1561537503513; Wed, 26 Jun 2019 01:25:03 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:729d:: with SMTP id t29ls238196otj.3.gmail; Wed, 26 Jun 2019 01:25:02 -0700 (PDT) X-Received: by 2002:a9d:7003:: with SMTP id k3mr2424161otj.28.1561537502598; Wed, 26 Jun 2019 01:25:02 -0700 (PDT) In-Reply-To: <1375b479-60d6-4514-8c72-db60f3355ab8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: pabelpe-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.org gmane.text.pandoc:23043 Archived-At: ------=_Part_1924_543139498.1561537502054 Content-Type: multipart/alternative; boundary="----=_Part_1925_175962255.1561537502054" ------=_Part_1925_175962255.1561537502054 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks, I'm working with the solution via lua filters, as I need not two,= =20 but several versions. El mi=C3=A9rcoles, 26 de junio de 2019, 2:56:59 (UTC+2), Hans Kunkell escri= bi=C3=B3: > > Hi! > > Perhaps you are satisfied with the way discussed earlier. I have an=20 > alternative solution for those who are interested. > > I also had the need to make two versions of a document where most of the= =20 > contents are the same. My solution was to have single file and where need= ed=20 > write like this: > <<< internal > Contents here will be in *internal* version. You may include any valid=20 > markdown here. > <<< external > ... For external version ... > >>> > > The attached bash script will parse the file and depending on targeting= =20 > internal or external version (or whatever identifiers you prefer) two=20 > different intermediate files will be created and then processed by pandoc= . > > This is the way I solved it and if you find it useful for your needs,=20 > please use it! > > Regards > Hans > > --=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/9ab5d37d-74c0-4793-81fe-c6cdab9e253d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_1925_175962255.1561537502054 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, I'm working with the solution via lua filters,= as I need not two, but several versions.

El mi=C3=A9rcoles, 26 de j= unio de 2019, 2:56:59 (UTC+2), Hans Kunkell escribi=C3=B3:
Hi!

=
Perhaps you are satisfied with the way discussed earlier. I have an al= ternative solution for those who are interested.

I also had the need to make two versions of a document where most of the= contents are the same. My solution was to have single file and where neede= d write like this:
=
<<< internal
Contents here will= be in *internal* version. You may include any valid markdown here.
<= << external
... For external version ...
>>>

The attached bash script will parse the file and de= pending on targeting internal or external version (or whatever identifiers = you prefer) two different intermediate files will be created and then proce= ssed by pandoc.

This is the way I solved it and if= you find it useful for your needs, please use it!

=
Regards
Hans

--
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/pandoc-discuss/9ab5d37d-74c0-4793-81fe-c6cdab9e253d%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_1925_175962255.1561537502054-- ------=_Part_1924_543139498.1561537502054--