From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18270 Path: news.gmane.org!.POSTED!not-for-mail From: Ivan Lazar Miljenovic Newsgroups: gmane.text.pandoc Subject: Re: How to add raw Markdown in filter? Date: Mon, 9 Oct 2017 14:54:24 +1100 Message-ID: References: <20171009035026.GF20728@Johns-MacBook-Pro.local> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1507521267 30061 195.159.176.226 (9 Oct 2017 03:54:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2017 03:54:27 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBC2L5ZPTZEOBB4XF5PHAKGQE3UMPPXI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Oct 09 05:54:22 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-lf0-f59.google.com ([209.85.215.59]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1P91-000761-GV for gtp-pandoc-discuss@m.gmane.org; Mon, 09 Oct 2017 05:54:19 +0200 Original-Received: by mail-lf0-f59.google.com with SMTP id l135sf4529671lfe.14 for ; Sun, 08 Oct 2017 20:54:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1507521267; cv=pass; d=google.com; s=arc-20160816; b=slCqXWwRW8OVkNxNSKD0o8tI/XlvLA7f95wtJNNQIGm9VY9TCQ1vz5qEC7WSe5Mutu ZbUNsZwSiDQAf61aN3DJHDHdcCBHn1yKCfF9xhUNIIPXqp1+/ibfSms1i4UdE4Gl31nT bWOlTn4rfsi4SHLGKJGySzaZPRXwU6CRrgNvZz3BsxzRLgJQVbTmGEZTEn8uKjt7APar udjUOpR26IimVnbhggMf1R93F6la56YCqtYRo/ubWDy8EBGwYOgtPChegAhIf3FrK2bi i4iuXKqvLUAiJbs2LKDouoNt7sU43BC+MKq6n8MGR+wAkkoEyYHyGAyk/bfiARINAFCE JRpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:references:in-reply-to:mime-version:arc-authentication-results :arc-message-signature:sender:dkim-signature:dkim-signature :arc-authentication-results; bh=sOBDiSdFfxSCt/xdJzZd2JkjVG1mL+9IgG0rRTDWvsU=; b=EKRO5r1HRvzF1hHU3NO/eYkxr95RicL2PIIK0d3O156S0HHHnrvXLJerB2FwUJHefO C9fFOO27tyUfg6jjR3RtrcBlbeUVZ4CUudeCjM/g69FGPNnOrVsk90dnx9LjWEJ3WnOs PV3ZT9/dPKdC3J/RC3AgLmijmWvuNZgUKb6lruBt3LAV8YkLVNinTk1Jvy/Wg9lPQGpv HLKSH1h+0d1Sy8Jdquk2cqTHM8/hY5DJfnUeqXsEi/AL1ZHvx714KjBZ1qzNNbCaANEO NPzxxzJsjuX2uBqqd6mII7ygRTX76+Vmg6RXJ8aMI7RqsAvLm0nvm8OOQhvrt+0rzt2P 7cwA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JlBDLXei; spf=pass (google.com: domain of ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c07::22d as permitted sender) smtp.mailfrom=ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:in-reply-to:references:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=sOBDiSdFfxSCt/xdJzZd2JkjVG1mL+9IgG0rRTDWvsU=; b=ESB98gnxtKr5i2eN/bpxDRYhx6ekAIFDfJ/9HPf3gcns8KfsUrfbGW961UXEoOPNg4 FSJYGYOHa559jxJKMFiVqAez/Za7Jrk4QHgiIp8tWognRI7kVn5RUfTMBX44a5Krl4bZ 3Uf4moCHj6tg4cY9bJN5qHeuO5SWy+yBJZwUyPhv1ecpBlst+aSHGO7RuEzsuCxp3xMr LEyeW74xmPqM7P+S0XGBl/Ivq1BVzrJ5uAVzBkL4B3Ze9gVk+ijQOq4Lj/O5Ex3fNqde uV8T1pwLxDqhYLkR4qfU+UPOZjM2uXxyoKIFiZb8ZKvA5FhI2OZFu/ZuuTyrSEOGazep fEVg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=sOBDiSdFfxSCt/xdJzZd2JkjVG1mL+9IgG0rRTDWvsU=; b=Q/tOD6H/uMLNIDDz3328iOZwLyIr+uXGsEH435lnGBDa4D80WwkT45YANVpVltKiLs /a7GJi4jNzqLquSYP5wcChW6chdAAG8nOyEVWSKtrWjEEcX5WBIYfTqB7DBlU+qL9FdN a60D4dngvC2bdqK/M2VN0TuaP/RnOEK7nLldZeZRTWoANhRoOgY9JYU23Q5iP8pJUkfD Y+GtYaRcL8wNInxWxpk5cOqeQZpE8UMmcxigKOY5jg+uK/AIGMl7y/hsSWViND9ntIua GJx4aNFGpgiP+jnXXNveBAjYBsvRN3+RwYMqdiUM+bKlucPq1fCP6i0drJ0MKw9drtz0 Laqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:in-reply-to:references:from :date:message-id:subject: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=sOBDiSdFfxSCt/xdJzZd2JkjVG1mL+9IgG0rRTDWvsU=; b=fNstcsxgQaSg9SCMYnT5Z03wZ2WfE0xDozx1LCULzpQZjAj78tX5ppU0UO4vjOtjmG MV5lYSKvA0DzEo8/eyvIt8NRokZY5Vgny5anRLTCQSPMm+cuQwOOmPH6E9OGqsunLn64 s8AesOqR+pHdo6Oq8j2NdXo8WKPSlCQjBUElhCKzjXaCfTcpz3YDIEfnNX+bEN080B9a Ct6CVAgueuwnkA2Sk6AEQx8cJwxpyUKgOpTxKWySuD1d2MrM5H2u0lMPWs5LOdIDCOj8 67YlHhSdN3aR4FG04gtG4qj4wWDeAEj+OzM42Fv3rByu6BMXdYObxrO9H9TCnh6CH705 V5OA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AMCzsaUygn7Yx7dZxz42rqWBDUIGZeAOwLMLPfDAKhOtsC9eYXRhTz2R qb8vtRTXPgEe1l5bxOnMe1E= X-Google-Smtp-Source: AOwi7QDgKGhntY3BeOWO0tKuTAKGLajmiHkdaT5eDFfiSVt9aDgoWv9FlSISZB36tu2Ld7UoKoMDcg== X-Received: by 10.46.18.12 with SMTP id t12mr7066lje.29.1507521267249; Sun, 08 Oct 2017 20:54:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.46.93.79 with SMTP id r76ls251411ljb.7.gmail; Sun, 08 Oct 2017 20:54:25 -0700 (PDT) X-Received: by 10.25.142.202 with SMTP id a71mr138727lfl.18.1507521265964; Sun, 08 Oct 2017 20:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507521265; cv=none; d=google.com; s=arc-20160816; b=X1Wcr5ZHeM9jqDe590Kx8Pd0Ou5YYVEt7j30iOYFhqeCPPp4O91D8RMQ23L+VM8nM2 3G4q836y0p5h+CdEuuA7yPUKEpeFjmybf2qQCWYnylbgr7GFIKc05ChLxUsGppfiu5y0 TEgTdF9I82WTo73WQnGqoKmOr9W9m/zghQT6v+Da4lTkyQyhTZx404BYI8+ldwbCR79g pjseeiAwSwEFZdaoRBusf5uGP+Zn3+kYfN7ZWj+biwXdHioCNSR8V3gyQhkgJw2oy9sZ khevC+nbk0yIJutFRx33SskZTulV+wD3q5U17spx+XLM86Op0ek3euotXcyr/HKUhmGN Jnwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=VFyz0A399Rte5gU+Wsb9NIRmLIiAxP2pgfZJNGR74SM=; b=M8VHxrUo2Q8TKBAfdIFnV3Kz8HJDae3S9X5x2k/6iWX9xCrxht/yV3i5ehC0rzoIvY rvr1fEgaMnY63YJEFY1Wvwhdo8dT/qqMPRGR+EmvNKOlh95KM0UMBx0JW5IQpR+O3nKR tu79LdpqebSyRC5C/4cW7/CmVVn7gfkUUgUUJATqe8QaIfEJpwPMHxW20Pxz/CjNGetx rYLLLX7M9SpqylRHquTL4RQ3NaG7mU9f3MVaMb5I+YvFPggVtWjlCvSOyZhJJNNbU4Or o+AA9Db8/2pYMRlpI/yuuVKu+95mSIK2rCKbRAp2hOIFEEnkioWF8a9mkdWoRknQK79F eOXw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JlBDLXei; spf=pass (google.com: domain of ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c07::22d as permitted sender) smtp.mailfrom=ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Original-Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com. [2a00:1450:4010:c07::22d]) by gmr-mx.google.com with ESMTPS id 26si308828lfx.0.2017.10.08.20.54.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Oct 2017 20:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c07::22d as permitted sender) client-ip=2a00:1450:4010:c07::22d; Original-Received: by mail-lf0-x22d.google.com with SMTP id l196so25869062lfl.1 for ; Sun, 08 Oct 2017 20:54:25 -0700 (PDT) X-Received: by 10.46.21.6 with SMTP id s6mr3771919ljd.70.1507521265513; Sun, 08 Oct 2017 20:54:25 -0700 (PDT) Original-Received: by 10.46.117.1 with HTTP; Sun, 8 Oct 2017 20:54:24 -0700 (PDT) In-Reply-To: <20171009035026.GF20728-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org> X-Original-Sender: ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JlBDLXei; spf=pass (google.com: domain of ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c07::22d as permitted sender) smtp.mailfrom=ivan.miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=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-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:18270 Archived-At: On 9 October 2017 at 14:50, John MacFarlane wrote: > If you write the filter in Haskell, you can simply use > the readMarkdown file from Text.Pandoc to parse the > Markdown. Might have to do that, but was hoping to keep it using pandoc-types only for licensing reasons (maybe just tell end-users to do it? *shrug*). > Note that the lua filters functionality in the dev version > also provides access to the parsers, so you can do this > in lua also. > > In other languages you'd have to shell out to pandoc. > > +++ Ivan Lazar Miljenovic [Oct 09 17 12:38 ]: >> >> Is there any way using a filter to be able to inject markdown into a >> document using a filter and have it be parsed/processed when >> converting? Ideally, I'd like to be able to generate PDF from the >> result (`pandoc --read=markdown --write=latex --output=foo.pdf >> --filter=./myFilter input.md`). >> >> Using `RawBlock "markdown"` doesn't work as the rest of the document >> has already been parsed, so the contents of those blocks are then >> ignored. >> >> As such, as far as I'm aware my options are: >> >> * Try and write my own mini-parser that handles a subset of Markdown >> and thus the filter can inject the correct Haskell representation of >> the intended Markdown >> >> * Use a 2-stage process for Pandoc to first apply the filter and write >> out to Markdown, then pipe the results into Pandoc to convert to PDF >> (not ideal as this is for a library that should be able to just >> generate whatever results you want). >> >> Is there anything else I can try and do? >> >> -- >> Ivan Lazar Miljenovic >> Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> http://IvanMiljenovic.wordpress.com >> >> -- >> 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/CA%2Bu6gbxdqnG3Ok00OmZiC1V4kW6GyAZKnuS2robnJNq%2Bz_Z2AQ%40mail.gmail.com. >> For more options, visit 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-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/20171009035026.GF20728%40Johns-MacBook-Pro.local. > For more options, visit https://groups.google.com/d/optout. -- Ivan Lazar Miljenovic Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://IvanMiljenovic.wordpress.com