emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Solved (was: Xemacs: org-preview-latex-fragment, png not readable.)


From: Uwe Brauer
Subject: [O] Solved (was: Xemacs: org-preview-latex-fragment, png not readable.)
Date: Sat, 28 Jan 2012 21:59:18 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) XEmacs/21.5-b29 (linux)

>> On Sat, 28 Jan 2012 21:20:48 +0100, Uwe Brauer <address@hidden> 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 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]