From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18078 Path: news.gmane.org!.POSTED!not-for-mail From: John MACFARLANE Newsgroups: gmane.text.pandoc Subject: Re: Date: Thu, 24 Aug 2017 09:43:49 -0700 Message-ID: <20170824164349.GB72769@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 1503593039 4630 195.159.176.226 (24 Aug 2017 16:43:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 16:43:59 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBTEE7TGAKGQESN4BY4I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Aug 24 18:43:54 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-vk0-f64.google.com ([209.85.213.64]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkvEU-0000gH-8L for gtp-pandoc-discuss@m.gmane.org; Thu, 24 Aug 2017 18:43:50 +0200 Original-Received: by mail-vk0-f64.google.com with SMTP id j189sf9403vka.0 for ; Thu, 24 Aug 2017 09:43:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1503593037; cv=pass; d=google.com; s=arc-20160816; b=YEXm65WKIZQsuiAUBZ1XgDMTf6iSbI1a82V9xHh/RW+o53j4EdLqE4ggv/qWn5Rk9Z 91ZwFR3UP1HZ+5paiS1zSjjz+tOrd5FBICr2eJchG2OCxeRuSqO5idxVaA7XlTd4XPoI 9QOpF0WXV1ku1Jb78VAjwhhU0UKac9kUuNZUPwOxQ1irwiTj1b2iiHkWcKZY4lpT63x2 mlzQgmXX9UBz6nAOKRhItSkpvq7LBlK2g/Fy1nmOhF4W4Kwn7pGGrb969nyfQGncL2Pq uEdelAhnjihwHvZzFGawtodhRY614f66g6EEPkG3be88OSsZs9zEt5QMH1thZCc8sVwJ JlwQ== 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=/1QqKCwdCc95YoHS/I9hoxy94U4U0MD22xS81iPTUnw=; b=CM4eGu752s510TSXmb5VGTInMIW9A6XsNojIfs+5/OhsGyFLhLV1UiwYTOf6OykFN0 JPkahUGWy6Nh+FLSTeu2MQnhCU7GSHSoCvCuODR/x9tYSbBc1sLdPTzQxEdluCD70vHL BNq49fMERQESPI/bIihkqFJweCTlibSmsuifDSuVAz64mCkxiUfQq1EN7cB2/5wxzhNd sslsu4wZDwoBb6JSK6UcT80609DhK502k8EBZkQyTJRk7p0CeUTQN6n2XMDXqbvM2dsO +BvbNUZpFnl2Je2sVDQz/2Kk+WqmPBx4meeH4RrirxpdIGHcMayc393E+v5uRM7RqtGt ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=ssNK9Y5q; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::232 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=/1QqKCwdCc95YoHS/I9hoxy94U4U0MD22xS81iPTUnw=; b=BjxS55uwC7qRP8LCNa++9t51qy7SJJgRl+C4CNoTRqiIrc3DdZqg8KOoNQ6nkS827E k8GuhEdjH4tEvkOk3fpmQz+F1k6hlo+VV6nWM3KX5/67Os0cbFycJwMluzfMO15njM6O dOUsKigxUvtpaxUI0mGj4Lj3NKFiXZo0L+xfKJdaQpXeJfIj448PFRermpGb1gFf86Aw ge3/Amvt5m2e0HSPQd5LdFVCFY2v+2zYLIOEQqQazINFhZ6Ug0azRQ5cU/cUoPMe046y RD8xruC/uV87pHdhLPIcRS9JbF9qi2yk8LKblqTAUFbvogoHR0sQ5uMHFkR6MkvW6ceg 0akw== 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=/1QqKCwdCc95YoHS/I9hoxy94U4U0MD22xS81iPTUnw=; b=D8cVZo8Q8ZGGS8m2MZVJ+Mi1nR2sVYQBBMDmRZB3h7QUzSDWbiuFULb4Sn1sDkDyjk mCICHCye3fBRpTy0Rsz6Z5c3IoEtqoLBhA6Txnb5bLHClTBB7hRyEA2f4DjkyZA4Xvaw MGO4ZQk99udDzC0rv1kRoHh4k/eqzHW0hMqfb2lgGqRxM7x72Y8kF3ckxSq3KK8EUy5E Ga+0jYmF6N1ZpRV/7fM/pUhV9QvrPwIIHPmksp13XrO+lU6h6Y+f8ZJzrJsiJ09/gIhl rWzF6o7gx3SUkfbNkWVttIQZzSYS5EX151YtLfjWVozOCvfLTEQtkttqxvxuurVJJtdL Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHYfb5g4P35IpLVglqGbp4PXZpUL9ARsRc90fubAtD9GHVXiDPqveJ7Y G8kGXH/Pr38I8g== X-Received: by 10.36.17.149 with SMTP id 143mr301356itf.11.1503593036960; Thu, 24 Aug 2017 09:43:56 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.29.199 with SMTP id d190ls3781315iod.39.gmail; Thu, 24 Aug 2017 09:43:56 -0700 (PDT) X-Received: by 10.129.163.15 with SMTP id a15mr588836ywh.95.1503593036074; Thu, 24 Aug 2017 09:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503593035; cv=none; d=google.com; s=arc-20160816; b=TseN2vQyHfIQ/Q8VzMxBYHugkOi3hLkRXWSMbH5R1GN8v3ydC7u2DyKF9K/NN5au8/ GnAX5Oal5PPrP/l903L/IGjiIuMJ6aONYxvAwQ5XuwZmyrp2Mk9r4sXqdm+qH25EPjUX 2bz+VnxBtwMstKTvNFAnQ9aOckEOcvrQW3/miCarDzq4S8CGOG6rwvyYb7ePtR8u7IHT 1y2gqU2/cPYenljLQKy00YLsIieQkP3PXljCAz0o3y56PlaCVMXr4lQ2AYBhyWwI7EpQ qIAvt0xcULIdzclashEN7hWHxuRA+K+Xb6R3O41Rgj88kZeAQGSA7xtlsbq8UcsOXhCl kL7g== 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=M+RR6ZFK1/Z3K5nJuAXd670s1KfRhZkJAsDY5BHGCJc=; b=rWVryGOcA3OMK8HSORf0nwrn4MTupyjLuiktNcxK26gZJhYXIIttwVZyby4XkpUuAS oSthSL+jAF+1zNzBmbyr2QCSEz7+6lTTjWoFvrulJ+ax4st43haZhCh2Wngyz35fD1BR wCxcnezgEPoDXuTQpN/K1S0yUKsGpUQXrkx4cC5GL6Hry/MMdBxa6qPQMUyJxvz4BqBe 4mJIqYZuuR9QKgmNOU4+IZTkxubBKTfVb5I1VasUeKulNrthNOHf6EPSoLkiOlcAR4ts XcPpJlCMkqs5MV8Na0yJ/80oOfn6ecEEP9xEelGTxhiEST6uta7uQHHBulRhQsNhr5ro pnCA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=ssNK9Y5q; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::232 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com. [2607:f8b0:400e:c05::232]) by gmr-mx.google.com with ESMTPS id r10si753007pfk.18.2017.08.24.09.43.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 09:43:55 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::232 as permitted sender) client-ip=2607:f8b0:400e:c05::232; Original-Received: by mail-pg0-x232.google.com with SMTP id w9so6405770pgm.4 for ; Thu, 24 Aug 2017 09:43:55 -0700 (PDT) X-Received: by 10.84.130.76 with SMTP id 70mr7732219plc.138.1503593035541; Thu, 24 Aug 2017 09:43:55 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id r82sm9115127pfe.0.2017.08.24.09.43.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2017 09:43:54 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 20306A1C5; Thu, 24 Aug 2017 12:43:44 -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=ssNK9Y5q; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::232 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:18078 Archived-At: No, you need dev pandoc. +++ 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.