From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11748 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Maths in ebooks Date: Thu, 15 Jan 2015 12:30:01 -0800 Message-ID: <20150115203001.GA10846@protagoras.berkeley.edu> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed X-Trace: ger.gmane.org 1421353817 6573 80.91.229.3 (15 Jan 2015 20:30:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2015 20:30:17 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBV6G4CSQKGQE5JKTEMI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 15 21:30:17 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pa0-f55.google.com ([209.85.220.55]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBr3Y-00014Q-L2 for gtp-pandoc-discuss@m.gmane.org; Thu, 15 Jan 2015 21:30:16 +0100 Original-Received: by mail-pa0-f55.google.com with SMTP id lf10sf2280931pab.0 for ; Thu, 15 Jan 2015 12:30:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:date:to:subject:message-id:references:mime-version :content-type: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 :sender:list-subscribe:list-unsubscribe; bh=45LZNjbxrliLBpYQJ4XS8/UkgAjud8a/XgMibWY6RGU=; b=wwHjV4Iv04SakytlH0zzZRzfH7U4xwJQY3nZL5QGLZ4XfqGMarTUvCwYv4iiwyXMwc W6K29V/Q0uYqfijaSDHwh3/mKgvpWevyhBlVMT7gZs3Hz1bwON2hJsn7U6GeuhT1TUGF hCuOwW44GSnD4xTsb5eb1E86Zuf12Cwj67mRDVaY0iSBKEVhL+eUaLxoL9hiXgn/hpmM OLLBFBB78yvDg/wGh1C0AWk1UqRboF8Qa3nwyQmmWV4/I7wyWUAEVEVU6F8pwALWCeKa EIPv/jte6p4S6lBe80aOF2O85kxh+0YyUo6Fu+EzHuiPYUe05wnpm296jmozftg5ldHz kJFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:references :mime-version:content-type: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:sender:list-subscribe:list-unsubscribe; bh=45LZNjbxrliLBpYQJ4XS8/UkgAjud8a/XgMibWY6RGU=; b=PTAoeRU94dpcyKbl9IWoY+YfnMfIngt9xphpVUCfduIV+zMR6FWTId3/jg3Y5JvDFr VcNHvlxhvXdqMDipZabU75ZDJEeK0T00FOqvKHHyXFxT/j+e2rdbyYd5nJddTz5rarZf EqBne4MWdee1Hz+wXFTnhFTB0i4X9QiNRA9/MhHTlLIp9zsUQFgpW+DjHLjaYZDRifIe 1R+AyznDuzuXRg9wSOPr/kjJTt6FCJMxohZjywaBonGQKtXdbT39GTU2pUmqzMM6/IaB o1m2+HSx9JrJNFdIgQZ1G0VTA6qTQwpS7GmKdxOScVZwd52oXku8B9dbbRrqLoZSWeML bR X-Received: by 10.140.108.9 with SMTP id i9mr241977qgf.1.1421353815768; Thu, 15 Jan 2015 12:30:15 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.140.34.107 with SMTP id k98ls1131309qgk.58.gmail; Thu, 15 Jan 2015 12:30:15 -0800 (PST) X-Received: by 10.236.220.68 with SMTP id n64mr2490159yhp.56.1421353815306; Thu, 15 Jan 2015 12:30:15 -0800 (PST) Original-Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com. [209.85.220.46]) by gmr-mx.google.com with ESMTPS id ki8si289423pdb.1.2015.01.15.12.30.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Jan 2015 12:30:15 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.220.46 as permitted sender) client-ip=209.85.220.46; Original-Received: by mail-pa0-f46.google.com with SMTP id lf10so19610459pab.5 for ; Thu, 15 Jan 2015 12:30:15 -0800 (PST) X-Gm-Message-State: ALoCoQkYrhItfZjVPGoC66FNIC/BvFpfrGd2zzwrpq7lpAfsGb4ucvymxnmvGojqAxyMRf1alWXY X-Received: by 10.68.132.42 with SMTP id or10mr17201032pbb.162.1421353815088; Thu, 15 Jan 2015 12:30:15 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by mx.google.com with ESMTPSA id ig1sm2202179pbc.41.2015.01.15.12.30.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 12:30:13 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 9E4BCA2C5; Thu, 15 Jan 2015 15:30:01 -0500 (EST) Content-Disposition: inline In-Reply-To: X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.23 (2014-03-12) X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.220.46 as permitted sender) smtp.mail=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:11748 Archived-At: 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