From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18056 Path: news.gmane.org!.POSTED!not-for-mail From: Uwe Brauer Newsgroups: gmane.text.pandoc Subject: Re: latex to html or plain text without any latex construct Date: Tue, 22 Aug 2017 12:20:19 +0000 Message-ID: <871so3yet8.fsf@mat.ucm.es> References: <87r2w5xaie.fsf@mat.ucm.es> <20170821210000.GD9940@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 1503404448 32008 195.159.176.226 (22 Aug 2017 12:20:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 Aug 2017 12:20:48 +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+bncBDS4Z3WZ2UDRBGWD6DGAKGQEWAXADJY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 22 14:20:42 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 1dk8Af-0007mJ-1G for gtp-pandoc-discuss@m.gmane.org; Tue, 22 Aug 2017 14:20:37 +0200 Original-Received: by mail-lf0-f59.google.com with SMTP id f7sf8546200lfg.10 for ; Tue, 22 Aug 2017 05:20:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1503404444; cv=pass; d=google.com; s=arc-20160816; b=KWDP6aplprvLTXhpe8aIpzxDA1+J9u8FppILVscRhtIifTjNaAIf3rxgTuoWLkP4vY azLqIgGy+5S/3LV6z+dsEWKIvrfpIY9ekO6U/yJFqZyGPZZtKffqnn5HWNCU0tIaH25G SZGaZ1cZSGhUaFJ0QEPyg2zYgMsbrSmuAf0dVoPL4xYkgYPdt7fmbOBjDxLTi01Uh5qe 17jcehSO0KpaVZDd0PhWHD5B65k3lQ4KnXFxVzS752FNrA5sSNj6UfeyuHLuNgAUfwAi mlI9ikXmxCS5E3YyagFECENyo/9XtBRqpw/BHLoj6sHwuX0jtpz8NeHT8tAdz+toB3LR ek1w== 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=U3i/552gmR66wGX/HKAFB2Fzu07adyVRYrdY0Z1y+LM=; b=xzsl90XrmQxLwCexhtFkVQ1I3Grf6P52xp8HZQUP7DpxGxSn0WPsNONbJs7WiAysUU kwyaox6TERjurKzqIcjG6YfSmvH9/YYV+6uy/vyV3lxHJgLd3XeGKy1pLd/7rJ1BVieR 3Ix/kDDqNvkO6thFrmZGbcsr9e+RTZ7kNYI8Ca8kQFeeS6VyzlEai7A0n37gn4lch6Eb 9crkDdDLlhcEdc0w/LQHBpPvgD8e41+qn4ywKt+sC28p5Tpos5NMKRp6tEBdJ6qAky91 dGQ7D4aszfnHaFT5AxpcoIR7owkmvgkh68gyj0H53eGfsn8yfD 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=U3i/552gmR66wGX/HKAFB2Fzu07adyVRYrdY0Z1y+LM=; b=Rkr/OPJowctuP6st++lzxMCPevgd0bEbD6Gmj2cofXcEj+aDxn6FTbuCAJHhWbll7S EjkW7jD9/qlt1Tap2tci3wuruwH46LgD0q4jVLZfuRXNXot8QtLmPLwMCZpHNTteDkDc JhO7L33y5y6U87hGpfMp4k0jl+NB4jp5FbYQy2LhZWRCg8wiCkmm6gA9bN95R3gaIm67 nfB9wPR79BmzHf4VRL51P8EmJl6ri10+pT3N/pwrwfExhDyeCIIdab+jJ/54mbw5Fqxn IszgNJHumHXwcRtJtIGcbgGkmd7NhTHGo21yt56Z6LmtoajQLbzsZyGexV7waKQp43CW gpPg== 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=U3i/552gmR66wGX/HKAFB2Fzu07adyVRYrdY0Z1y+LM=; b=BSfTdCkBm/mTp50jVkrIK1L7bvh+78iFxc233QkPbZH/76A/dKRbw0qpDpwvxVtkTV vP20xBbWRBQq9dcJvb8kxyUWuVKNv5ql43G82YPGq8clld+xXaCn4UqK7XLLawYH2YlP gzmN9LA1qX4nQARsN00o4d6pjw+m5DLrFWVyie/6SGMk1qUA6iPLv912thzpvDZL361h wv4fIkxZgCgmdgqcokbM5rKMgClGzlbDck/+0LL0CnjIs5xYr4+f1cxzlhu9q7ed0Dfo /diXgoZ25KmFuCsWtzuFLTo2UI0JFjD9G9fA1LuDmTROpXIbNPX Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHYfb5g39TNts3m6puooJEs4MQLski0RXliTfNy3thn7xQV7TZMxyq18 KogFKCAJFgmZkA== X-Received: by 10.25.166.20 with SMTP id p20mr570lfe.9.1503404444089; Tue, 22 Aug 2017 05:20:44 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.25.84.93 with SMTP id i90ls749246lfb.41.gmail; Tue, 22 Aug 2017 05:20:42 -0700 (PDT) X-Received: by 10.46.77.197 with SMTP id c66mr58260ljd.11.1503404442732; Tue, 22 Aug 2017 05:20:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503404442; cv=none; d=google.com; s=arc-20160816; b=LTRUnn/iCixje6Nsxa9iC013+vfMrGSuBpYyneGmQhPcQB41DSkLwYgwzIpZAgrbMq DRO0KQ6DfXVzI9gjtPPHxEGQ4dBsPd+hpw1l7MTho40xmr5OTb2w1DG6GL6imKZXJBL9 9iLeBvomVAjU14QE3uYKQeHJyPzWL+NbNfZ67GeWIW9GL4MFaYeavKxz7zH4ZMaaBCLH WFIkkeBjocRWsdm8fbwVrL/MKJQrotULJ12ZY+nyKUiU89/IwBAbqnRwj0hsO42Hb2MH nRZjpxRHZOldCdIEJLU9E1QmZeDhq+vdNkJdtHNCwkHS4B0wuqlvsnkcnGGnyPBggv13 iCvw== 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=3FHhAXzPEOjRkkArjg+1RPOmX+NLVUokXByw5RldRr8=; b=KNaEpX+xnuKgQRRKD5IB/+5IugAQHDfHdSbNuScSqqDrdXwIcKbZHbLFEsT1x6qh+q uK/WEZXMZGS5TLLkj5Rz3rIy38kD8m47L/Oac8+NmZ5VVxEoXSKpbk3aUuQkvxJaOIHj mZk9W2zs1V7uFmFa+76rtAc2LK5JMMbpwgtm/cZpHZuilVTCRMjfNbcJfECdx2EvUnzB EbKgs+7/xiICZqEktstrYgQsHh6fNlOgreHxmXCpfhpGAXk/kQH+1MVprgkX5U1kMPKh E0BUD5jO5jUmSekK4feWydOF7gHF54YLJxjac2ws92KWrn1gGna3uuRl6FaTYJhJFfl8 WeuA== 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 81si3240601wmh.1.2017.08.22.05.20.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Aug 2017 05:20:42 -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 1dk8AS-0007Ca-Sb for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Tue, 22 Aug 2017 14:20:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Lines: 55 Original-X-Complaints-To: usenet-VEh2mgPqUsheXY1tMh2IBg@public.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:ygfwIzvB0ojwHrmxA1k6t+hIhh0= 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:18056 Archived-At: >>> "John" == John MACFARLANE writes: > With -t plain, pandoc will only emit tex math if it can't > "fake it with unicode." (Of course, that will be the case > with the complicated equation you mention.) > If you want this to be simply removed, you can combine > -t plain with a filter that removes all Math elements. Sorry, I just realized that I asked this some years ago and you proposed the following solution > -- stripmath.hs > -- compile: ghc --make stripmath.hs > -- run: pandoc input.txt -t json | ./stripmath | pandoc -f json -t plain where stripmath is import Text.Pandoc main = toJsonFilter stripmath where stripmath (Math _ _) = Str "FORMULA" stripmath x = x I just tried that out with the old compiled stripmath but I obtain /home/oub/scripts/stripmath: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory So I presume I have to recompile it again but this time I receive hc --make stripmath.hs [1 of 1] Compiling Main ( stripmath.hs, stripmath.o ) stripmath.hs:3:8: No instance for (ToJsonFilter (Inline -> Inline)) arising from a use of `toJsonFilter' Possible fix: add an instance declaration for (ToJsonFilter (Inline -> Inline)) In the expression: toJsonFilter stripmath In an equation for `main': main = toJsonFilter stripmath where stripmath (Math _ _) = Str "FORMULA" stripmath x = x I don't know enough haskell to deal with this. Any help is appreciated. Thanks Uwe Brauer