From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11751 Path: news.gmane.org!not-for-mail From: Thomas Arildsen Newsgroups: gmane.text.pandoc Subject: Re: Maths in ebooks Date: Thu, 15 Jan 2015 22:24:16 +0100 Message-ID: References: <20150115203001.GA10846@protagoras.berkeley.edu> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0158c78a8642d9050cb77a3a X-Trace: ger.gmane.org 1421357059 27521 80.91.229.3 (15 Jan 2015 21:24:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2015 21:24:19 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDXLTNWTUUDBBAXA4CSQKGQEDIZXAVA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 15 22:24:18 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-lb0-f188.google.com ([209.85.217.188]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBrtq-0001tt-LA for gtp-pandoc-discuss@m.gmane.org; Thu, 15 Jan 2015 22:24:18 +0100 Original-Received: by mail-lb0-f188.google.com with SMTP id z11sf1410079lbi.5 for ; Thu, 15 Jan 2015 13:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type: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=OQe3LNhtveIboOf4qEla0GQr2kFukc6MWppLGbOWlEE=; b=C+6Plq3sVYznnKUqepDDtR6CWcGPV3G2fxM8tr4UYxhZP2cAsDP9HrLmSKbHY6/P5Q HaZYidG91oYDg2g+74MoY/sKbw9Ntn43tRdvNhX6J7IadJOdsNmBVScv1bPamO4aN7sT //nbqDN/OwixQGp7TLoeIASGBFg4BYlTEiVYcayJtPjUKp/M4zZYS76/ymjXIaLkERpp CXg8z6Xyxjroh1K/W0fPRtHobjNM404Yr4m6ahvksgshu9gBQcGUAxnrAysBZAZ+O3mR UQigHVNzVhqyRwq+QDsxs5LOIYyqmy998KCNugPI5XheXzh50BpbxECorgH4yLIhcmCI mnkQ== X-Received: by 10.180.91.13 with SMTP id ca13mr279159wib.19.1421357058384; Thu, 15 Jan 2015 13:24:18 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.181.13.111 with SMTP id ex15ls203179wid.1.gmail; Thu, 15 Jan 2015 13:24:17 -0800 (PST) X-Received: by 10.180.228.38 with SMTP id sf6mr4598844wic.5.1421357057916; Thu, 15 Jan 2015 13:24:17 -0800 (PST) Original-Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com. [2a00:1450:4010:c03::22b]) by gmr-mx.google.com with ESMTPS id m9si139427lbp.0.2015.01.15.13.24.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Jan 2015 13:24:17 -0800 (PST) Received-SPF: pass (google.com: domain of thomasarildsen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c03::22b as permitted sender) client-ip=2a00:1450:4010:c03::22b; Original-Received: by mail-la0-f43.google.com with SMTP id q1so511962lam.2 for ; Thu, 15 Jan 2015 13:24:17 -0800 (PST) X-Received: by 10.152.29.6 with SMTP id f6mr12360429lah.32.1421357057719; Thu, 15 Jan 2015 13:24:17 -0800 (PST) Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.112.176.227 with HTTP; Thu, 15 Jan 2015 13:24:16 -0800 (PST) Original-Received: by 10.112.176.227 with HTTP; Thu, 15 Jan 2015 13:24:16 -0800 (PST) In-Reply-To: <20150115203001.GA10846-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org> X-Original-Sender: thomasarildsen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of thomasarildsen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c03::22b as permitted sender) smtp.mail=thomasarildsen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dkim=pass header.i=@gmail.com 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:11751 Archived-At: --089e0158c78a8642d9050cb77a3a Content-Type: text/plain; charset=UTF-8 I should be able to take a stab at this in Python. I will get back to you when I get time to try this. Thanks! Den 15/01/2015 21.30 skrev "John MacFarlane" : > Seems to me it would not be hard to write a pandoc filter > that did this. There's an example filter in the > pandocfilters repository that converts tikz images in > LaTeX to images. Something like that could work here too, > only you'd match on 'Math' rather than 'RawBlock'. > > https://github.com/jgm/pandocfilters/blob/master/examples/tikz.py > > Filters can be written in Haskell or python (there are also > libraries to facilitate writing them in php and perl). > > > +++ Thomas Arildsen [Jan 15 15 00:59 ]: > >> I have been experimenting with including maths in ebooks (ultimately >> because I would like to be able to publish my research as ebooks >> instead of PDF which I think is suboptimal for tablets etc.) One >> approach that sort of works for me is converting from Markdown with >> LaTeX maths to ePub where I can make Pandoc turn the maths into MathML. >> My problem is just that the MathML looks quite horrible in comparison >> to what LaTeX can usually produce in PDF etc. >> A fall-back solution for me could be to render the maths bitmapped and >> then include the images in the document. However, I recently figured >> out that ePub seems to support SVG as well and it is actually possible >> to turn LaTeX into SVG output (see e.g. http://dvisvg.sourceforge.net/ >> and http://svgkit.sourceforge.net/SVGLaTeX.html). So far I have >> succeeded in doing this quite manually, but I was wondering if it would >> be possible to make Pandoc able to automate this conversion of math >> formulae into SVG with subsequent inclusion of the SVG into the ePub? I >> have no experience in hacking Pandoc. >> Best regards, >> Thomas Arildsen >> >> -- >> 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to >> [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> [3]https://groups.google.com/d/msgid/pandoc-discuss/dfcf2e4b-b377-4d48- >> be9f-de82088e7832%40googlegroups.com. >> For more options, visit [4]https://groups.google.com/d/optout. >> >> References >> >> 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >> 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >> 3. https://groups.google.com/d/msgid/pandoc-discuss/dfcf2e4b- >> b377-4d48-be9f-de82088e7832-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium= >> email&utm_source=footer >> 4. https://groups.google.com/d/optout >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/pandoc-discuss/C_UIh0gDpwU/unsubscribe. > To unsubscribe from this group and all its topics, 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/20150115203001.GA10846%40protagoras.berkeley.edu. > For more options, visit https://groups.google.com/d/optout. > -- 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/CAFQUsibyf8muK86Y5Ozj%2B9PfVBRgt-EAkjDAfU%3D4gy-wJ4e8mA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. --089e0158c78a8642d9050cb77a3a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I should be able to take a stab at this in Python. I will ge= t back to you when I get time to try this. Thanks!

Den 15/01/2015 21.30 skrev "John MacFarlane= " <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>:
Seems to me it would n= ot be hard to write a pandoc filter
that did this.=C2=A0 There's an example filter in the
pandocfilters repository that converts tikz images in
LaTeX to images.=C2=A0 Something like that could work here too,
only you'd match on 'Math' rather than 'RawBlock'.

https://github.com/jgm/pandocfilters/blob/maste= r/examples/tikz.py

Filters can be written in Haskell or python (there are also
libraries to facilitate writing them in php and perl).


+++ Thomas Arildsen [Jan 15 15 00:59 ]:
=C2=A0 I have been experimenting with including maths in ebooks (ultimately=
=C2=A0 because I would like to be able to publish my research as ebooks
=C2=A0 instead of PDF which I think is suboptimal for tablets etc.) One
=C2=A0 approach that sort of works for me is converting from Markdown with<= br> =C2=A0 LaTeX maths to ePub where I can make Pandoc turn the maths into Math= ML.
=C2=A0 My problem is just that the MathML looks quite horrible in compariso= n
=C2=A0 to what LaTeX can usually produce in PDF etc.
=C2=A0 A fall-back solution for me could be to render the maths bitmapped a= nd
=C2=A0 then include the images in the document. However, I recently figured=
=C2=A0 out that ePub seems to support SVG as well and it is actually possib= le
=C2=A0 to turn LaTeX into SVG output (see e.g. http://dvisvg.sourceforge.net/
=C2=A0 and http://svgkit.sourceforge.net/SVGLaTeX.html). So far= I have
=C2=A0 succeeded in doing this quite manually, but I was wondering if it wo= uld
=C2=A0 be possible to make Pandoc able to automate this conversion of math<= br> =C2=A0 formulae into SVG with subsequent inclusion of the SVG into the ePub= ? I
=C2=A0 have no experience in hacking Pandoc.
=C2=A0 Best regards,
=C2=A0 Thomas Arildsen

=C2=A0 --
=C2=A0 You received this message because you are subscribed to the Google =C2=A0 Groups "pandoc-discuss" group.
=C2=A0 To unsubscribe from this group and stop receiving emails from it, se= nd
=C2=A0 an email to [1]pandoc-discuss+unsubscribe@googlegroup= s.com.
=C2=A0 To post to this group, send email to
=C2=A0 [2]pandoc-discuss@googlegroups.com.
=C2=A0 To view this discussion on the web visit
=C2=A0 [3]https://groups.google.com/d/msgid/= pandoc-discuss/dfcf2e4b-b377-4d48-
=C2=A0 be9f-de82088e7832%40googlegroups.com.
=C2=A0 For more options, visit [4]https://groups.google.com/d/optout.

References

=C2=A0 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=
=C2=A0 2. mailto:pandoc-discuss@googlegroups.com
=C2=A0 3. https://groups.google.com/d/msgi= d/pandoc-discuss/dfcf2e4b-b377-4d48-be9f-de82088e7832@googleg= roups.com?utm_medium=3Demail&utm_source=3Dfooter
=C2=A0 4. = https://groups.google.com/d/optout

--
You received this message because you are subscribed to a topic in the Goog= le Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://g= roups.google.com/d/topic/pandoc-discuss/C_UIh0gDpwU/unsubscri= be.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pandoc-discuss@googlegroups.com.<= br> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/= 20150115203001.GA10846%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CAFQUsibyf8muK86Y5Ozj%2B9PfVBRgt-EAkj= DAfU%3D4gy-wJ4e8mA%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--089e0158c78a8642d9050cb77a3a--