From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18668 Path: news.gmane.org!.POSTED!not-for-mail From: Kolen Cheung Newsgroups: gmane.text.pandoc Subject: Re: docx to pdf conversion error Date: Tue, 14 Nov 2017 04:12:27 -0800 (PST) Message-ID: <17d771db-6489-402c-afa6-d948ca8e9cac@googlegroups.com> References: <9256e740-7530-4dc2-9acd-5d14eca6fc07@googlegroups.com> <20171110044412.GI70590@MacBook-Air-2.local> <4710734d-f71c-45c9-b65f-27ebf81e29e1@googlegroups.com> <85643608-a189-4407-8a21-37e5d75074fd@googlegroups.com> <323e407c-d9ae-429a-b951-1dc5b87a624b@googlegroups.com> <2b1dba89-0544-49a0-954d-cad4c269fc78@googlegroups.com> <600cb80b-0753-4823-acd3-a05cae7577e8@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6084_566311708.1510661547487" X-Trace: blaine.gmane.org 1510661551 20219 195.159.176.226 (14 Nov 2017 12:12:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2017 12:12:31 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS252WXTEIBBLF3VPIAKGQEBENZSPA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 14 13:12:24 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi0-f58.google.com ([209.85.218.58]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEa4j-0004mp-Vk for gtp-pandoc-discuss@m.gmane.org; Tue, 14 Nov 2017 13:12:22 +0100 Original-Received: by mail-oi0-f58.google.com with SMTP id 203sf12080729oie.20 for ; Tue, 14 Nov 2017 04:12:29 -0800 (PST) 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=xj262hGnlgQr7Y5P6Tz+amSvkRYYEvz1iu73Dx8pi5c=; b=d0YV8A4hvCzxSGU/UbxHZTtJ97FKffesg8v9V0OCBiUae1uDCc6dF/MSlSTkgmjtPk lL7gl801neUqeQv6r92M4U0FJPUsYcNSmT0caugmeg4aXslA/xFaqo0v4Rk9vNM+dVKs zZeEg28RHD1h+3HAMyMJsTWOHi2XwvmjcYuB78dj7GAk4Yao/LIzt+F75pYkdvg5q6iq KbYGUasHOaZN7KzAAeLr733O4O98TuXu9M8sUrwpeZXw4nN7jOQPfmA5N0AI0lmuqX9V 3oMUr3jlatSEmdTeaQ+lvVd2ZsA/cNWM1dyuHqabF25h4bUJhLzlABdwaPdH4WQDtD0I bBww== 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=xj262hGnlgQr7Y5P6Tz+amSvkRYYEvz1iu73Dx8pi5c=; b=epLGWtq1xNAn0K6X22aOSRAAYW10tcB9waa7d4OZeNcrRDDFuUwYOiTBcb1wWvOGjh 5c0+wi/Z1u2sxVhfjwT6zuyMOs+yLXThv8gWWpksQR+J5qlJz7BJCJ1Lx74yagEUa3Il XvJ6+WuGgIyVetvDdzi5i1XGfMLLI89Lex8gSVitWfop/9ewdOhVmK4c94eM4j5Naj0k u0uy5yXjGtcJ8XV0aYm228sW8YDKuq3gCP1j+3c892487e2eiuuE3tNoM71I493CZQu2 g/Lsl8o759OuH/HA1wP/8qLRUv/egIU03aRkNPyPtBu6mFoOcvGcbUFyv6DrWDWo5eRp mzrA== 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=xj262hGnlgQr7Y5P6Tz+amSvkRYYEvz1iu73Dx8pi5c=; b=VTVwK5Suhl03+xISru0lb/dTMgUAH8XaVrHPTmdXXmDo5Ex5GUbCJlWEvjtRsRE6vU xwrLaqsBIh1S3Qzm5j/Yz9i4uD9iiM62Ac6DHnybq7u6yhFRT+NY3R0nYC6UOA2j2jFm 2TnKdUbBToaTZ/H01/vqmkqDhvjSMNJJTu2DNHUKo1uyt7J04HCI16qf7oykDbl/SIjn q4jGK09d38u9E/ovEvUFHyexEqFIwPG0W/7rhR8IwSzGY+funAstRpL1jyhRkkDVySxv 1mKn9/9WN04FZaVAlHSNg52xX9sGqE9pZrjKppqiMg0VtQeA59y8HLwL0F4yUuVZ70JY ZB4A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJaThX7g91VQMahZYLjZiD338sfu0iEpWYgOA+jcxn3vKOg5v4CUT6Sj nsyO2EFfbC5PLsSbcjZ2XyE= X-Google-Smtp-Source: AGs4zMZvGZ5zhxuePNuIr9k091iHm15VuEg87HzK3KpsP8TJJVk61w7IdwfuFC1vw5XqCM9WxSEx4A== X-Received: by 10.157.39.197 with SMTP id c63mr595783otb.11.1510661549243; Tue, 14 Nov 2017 04:12:29 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.202.74.195 with SMTP id x186ls8909861oia.8.gmail; Tue, 14 Nov 2017 04:12:28 -0800 (PST) X-Received: by 10.157.14.201 with SMTP id 67mr905841otj.4.1510661548063; Tue, 14 Nov 2017 04:12:28 -0800 (PST) In-Reply-To: <600cb80b-0753-4823-acd3-a05cae7577e8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: christian.kolen-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:18668 Archived-At: ------=_Part_6084_566311708.1510661547487 Content-Type: multipart/alternative; boundary="----=_Part_6085_629249467.1510661547487" ------=_Part_6085_629249467.1510661547487 Content-Type: text/plain; charset="UTF-8" essentially pandocpm is supposed to do that, in https://github.com/pandoc-extras The development of pandocpm has stalled for various reasons (one primary reason is the change of funding starting from January so I no longer worked on a project that uses pandoc extensively, which has given me lots of time to do pandoc related stuffs in Fall semester last year). While pandocpm sort of work, there's still some major changes needed. The new lua filtering system in pandoc 2.0 certainly sparks my interest in completing this tool again. e.g. we had excuses to not have our own package manager because we can rely on those existed in the language we wrote it. But since pandoc embedded the lua interpreter, the only thing needed for a lua filter is really only the filter itself (so in this case relying on some sort of lua package manager doesn't make sense). Now there's still one imperfection though, that pandocpm is written in Python. Do you think it is possible to rewrite pandocpm in lua, using only the embedded lua interpreter alone? I haven't used lua at all, but I heard that in lua there's minimal "standard library" so I'm not sure how much functionality has been embedded. From some examples you and @jgm did, there's already IO. And then pandoc certainly handles YAML (but is there YAML library available in the embedded lua interpreter? That might make it easier.) And then pandocpm only need to access the DATADIR, and I imagine it could be done to let pandoc passes it to the script? On Monday, November 13, 2017 at 11:50:05 PM UTC-8, albert.k...-stqabkCVF6SGlKaCpJGLJw@public.gmane.org wrote: > > On Tuesday, November 14, 2017 at 12:37:53 AM UTC+1, Kolen Cheung wrote: >> >> I think you nailed it ;) >> > > Made my morning :D > > May be put it somewhere as an example? (e.g. the lua filter doc.?) >> > > There is something related, a filter to add default values if a meta value > is unset: http://pandoc.org/lua-filters.html#default-metadata-file > > I seem to remember that you maintained a collection of pandoc filters. Is > there a repo somewhere? > > -- 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/17d771db-6489-402c-afa6-d948ca8e9cac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_6085_629249467.1510661547487 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
essentially pandocpm is supposed to do that, in=C2=A0https= ://github.com/pandoc-extras

