emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)]
       [not found] <891706373.280442859.1373448479412.JavaMail.root@zimbra33-e6.priv.proxad.net>
@ 2013-07-10  9:32 ` Vincent Liard
  2013-07-10 10:13   ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Liard @ 2013-07-10  9:32 UTC (permalink / raw)
  To: emacs-orgmode

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
 )

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)]
  2013-07-10  9:32 ` Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)] Vincent Liard
@ 2013-07-10 10:13   ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2013-07-10 10:13 UTC (permalink / raw)
  To: Vincent Liard; +Cc: emacs-orgmode

Hi Vincent,

Vincent Liard <vincent.liard@free.fr> writes:

> 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.

You're right -- patch applied (with minor modifications), thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-10 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <891706373.280442859.1373448479412.JavaMail.root@zimbra33-e6.priv.proxad.net>
2013-07-10  9:32 ` Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)] Vincent Liard
2013-07-10 10:13   ` Bastien

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).