From: Hans Kunkell <hanzukun-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Conditional compilation - How to?
Date: Wed, 26 Jun 2019 01:31:16 -0700 (PDT) [thread overview]
Message-ID: <4f0d389c-c21c-4069-a344-ef6ce1efb113@googlegroups.com> (raw)
In-Reply-To: <9ab5d37d-74c0-4793-81fe-c6cdab9e253d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1990 bytes --]
Hi pbeltran,
ok, I understand. My script is not limited to 2 versions but any number.
internal and external was just the choice I use.
I guess a lua filter is better for your workflow, I just wanted to share
another possible method, it may help some other.
Have a nice day!
Hans
Den onsdag 26 juni 2019 kl. 17:25:02 UTC+9 skrev pbeltran:
>
> Thanks, I'm working with the solution via lua filters, as I need not two,
> but several versions.
>
> El miércoles, 26 de junio de 2019, 2:56:59 (UTC+2), Hans Kunkell escribió:
>>
>> Hi!
>>
>> Perhaps you are satisfied with the way discussed earlier. I have an
>> alternative 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 needed
>> 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 depending on targeting
>> internal or external version (or whatever identifiers you prefer) two
>> 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,
>> please use it!
>>
>> Regards
>> Hans
>>
>>
--
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/4f0d389c-c21c-4069-a344-ef6ce1efb113%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 3046 bytes --]
next prev parent reply other threads:[~2019-06-26 8:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 16:43 pbeltran
[not found] ` <61bdaf46-d88a-4ef1-b145-71ad5900fed8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-06 18:16 ` BPJ
[not found] ` <CADAJKhBNWpmcKAAaNw_xo_EeT-JWKVPcnFo9EdDfzyA0+Fpydw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-06 18:36 ` pbeltran
[not found] ` <44645f9a-1670-4f4e-93cc-e24394fa10f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-07 5:49 ` BPJ
[not found] ` <CADAJKhAL7JGQyMS7A8eYhN7vQLdk7ccVm8=VEwz1keeuY_LVBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-07 6:46 ` pbeltran
[not found] ` <5fc2de0f-82db-4d02-9dc9-ff5db8a8b9b4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-07 12:03 ` BPJ
[not found] ` <5a4d26a3-b9b7-dda1-d437-6e7cdd519dba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-06-26 0:56 ` Hans Kunkell
[not found] ` <1375b479-60d6-4514-8c72-db60f3355ab8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-06-26 8:25 ` pbeltran
[not found] ` <9ab5d37d-74c0-4793-81fe-c6cdab9e253d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-06-26 8:31 ` Hans Kunkell [this message]
[not found] ` <4f0d389c-c21c-4069-a344-ef6ce1efb113-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-06-26 8:40 ` pbeltran
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=4f0d389c-c21c-4069-a344-ef6ce1efb113@googlegroups.com \
--to=hanzukun-re5jqeeqqe8avxtiumwx3w@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).