From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel J. Sinder" Subject: Resolution of LaTeX fragments Date: Fri, 01 Sep 2006 14:50:38 -0700 Message-ID: <44F8AB2E.60606@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070808010002040302010001" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GJGuT-0004qW-8c for emacs-orgmode@gnu.org; Fri, 01 Sep 2006 17:50:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GJGuO-0004q5-QA for emacs-orgmode@gnu.org; Fri, 01 Sep 2006 17:50:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GJGuO-0004q1-Ga for emacs-orgmode@gnu.org; Fri, 01 Sep 2006 17:50:40 -0400 Received: from [208.97.132.176] (helo=randymail-a5.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GJH4J-0004gl-TD for emacs-orgmode@gnu.org; Fri, 01 Sep 2006 18:00:56 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------070808010002040302010001 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've encountered a problem with LaTeX fragments: the default resolution that dvipng produces results in text (in the images) which is too small. Of course, browsers (eg, firefox) can manipulate font size from the client side, but that doesn't affect images (and changing the relative size of the two). Monitor resolution is also a factor. Uugh. I guess mixing text with images containing text is not really ideal, but I'll put that aside for now. I don't have a great solution for this, but I needed something to make it usable. I've added a little hack that creates a variable, org-export-LaTeX-fragments-resolution, that is used in the call to dvipng. I've found that a setting of 150 is much easier on my eyes than the default (which I've estimated to be ~86). I added something to org-export-plist-vars for publishing too, but that doesn't seem to work -- not sure why (I'm new to Elisp). The patch is attached in case anyone else was looking for a fix for this. Dan --------------070808010002040302010001 Content-Type: text/plain; name="org-dvipng-resolution.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="org-dvipng-resolution.patch" --- org-orig.el 2006-09-01 14:36:16.000000000 -0700 +++ org.el 2006-09-01 13:38:30.000000000 -0700 @@ -1985,6 +1985,12 @@ :group 'org-latex :type 'boolean) +(defcustom org-export-LaTeX-fragments-resolution 86 + "Output resolution of images created by conversion of LaTeX fragments when exporting to HTML." + :group 'org-export-translation + :group 'org-latex + :type 'integer) + (defcustom org-export-with-fixed-width t "Non-nil means, lines starting with \":\" will be in fixed width font. This can be used to have pre-formatted text, fragments of code etc. For @@ -13110,6 +13116,7 @@ (:sub-superscript . org-export-with-sub-superscripts) (:TeX-macros . org-export-with-TeX-macros) (:LaTeX-fragments . org-export-with-LaTeX-fragments) + (:LaTeX-resolution . org-export-LaTeX-fragments-resolution) (:fixed-width . org-export-with-fixed-width) (:timestamps . org-export-with-timestamps) (:tables . org-export-with-tables) @@ -15532,6 +15539,7 @@ (call-process "dvipng" nil nil nil "-E" "-fg" fg "-bg" bg "-x" scale "-y" scale "-T" "tight" + "-D" (number-to-string org-export-LaTeX-fragments-resolution) "-o" pngfile dvifile) (if (not (file-exists-p pngfile)) --------------070808010002040302010001 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --------------070808010002040302010001--