emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vincent Liard <vincent.liard@free.fr>
To: emacs-orgmode@gnu.org
Subject: Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)]
Date: Wed, 10 Jul 2013 11:32:18 +0200 (CEST)	[thread overview]
Message-ID: <1253320475.280456473.1373448738929.JavaMail.root@zimbra33-e6.priv.proxad.net> (raw)
In-Reply-To: <891706373.280442859.1373448479412.JavaMail.root@zimbra33-e6.priv.proxad.net>

When I export an org document with formulas to an ODT document (with
#+OPTIONS: tex:dvipng), the formulas look big and blurry.

In ox-odt.el, I found out that org-odt-pixels-per-inch (which is used to
set image sizes in ODT exports) takes its value from
display-pixels-per-inch (which is emacs-related if I get it right).

On my computer, org-odt-pixels-per-inch was set to 72 while
libreoffice considers images to be 96 dpi. A simple workaround is to
(setq org-odt-pixels-per-inch 96)

But I don't know if 96 is the correct value for everyone and should be
hardcoded or if the value should be taken from some configuration
file. Anyway, rude patch:
--- ox-odt.el	2013-07-10 08:56:08.000000000 +0000
+++ ox-odt.el	2013-07-10 08:56:28.000000000 +0000
@@ -768,7 +768,7 @@
   :type '(alist :key-type (string :tag "Type")
 		:value-type (regexp :tag "Path")))
 
-(defcustom org-odt-pixels-per-inch display-pixels-per-inch
+(defcustom org-odt-pixels-per-inch 96.00
   "Scaling factor for converting images pixels to inches.
 Use this for sizing of embedded images.  See Info node `(org)
 Images in ODT export' for more information."

Thank you for org-mode which is great,

Vincent

Emacs  : GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on komainu, modified by Debian
Package: Org-mode version 8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)

current state:
==============
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-export-with-drawers '(not "LOGBOOK")
 org-export-copy-to-kill-ring 'if-interactive
 org-export-date-timestamp-format nil
 org-export-with-tags t
 org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe
		      org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
		  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
		  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-export-preprocess-hook '(org-lparse-strip-experimental-blocks-maybe-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-latex-to-mathml-jar-file "/home/vincent/mathtoweb.jar"
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-odt-pixels-per-inch 96.0
 org-export-preprocess-after-blockquote-hook '(org-export-odt-preprocess-latex-fragments org-lparse-preprocess-after-blockquote-hook)
 org-export-backends '(odt ascii html icalendar latex)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
		   [org-add-hook change-major-mode-hook org-show-block-all append
		    local]
		   5]
		 #[nil "\300\301\302\303\304$\207"
		   [org-add-hook change-major-mode-hook org-babel-show-result-all
		    append local]
		   5]
		 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-latex-to-mathml-convert-command "java -jar %j -unicode -force -df %o %I"
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
		     org-src-mode-configure-edit-buffer)
 org-file-apps '(("\\.odc\\'" . system) ("\\.odf\\'" . system) ("\\.odi\\'" . system)
		 ("\\.otp\\'" . system) ("\\.odp\\'" . system) ("\\.otg\\'" . system)
		 ("\\.odg\\'" . system) ("\\.ots\\'" . system) ("\\.ods\\'" . system)
		 ("\\.odm\\'" . system) ("\\.ott\\'" . system) ("\\.odt\\'" . system)
		 (auto-mode . emacs) ("\\.mm\\'" . default)
		 ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )

       reply	other threads:[~2013-07-10  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <891706373.280442859.1373448479412.JavaMail.root@zimbra33-e6.priv.proxad.net>
2013-07-10  9:32 ` Vincent Liard [this message]
2013-07-10 10:13   ` Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)] 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=1253320475.280456473.1373448738929.JavaMail.root@zimbra33-e6.priv.proxad.net \
    --to=vincent.liard@free.fr \
    --cc=emacs-orgmode@gnu.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).