From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: Xemacs: org-preview-latex-fragment, png not readable. Date: Sat, 28 Jan 2012 21:20:48 +0100 Message-ID: <87sjizvasf.fsf@mat.ucm.es> Reply-To: Uwe Brauer Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrElj-0000LZ-3v for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 15:21:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrElh-0003bH-VA for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 15:21:03 -0500 Received: from plane.gmane.org ([80.91.229.3]:48623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrElh-0003b8-KQ for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 15:21:01 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RrElg-00089g-0l for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 21:21:00 +0100 Received: from 11.pool85-54-11.dynamic.orange.es ([85.54.11.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Jan 2012 21:20:59 +0100 Received: from oub by 11.pool85-54-11.dynamic.orange.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Jan 2012 21:20:59 +0100 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 --=-=-= Content-Type: text/plain Hello I made some progress in getting the function to work in Xemacs. The main problem seemed to be the function org-dvipng-color which is called in org-create-formula-image. The original formulation was (defun org-dvipng-color (attr) "Return an rgb color specification for dvipng." (apply 'format "rgb %s %s %s" (mapcar 'org-normalize-color (color-values (face-attribute 'default attr nil))))) Which does not work for Xemacs. Thanks to Julian Bradfield, the solution seems to be: (defun org-dvipng-color (attr) "Return an rgb color specification for dvipng." (apply 'format "rgb %s %s %s" (mapcar 'org-normalize-color (color-rgb-components (face-property 'default (intern (substring (symbol-name attr) 1))))))) However the png which were generated where to small to be readable. I attach one at the end of the message. So I tried out in GNU Emacs 21.3 to comment out org-dvipng-color in org-create-formula-image. org-preview-latex-fragment then still works, so is not necessary for generating the pngs. So I tried to do the same in Xemacs but the formulas in the png files keep being too small. What could be the reason for this behavior? Uwe Brauer The following attachment should be an integral. Xemacs: --=-=-= Content-Type: image/png; charset=raw-text Content-Disposition: attachment; filename=test3_7801a85c58c7aabc4553724e826b458ba08dda90.png Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFAgMAAAAS3dUPAAAADFBMVEXR0dEAAAB1dXWSkpIZ L0gUAAAAD0lEQVQIHWNQYADBAwwHAAWqAeEpCE6zAAAAAElFTkSuQmCC --=-=-= Content-Type: text/plain Gnu Emacs --=-=-= Content-Type: image/png; charset=raw-text Content-Disposition: attachment; filename=test_7ceb32811fbcd1322f595ca60dcc47456c20b5fe.png Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAABAAAAAmBAMAAAA//gbiAAAAMFBMVEX///8AAADu7u5UVFSI iIiqqqpERETMzMwiIiIQEBC6urpmZmaYmJjc3NwyMjJ2dnYyaI/LAAAAl0lEQVQYGWNgAANl VwjNkG4BYbBPqIIwuA2gMpwHoIyLF6CMg1CawQ7GmA1l8MpAGTziUAa3AJTB0QBlKMIMXvgB KvIxAMpIvABlTITSTHJQBqs8lMEvCmWwyUIZnBOgDMYEKKPQAco4uADK2AilGfJgDJiLmWDm cQlBpfgfQBlsMPcxFkBFVkBojgM2UMYqAwiDKRRCAwBUlhbrG2C5VwAAAABJRU5ErkJggg== --=-=-=--