emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* exporting LaTeX to ODT with custom symbols
@ 2017-06-03 22:50 edgar
  2017-06-04  9:36 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: edgar @ 2017-06-03 22:50 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

Hello hackers,

I'm having some issues when exporting to ODT, and I would like to know 
if someone can help me. I tried my best to describe the problem in the 
the attached tmp.org. I also attach a symbols.tex which has my custom 
symbols.

Thank you for any help.


Edgar


-------------------------------------------------

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  

[-- Attachment #2: tmp.org --]
[-- Type: text/plain, Size: 2520 bytes --]

* Issue 1: custom symbols not exported
I am trying to export this to ODT without much
success (it exports well to PDF through LaTeX, and
the previews are fine).

This equation is exported correctly:
\[ a = 2 \]

This too.
\[ a = \frac{1}{2} \]

But this isn't.
\[ a = \deriv{x}{X} \]

The definition of deriv{}{} is in
the [[./symbols.tex][attached file]], and the preview seems to work
too (scale and symbol)

* Issue 2: when exported, resolution is unchanged
  I have tried to change the resolution of the
  exported image, but dvipng seems to disregard
  it.

* Configuration                                    :noexport:
  I have this configuration (I just open the
  file). It asks me if I want to apply the "usafe"
  scale variable.
** Emacs configuration
   #+BEGIN_SRC emacs-lisp :results none
     (require 'package)
     (package-initialize)
     (use-package "org")
     (setq org-export-backends '(latex odt))
     (org-babel-do-load-languages 
	'org-babel-load-languages  
	'((shell . t)
	  (emacs-lisp . t)))
   #+END_SRC
*** My system version
    #+BEGIN_SRC emacs-lisp
      (org-version)
    #+END_SRC

    #+RESULTS:
    : 9.0.7

    #+BEGIN_SRC emacs-lisp
      (emacs-version)
    #+END_SRC

    #+RESULTS:
    : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
    :  of 2015-01-11 on maritornes, modified by Debian

** Cleaning
   Before I do C-c C-e o o, I run this:
   #+BEGIN_SRC shell :results none
     rm -fr ltx{png,img}
   #+END_SRC

** General options
   - Load symbols
     #+LaTeX_HEADER: \input{./symbols.tex}

   - No table of contents
     #+OPTIONS: toc:nil
** Change the resolution of the exported equations (and previews)
   - Export (and preview) the equations as pictures
     The equation looks terrible with
     #+OPTIONS: tex:imagemagick

     There is a decent picture with dvipng, but I
     cannot improve it (uncomment if necessary)
     # #+OPTIONS: tex:dvipng

   - Improve the quality of the pictures (does not work)
     I just want to export; previewing with a
     different scale is an undesired side-effect
     # https://stackoverflow.com/a/20033865
     # Local Variables:
     # org-format-latex-options: (plist-put org-format-latex-options :scale 10 :foreground default :background default)
     # End:

    - This does not work either for the export (it
      does for preview):
     # org-format-latex-options: (:scale 10 :foreground default :background default)

    - I have also tried with
      M-x customize-variable org-format-latex-options

[-- Attachment #3: symbols.tex --]
[-- Type: text/plain, Size: 414 bytes --]

% ***** Custom symbols **************
% ***********************************
% Change del operator to d (for maxima)
% http://tex.stackexchange.com/questions/178946/better-automatic-spacing-of-differential-d
\renewcommand{\d}[1]{\mathop{\mathrm{d}{#1}}\!{}}
\newcommand{\del}[1]{\d{\left(#1\right)}}
\newcommand{\diff}[2]{
  \frac{\d{}}{\d{#2}}
  \left(#1\right)}
\newcommand{\deriv}[2]{
  \frac{\del{#1}}{\d{#2}}}

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

end of thread, other threads:[~2017-06-25  0:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-03 22:50 exporting LaTeX to ODT with custom symbols edgar
2017-06-04  9:36 ` Nicolas Goaziou
     [not found]   ` <f1e1b76e4f792631b897487b20738e67@openmail.cc>
2017-06-06 23:40     ` edgar
2017-06-25  0:36     ` edgar

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