From mboxrd@z Thu Jan 1 00:00:00 1970 From: feng shu Subject: [PATCH] [need test]Restruct `org-create-formula-image' function Date: Sat, 20 Jul 2013 17:32:02 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=e89a8f647859a41a4e04e1ee1d20 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0TWG-0004dU-Ts for emacs-orgmode@gnu.org; Sat, 20 Jul 2013 05:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0TWG-0000oL-6D for emacs-orgmode@gnu.org; Sat, 20 Jul 2013 05:32:04 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:36629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0TWF-0000oC-St for emacs-orgmode@gnu.org; Sat, 20 Jul 2013 05:32:04 -0400 Received: by mail-wi0-f172.google.com with SMTP id c10so456688wiw.5 for ; Sat, 20 Jul 2013 02:32:02 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" --e89a8f647859a41a4e04e1ee1d20 Content-Type: multipart/alternative; boundary=e89a8f647859a41a4904e1ee1d1e --e89a8f647859a41a4904e1ee1d1e Content-Type: text/plain; charset=UTF-8 `org-create-formula-image-with-dvipng' and `org-create-formula-image-with-imagemagick' share a good deal of logic, so combine them to a function. --e89a8f647859a41a4904e1ee1d1e Content-Type: text/html; charset=UTF-8
`org-create-formula-image-with-dvipng' and
`org-create-formula-image-with-imagemagick'
share a good deal of logic, so combine them to a function.
--e89a8f647859a41a4904e1ee1d1e-- --e89a8f647859a41a4e04e1ee1d20 Content-Type: application/octet-stream; name="0001-Restruct-org-create-formula-image-function.patch" Content-Disposition: attachment; filename="0001-Restruct-org-create-formula-image-function.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hjcmaamy0 RnJvbSA4Yzk4MGRhNjJiOGYyNDM4ZGUzZjMxMzZjYjkwOTZlNDE5ZjgxZmJiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGZW5nIFNodSA8dHVtYXNodUBnbWFpbC5jb20+CkRhdGU6IFdl ZCwgMTcgSnVsIDIwMTMgMDg6MTY6NDUgKzA4MDAKU3ViamVjdDogW1BBVENIXSBSZXN0cnVjdCBg b3JnLWNyZWF0ZS1mb3JtdWxhLWltYWdlJyBmdW5jdGlvbgoKKiBvcmcuZWwgKG9yZy1jcmVhdGUt Zm9ybXVsYS1pbWFnZS1wcm9jZXNzZXMpOiBOZXcgdmFyaWFibGUsCmRlZmluZSBgZHZpcG5nJyBh bmQgYGltYWdlbWFnaWNrJyBwcm9jZXNzZXMuCihvcmctY3JlYXRlLWZvcm11bGEtaW1hZ2UpOiBD b21iaW5lCmBvcmctY3JlYXRlLWZvcm11bGEtaW1hZ2Utd2l0aC1kdmlwbmcnIGFuZApgb3JnLWNy ZWF0ZS1mb3JtdWxhLWltYWdlLXdpdGgtaW1hZ2VtYWdpY2snLgoob3JnLWNyZWF0ZS1mb3JtdWxh LWltYWdlLXdpdGgtZHZpcG5nKTogUmVtb3ZlZC4KKG9yZy1jcmVhdGUtZm9ybXVsYS1pbWFnZS13 aXRoLWltYWdlbWFnaWNrKTogUmVtb3ZlZC4KCmBvcmctY3JlYXRlLWZvcm11bGEtaW1hZ2Utd2l0 aC1kdmlwbmcnIGFuZAogYG9yZy1jcmVhdGUtZm9ybXVsYS1pbWFnZS13aXRoLWltYWdlbWFnaWNr JwpzaGFyZSBhIGdvb2QgZGVhbCBvZiBsb2dpYywgc28gY29tYmluZSB0aGVtIHRvIGEgZnVuY3Rp b24uCi0tLQogbGlzcC9vcmcuZWwg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