From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18077 Path: news.gmane.org!.POSTED!not-for-mail From: Uwe Brauer Newsgroups: gmane.text.pandoc Subject: Re: Date: Thu, 24 Aug 2017 16:26:01 +0000 Message-ID: <87378h53vq.fsf@mat.ucm.es> References: <87r2w5xaie.fsf@mat.ucm.es> <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> 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 1503591998 7140 195.159.176.226 (24 Aug 2017 16:26:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 16:26:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDS4Z3WZ2UDRBPH47PGAKGQEBMKD7VQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Aug 24 18:26:33 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-wr0-f188.google.com ([209.85.128.188]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkuxj-0001Y0-6K for gtp-pandoc-discuss@m.gmane.org; Thu, 24 Aug 2017 18:26:31 +0200 Original-Received: by mail-wr0-f188.google.com with SMTP id x13sf253253wre.1 for ; Thu, 24 Aug 2017 09:26:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1503591998; cv=pass; d=google.com; s=arc-20160816; b=jcH5/LtzbilWm1Z6D53fx1j4o+fyxG/5r9sRNRYqhqTWKFxyR/k8PkrIdFhzY/6BtE r+zkmfYGOw1JGUF0PNQhAAzCPXzr9w2p2M94DWF8WG7iHt6ULGh4El+A+elV6FSnO4es IccZStT8MTFLL21BtsB/nZezqu4oFlDGfUtBTWJ6fxCr8X+oXTT7hDoQ16mSPL6aItHy BNfXWV9skcDgVNcsIUE876BA+R0mbdUONA6GRRIIBzj8Mi411OlzePu0hQQFqJtuDvig 4G7/f6SYKy4gjlyojguc7F9evHfO8GgkFfmL6mDcMQOtwSOarZr16c5lB2PsVj2oCxI+ BG+Q== 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:cancel-lock:mail-copies-to :user-agent:mime-version:references:message-id:lines:date:subject :from:to:mail-followup-to:arc-authentication-results :arc-message-signature:sender:dkim-signature :arc-authentication-results; bh=sgQv096tLY8DYg5lMIidP27bpX5amslMfTrKIsYKt1k=; b=RaGD4pTrJqUjf0rulOYICSTipPLazPB4TPqox6jUkMXUirQL6aUps3OI+kUQZd/Rd0 EBvk7fz4PrMra5P0FmdESazo0YYRtoD4FHxfB2PAKTPAypca9EM3BIaKo5edADulZmGY OCaKS3iwV0vW2CE7zMdjDIZf925MZxJM9mpsddnL8ynoaY5q5oq4M4wx5DmudG5p4paP 0vn0iNpVbCcn4XGONa3l3iO9q2cyscsRv74jsNM2VU7QT6R5vOi7/R72Bzp11+gjKkoF NP3bcZe3nNLCR8TB5N7vWuk26JeuFgk80UBB8a+2zVnKvHU0V0 ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) smtp.mailfrom=gtp-pandoc-discuss@m.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mat.ucm.es DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mail-followup-to:to:from:subject:date:lines:message-id :references:mime-version:user-agent:mail-copies-to:cancel-lock :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=sgQv096tLY8DYg5lMIidP27bpX5amslMfTrKIsYKt1k=; b=DB6vFnbP/jQ/CdxRCdnt96KdCsU1KrggBYPny5dbL/43WAZx3w5hwMPdpD12bjLzed 5Oizla0L/Dm5USeOUk/kTQSX4oSVeVym7+qXrFCVx1RKR6NUh9Z23W/iOXywjQ433HlP BsPuapeVTWKz7FdqbcXmjjfT00/3JNgvSRpllQsueyQnWIkfya1fUpa8kGPHVz8C6RTs 1POGVQ0oKK36zXeO8feug6glXIz2fQ3HvX3I3SfbI0YSPEs/OsosR3S4rrNDz3FhaT3z 7sF2NoY/kzMRMNO/NXwizzR2fWxvQ/Pf9VK+7mpNtYifd3HxDRvYLULU0f7Y4jY10xO8 0psQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mail-followup-to:to:from:subject:date :lines:message-id:references:mime-version:user-agent:mail-copies-to :cancel-lock: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=sgQv096tLY8DYg5lMIidP27bpX5amslMfTrKIsYKt1k=; b=FBpik6KuF663SwSXXvf5H7uhAc8Yuk7o/ipDXE9IFtacZDbIDV7Jzzv83BA3AA6pN4 QU4GRqMtTN+6C1oKbQG0/24edHcnbK1pGcgLNYxS1wA5KklibKRkdV7UM+4ddiHaQ1Uq M0PDSqV2Ze9Ax+r/dK9Hg47sf6zjmK7zx2ctW/ja9f5n1xZP7qKcgpa2DIBwB0CQ9vJ4 5AXT3rwDe88GF9pYDDW2AZ1LS6NfIb8mTwTkVUVqPDqVJZbCvh4KuGN1g8yNpmUXLBOL E0nD/nm3uD38usDyFjwuFj36higkvK6MyFRaKw0VxIWrU+xHlL1 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHYfb5itfAEsHqp2SiSHcnNGe3KdYVxyv/eUzVueeqPVUHpEMwX31v6A yVA0zyyLcCNNcA== X-Received: by 10.46.4.214 with SMTP id a83mr4589ljf.26.1503591998269; Thu, 24 Aug 2017 09:26:38 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.46.1.224 with SMTP id f93ls745751lji.53.gmail; Thu, 24 Aug 2017 09:26:35 -0700 (PDT) X-Received: by 10.46.4.5 with SMTP id 5mr168059lje.1.1503591995259; Thu, 24 Aug 2017 09:26:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503591995; cv=none; d=google.com; s=arc-20160816; b=UiGzraxfDL2ZM9OOAJFnlz6jc8paQmVDYi2sOuBcjPRDBdy359DbDYWZhC8ZgQhRSB IiB07w/6t+7SWfLNnI8efZLkl8daF3jEiA2yKzkIZpduWtK/RwZSKUqoKOETQiZXSxoM jtvYGnjhxh+zhU1XepAXGrE/dhyaIUxP58x7obeySJVAcazA6bOQLYNRewSmwT2kgTa/ Aqv9mNYnk+82jwhKWSndLONHpjaEQ5eCgnGCTbsz9MeO4KFCjHdp7xhhaP9w1xOBCIsL Zc0MOMqKOUZXlXUNJ/Roz7owO05djZ1HvMGDQJYYqPCdXOMQjwv0ebcHaCv/hakqesU3 faUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cancel-lock:mail-copies-to:user-agent:mime-version:references :message-id:lines:date:subject:from:to:mail-followup-to :arc-authentication-results; bh=rMWtngnrbXBWZMLD5OtrtKD1+bJiZYm37C0uvOsj78M=; b=Qu4uSZ2PVcnabmmCd8IsOXtq7Nl90s+JJr+fIRuvV7t7h2Hljd6rZ8sERTbGDc7PyM R/p0jKhZlhtRL3pLFQASwA7rf7XkEFTFffy5F0/dbisX8MQ4/2i5Ks8JvqLWDZz3q+Du 16NR2AyEpuwE+9bBqjjwYFW88VyhfDI9ltjU/oZswV1d+blSEppOOcRJREn1ObF/b+rj Xm4mgvYa3TtvGukCdcahyRnYG8wg4o7jgU1/bFPFon7OY/I54il8pZ/KoOd0mn5NZoSw HYXD6yCRUXlvL6pxyGqReAAK+TFOycLgF5JCD6hIIUCy0pzYLRePb5rXTjuFWhVouIlV 07tA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) smtp.mailfrom=gtp-pandoc-discuss@m.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mat.ucm.es Original-Received: from blaine.gmane.org ([195.159.176.226]) by gmr-mx.google.com with ESMTPS id b125si374140wmc.1.2017.08.24.09.26.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 09:26:35 -0700 (PDT) Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) client-ip=195.159.176.226; Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dkuxQ-0000lR-Mi for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Thu, 24 Aug 2017 18:26:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Lines: 57 Original-X-Complaints-To: usenet-VEh2mgPqUsheXY1tMh2IBg@public.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:6LiNi7cN9+zhFZiDBe0hWC0ftU4= X-Original-Sender: gtp-pandoc-discuss@m.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) smtp.mailfrom=gtp-pandoc-discuss@m.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mat.ucm.es 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:18077 Archived-At: >>> "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