From: Uwe Brauer <oub-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: latex to html or plain text without any latex construct
Date: Tue, 22 Aug 2017 12:20:19 +0000 [thread overview]
Message-ID: <871so3yet8.fsf@mat.ucm.es> (raw)
In-Reply-To: <20170821210000.GD9940@protagoras.berkeley.edu>
>>> "John" == John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 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
next prev parent reply other threads:[~2017-08-22 12:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 14:26 Uwe Brauer
[not found] ` <87r2w5xaie.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2017-08-21 21:00 ` John MACFARLANE
2017-08-22 12:20 ` Uwe Brauer [this message]
[not found] ` <871so3yet8.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2017-08-22 17:50 ` John MACFARLANE
2017-08-22 20:16 ` Uwe Brauer
[not found] ` <878tibz7c2.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2017-08-23 0:09 ` John MacFarlane
2017-08-23 12:22 ` [SOLVED, almost] (was: latex to html or plain text without any latex construct) Uwe Brauer
[not found] ` <87k21uwk14.fsf_-_-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2017-08-23 14:15 ` John MacFarlane
2017-08-23 16:13 ` Uwe Brauer
[not found] ` <8760dew9da.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2017-08-23 20:54 ` Re: John MACFARLANE
2017-08-24 16:26 ` Re: Uwe Brauer
[not found] ` <87378h53vq.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2017-08-24 16:43 ` Re: John MACFARLANE
2017-08-24 17:30 ` Re: Uwe Brauer
[not found] ` <87y3q850vx.fsf-YB6e1s5WF/He5aOfsHch1g@public.gmane.org>
2017-08-24 17:56 ` Re: John MACFARLANE
2017-08-24 16:44 ` Re: John MACFARLANE
2017-08-24 17:32 ` Re: Uwe Brauer
2017-08-23 14:15 ` (was: latex to html or plain text without any latex construct) John MacFarlane
2017-08-23 16:13 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871so3yet8.fsf@mat.ucm.es \
--to=oub-yb6e1s5wf/he5aofshch1g@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).