From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Use dvisvgm to preview latex fragments Date: Fri, 13 May 2016 11:01:29 +0200 Message-ID: <87lh3enxg6.fsf@gmx.us> References: <3f4ffa54.95fa.154a8dbadfb.Coremail.tumashu@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MaH-00027K-3r for emacs-orgmode@gnu.org; Mon, 16 May 2016 13:45:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MaE-0005nT-9a for emacs-orgmode@gnu.org; Mon, 16 May 2016 13:45:36 -0400 Received: from plane.gmane.org ([80.91.229.3]:36228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MaE-0005nC-1v for emacs-orgmode@gnu.org; Mon, 16 May 2016 13:45:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b18yg-0007Tp-3J for emacs-orgmode@gnu.org; Fri, 13 May 2016 11:01:46 +0200 Received: from ip-178-203-235-215.hsi10.unitymediagroup.de ([178.203.235.215]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2016 11:01:46 +0200 Received: from rasmus by ip-178-203-235-215.hsi10.unitymediagroup.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2016 11:01:46 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi tumashu, tumashu writes: > I find a new tool: dvisvgm (https://github.com/mgieseki/dvisvgm) > ,which we can use it to preview latex fregments, it can deal with > xetex's xdv file as well (it will available in texlive2016). That looks very cool. Thanks for the pointer! Will you be working on a patch for supporting dvisvg? > The questions are: > 1. which path we should use: "dvi/xdv -> svg" or "dvi/xdv -> svg -> png" ? Depends on which format Emacs supports. If it’s compiled with svg support I’d guess it’s better since it’s vector graph and potentially could scale nicer when increasing font size. But I don’t know how easy it would be to incorporate inlined svg display. At the very minimum you will have to look at e.g. org-create-formula-image and "surrounding" functions, which will bark at "dvisvg" ATM. It might also be nice to make it possible to incorporate svg images for math in odt where formula support is a bit lackluster. > 2. if we use the first path, how to deal with > org-latex-preview-ltxpng-directory? should we rename it to > org-latex-preview-ltximg-directory or > org-latex-preview-ltxpic-directory ? If you provide a patch that enables svg support you can change the default value. Rasmus -- I hear there's rumors on the, uh, Internets. . .