The development of pandocpm = has stalled for various reasons (one primary reason is the change of fundin= g starting from January so I no longer worked on a project that uses pandoc= extensively, which has given me lots of time to do pandoc related stuffs i= n Fall semester last year).

While pandocpm sort of= work, there's still some major changes needed. The new lua filtering s= ystem in pandoc 2.0 certainly sparks my interest in completing this tool ag= ain. e.g. we had excuses to not have our own package manager because we can= rely on those existed in the language we wrote it. But since pandoc embedd= ed the lua interpreter, the only thing needed for a lua filter is really on= ly the filter itself (so in this case relying on some sort of lua package m= anager doesn't make sense). Now there's still one imperfection thou= gh, that pandocpm is written in Python. Do you think it is possible to rewr= ite pandocpm in lua, using only the embedded lua interpreter alone? I haven= 't used lua at all, but I heard that in lua there's minimal "s= tandard library" so I'm not sure how much functionality has been e= mbedded. From some examples you and @jgm did, there's already IO. And t= hen pandoc certainly handles YAML (but is there YAML library available in t= he embedded lua interpreter? That might make it easier.) And then pandocpm = only need to access the DATADIR, and I imagine it could be done to let pand= oc passes it to the script?

On Monday, November 13, 2017 at 1= 1:50:05 PM UTC-8, albert.k...-stqabkCVF6SGlKaCpJGLJw@public.gmane.org wrote:
On Tuesday, November 14, 2017 at 12:37= :53 AM UTC+1, Kolen Cheung wrote:
I think you nailed it ;)

Made my morning :D

May be put it somewhere as an example? (e.g. = the lua filter doc.?)

There= is something related, a filter to add default values if a meta value is u= nset: http://pandoc.org/lua-filters.html#default-metadata-f= ile

I seem to remember that you maintained a c= ollection of pandoc filters. Is there a repo somewhere?
=C2= =A0

--
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/17d771db-6489-402c-afa6-d948ca8e9cac%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_6085_629249467.1510661547487-- ------=_Part_6084_566311708.1510661547487--