From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: Solved (was: Xemacs: org-preview-latex-fragment, png not readable.) Date: Sat, 28 Jan 2012 21:59:18 +0100 Message-ID: <87bopnmtll.fsf@mat.ucm.es> References: <87sjizvasf.fsf@mat.ucm.es> Reply-To: Uwe Brauer Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrFN1-0004s4-7z for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 15:59:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrFMz-0000Tx-Pe for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 15:59:35 -0500 Received: from plane.gmane.org ([80.91.229.3]:60469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrFMz-0000Tt-JF for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 15:59:33 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RrFMx-0003No-FY for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 21:59:31 +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:59:31 +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:59:31 +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 Cc: XEmacs Beta Discussion >> On Sat, 28 Jan 2012 21:20:48 +0100, Uwe Brauer wrote: > 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. The issue are the options in call-process "dvipng" nil nil nil After trying out different configurations, I found out that the option "-D" dpi Does not work well with Xemacs. So (call-process "dvipng" nil nil nil "-fg" fg "-bg" bg ;; "-D" dpi ;; "-x" scale "-y" scale "-T" "tight" "-o" pngfile dvifile) is ok, however the back and foreground setting as generated by org-dvipng-color, even with Julian Bradfield's patch do not produce very nice results. In my Xemacs setting it is better to comment them out. So there are two small changes necessary to make org-preview-latex-fragment work in Xemacs. One is the above change, the other (font-height (face-font 'default)) instead of (font-height (get-face-font 'default)) I can send a patch against 7.8.03 Uwe Brauer