emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Cc: XEmacs Beta Discussion <xemacs-beta@xemacs.org>
Subject: Solved (was: Xemacs: org-preview-latex-fragment, png not readable.)
Date: Sat, 28 Jan 2012 21:59:18 +0100	[thread overview]
Message-ID: <87bopnmtll.fsf@mat.ucm.es> (raw)
In-Reply-To: 87sjizvasf.fsf@mat.ucm.es

>> On Sat, 28 Jan 2012 21:20:48 +0100, Uwe Brauer <oub@mat.ucm.es> 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	other threads:[~2012-01-28 20:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-28 20:20 Xemacs: org-preview-latex-fragment, png not readable Uwe Brauer
2012-01-28 20:59 ` Uwe Brauer [this message]
2012-01-28 22:33   ` Solved Bastien
2012-01-29  0:13     ` Solved Nick Dokos
2012-01-29 14:57       ` change call-process also for GNU emacs? (was: Solved) Uwe Brauer
2012-01-29 17:42         ` Nick Dokos
2012-01-31 18:09     ` patch " Uwe Brauer
2012-03-16 17:57       ` patch Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bopnmtll.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    --cc=xemacs-beta@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).