emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: edgar@openmail.cc
To: emacs-orgmode@gnu.org
Subject: exporting LaTeX to ODT with custom symbols
Date: Sat, 03 Jun 2017 22:50:09 +0000	[thread overview]
Message-ID: <49e390855285fb66260b0a5efe205e52@openmail.cc> (raw)

[-- 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}}}

             reply	other threads:[~2017-06-04  2:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-03 22:50 edgar [this message]
2017-06-04  9:36 ` exporting LaTeX to ODT with custom symbols Nicolas Goaziou
     [not found]   ` <f1e1b76e4f792631b897487b20738e67@openmail.cc>
2017-06-06 23:40     ` edgar
2017-06-25  0:36     ` edgar

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=49e390855285fb66260b0a5efe205e52@openmail.cc \
    --to=edgar@openmail.cc \
    --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).