From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18079 Path: news.gmane.org!.POSTED!not-for-mail From: John MACFARLANE Newsgroups: gmane.text.pandoc Subject: Re: Date: Thu, 24 Aug 2017 09:44:46 -0700 Message-ID: <20170824164446.GC72769@protagoras.berkeley.edu> References: <20170821210000.GD9940@protagoras.berkeley.edu> <871so3yet8.fsf@mat.ucm.es> <20170822175049.GC33272@protagoras.berkeley.edu> <878tibz7c2.fsf@mat.ucm.es> <20170823000957.GD11626@Johns-MacBook-Pro.local> <87k21uwk14.fsf_-_@mat.ucm.es> <20170823141516.GA22331@Johns-MacBook-Pro.local> <8760dew9da.fsf@mat.ucm.es> <20170823205425.GE56323@protagoras.berkeley.edu> <87378h53vq.fsf@mat.ucm.es> 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"; format=flowed X-Trace: blaine.gmane.org 1503593094 15030 195.159.176.226 (24 Aug 2017 16:44:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 16:44:54 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBBEF7TGAKGQE5EK3ZZY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Aug 24 18:44:50 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ua0-f184.google.com ([209.85.217.184]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkvFO-0003Wb-OD for gtp-pandoc-discuss@m.gmane.org; Thu, 24 Aug 2017 18:44:46 +0200 Original-Received: by mail-ua0-f184.google.com with SMTP id g11sf177uah.2 for ; Thu, 24 Aug 2017 09:44:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1503593093; cv=pass; d=google.com; s=arc-20160816; b=uI14nVkqK3JVY4VwM0YGE8Z5kzkLw3RAhouKVSgrCbBfGmZZHm4IflZ+sNDPfoErqV +5einsmJw6gc9XFtMo4UlwNN9VJlHX76Fdd7JDPlFSQcXWilImMB/7bLJ5XBaNUWxLtL YWT/vnThl8BtIeBDXUrFewM2A6SmSqEcSfxFChUUuf7D65mLnm83Vl9gpp6GkoRE2koP wBkYGHNXpUZ6creADC0/Qmw9TQAJQZl7FqWs2OSCnFLru/T1+HvLK9mmZMR8A4TcD5yF q2SzQZrc5p6AksuA8vXEVur0pk3d8w73pnITPg+hgjkZRFT0crhHWXwmqpewcod77ba2 z5+A== 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:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :date:from:arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=wOqSBZ2dfcefrWeh1jdxxyyEuSlgD3DTwBMYCQdf5s0=; b=uM1LHRgYV9uq4pTLeoYstPXKCwHAVQvpYHFW8gCiowOCpwVZuoCmtsAhXKQliAdVQl +2kQkiBn5RkO88XykJLsRqZ6lwvnC4ewetz2n+aX3XRPjuTetXz+CvsSqqCcRXQcITZU b2YwDOhcxgLkeBSUcNmMjgX9zQAYjFDm4n2ztrdsgMNvuWS6adEQI6DSGEO2CVyfQiPg OIjFZ2O57XRfxy/F1qoVf0eB1GL++ShnJgez2WCSVsrj1gNBwN2EcSZSrzXA3Frox1bp ul6VNz5GKQEykHty2hKs2mZjZ284CNL5xk+esBQQUadt2TlzTgminYRAkIBjPLRpNNl+ ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ssob1Eov; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::244 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:date:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent: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=wOqSBZ2dfcefrWeh1jdxxyyEuSlgD3DTwBMYCQdf5s0=; b=SAKMoblRVYWBhCuEj7jExskYrZG4FbBe89JkLKqKwGwU52pgdj210I7AmFeGZUJNFc nxfhC1QVz6DHg3B1LKRYWuiI/b4z6Vu3ECaA5pdQhodIu9x4JNne5Fi+tHHrmvdSpQgI Ngewt7P//5HSSLZfII6wu1yYPjkn0TetsyDUaMZsDwbfY7TBAjIfq/1b1aVjTL5AES4x PbTEYol3HQIuI9yx4oBWdFiHG6KssbnLpjYnqKuUUb9ZQ73oXELvBNgG06g4lzWmWxN9 iHHxdJRKJbtH7rMQEF3LqMnQczr42/hdCp1Y2+prhwCAhWRuoDGoNv/Rx8KLVNnLHT4f 6A/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:date:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent :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=wOqSBZ2dfcefrWeh1jdxxyyEuSlgD3DTwBMYCQdf5s0=; b=N89hgz33wYGPcsETCDgIZUT6KKou6rMU1mhX9J6pNbSII1IT1/zWOdoAETmjWZpKGu nyWHbIrIE6Z9fxv657jnrSGLO7N/r5+PGi681YPzT5R+LHYiTAA0TL87aEbJ+9T+D7qq BpwYl3i0zahbpGKruuavblG4agYko7tF1YAEpxYvmfJoHV8upc1D0CxsfcIiUL1I0Ox+ W3HKk1fC+mNqpV0ULBNnhtWP7BREj2hgE9O5M/K2LTHULgFWGU42uq8DvVbz+43aXFbA ZTlBRdYshISTl30qyO9ea2szeMjJVoZI3b64MA6HEJE+gMTu3+2w+zZSzcglBpDvKOdY Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHYfb5g+K7YbmOqTqdaO6kCsMC8HyP0/EhgafqS3zzX/v7N7g1pJJ4iz 45gIF6loqEqykw== X-Received: by 10.36.43.198 with SMTP id h189mr315582ita.4.1503593093490; Thu, 24 Aug 2017 09:44:53 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.23.70 with SMTP id 67ls3933077iox.18.gmail; Thu, 24 Aug 2017 09:44:52 -0700 (PDT) X-Received: by 10.107.147.212 with SMTP id v203mr4595689iod.122.1503593092662; Thu, 24 Aug 2017 09:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503593092; cv=none; d=google.com; s=arc-20160816; b=rSaXB6iGq34He10YireFfo4xDHvhqnwjZmfpqBfKYt6EUG5h2/LvSt9YaqV9u7AaPC t4fklhKDODl9ezeSulQpWBAXja0cDUEIaNu61wCw448uq7AyLYPMeA9FN29oiRhiu80E nsNCwEKW3xLzU6jYWenSPWpBaDhpMvEHW8ewp/L/504/jbgWmD3ytHWfhmffrfnaUu+j jCcZ7yt+bqKB2/iaWVLdzAv31EFaXk33P8R7MN3+ay6MpU+rlntvNERK17MiwxCbGprn 8KbJYc5W8xV6G+y39fzWgfJ/Mb8wXLm+mYMUheLiq8NnAMGXhJgIJ2E7xE0uIYo9+KN5 QH/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:date:from:dkim-signature :arc-authentication-results; bh=+sWkrFDvdJyzDHjBkbcp87N742s+sRL5b/xc0k2V1HA=; b=Etz1r1I578Et6KFIrfab5DngAqw7TPi5KVDzfJoL/AAczpx+YANPAkb4JUkcXnOdiE CjVYI0aJnVvv1iDHDtnH/bpCM62XcFQf0kb6ygQRVsC7UxtoLfM5tgQ0Z0ZZwauwgmI1 eynY/Ad/VtfPAUE/rjz02diT7BRWvJA8tPZuS68mjzB4mLjG45ur0nVg9GsB9Lch/BeI 0CJ2LHeKAU0KkSUPaDmmeFfLTltoPK0dKLy6JaYbPKbXZQW/llNSyZvKDuyq0QXqVK9l YSdGl+dheLro19DKHILTRLOysGO5/4OryqASWUk3o3d+cqBZ6mnWLprl/XiidoY08i5B qthA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ssob1Eov; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::244 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com. [2607:f8b0:400e:c05::244]) by gmr-mx.google.com with ESMTPS id v14si779220pfd.7.2017.08.24.09.44.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 09:44:52 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::244 as permitted sender) client-ip=2607:f8b0:400e:c05::244; Original-Received: by mail-pg0-x244.google.com with SMTP id s14so26009pgs.0 for ; Thu, 24 Aug 2017 09:44:52 -0700 (PDT) X-Received: by 10.84.241.68 with SMTP id u4mr7436496plm.435.1503593092179; Thu, 24 Aug 2017 09:44:52 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id f15sm7554765pgu.90.2017.08.24.09.44.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2017 09:44:51 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id EC4A3A1C5; Thu, 24 Aug 2017 12:44:40 -0400 (EDT) Content-Disposition: inline In-Reply-To: <87378h53vq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ssob1Eov; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::244 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:18079 Archived-At: And in addition, you must make sure that your filter is compiled against the same version of pandoc-types as the pandoc executable. +++ Uwe Brauer [Aug 24 17 16:26 ]: >>>> "John" == John MACFARLANE writes: > > > +++ Uwe Brauer [Aug 23 17 16:13 ]: > >> I wouldn't mind to download and compile the dev version of pandoc. > >> But how am I supposed to do it with that version? > > > With dev pandoc, > > > pandoc -t native -f latex > > \label{hi} > > [Para [Span ("hi",[],[("label","hi")]) [Str "[hi]"]]] > > > So your filter could pattern match on a Span with > > label attribute: > > > go (Math _ _) = Str "FORMULA" > > go (Span (_,_,[("label",_)]) _) = Str "LABEL" > > go x = x > >I just found out that I have a compiled version from march this year. > >,---- >| pandoc 1.19.2.1 >| Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4 >| Default user data directory: /home/oub/.pandoc >| Copyright (C) 2006-2016 John MacFarlane >| Web: http://pandoc.org >| This is free software; see the source for copying conditions. >| There is no warranty, not even for merchantability or fitness >| for a particular purpose. >`---- > >So I hoped this is recent enough. >I now considered the following stripmath.hs file >,---- >| import Text.Pandoc.JSON >| >| main = toJSONFilter stripmath >| where stripmath (Math _ _) = Str "FORMULA" >| stripmath x = x >| go (Math _ _) = Str "FORMULA" >| go (Span (_,_,[("label",_)]) _) = Str "LABEL" >| go x = x >`---- >then I did >ghc --make stripmath.hs > >And after compilation > >/home/oub/.local/bin/pandoc eulerpoisson.tex -t json | /home/oub/scripts/Strip2/stripmath | pandoc -f json -t plain -o euler-grammar.tex > >But I obtainedstripmath: Error in $: expected product (:*:), encountered Object >pandoc: Error in $: not enough input > >Sorry for this elementary question. > >Uwe Brauer > >-- >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/87378h53vq.fsf%40mat.ucm.es. >For more options, visit https://groups.google.com/d/optout.