* 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
* Re: exporting LaTeX to ODT with custom symbols
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>
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-06-04 9:36 UTC (permalink / raw)
To: edgar; +Cc: emacs-orgmode
Hello,
edgar@openmail.cc writes:
> 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.
You may want to try tweaking `org-preview-latex-process-alist'. There is
possibly room for improvement in the UI here.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: exporting LaTeX to ODT with custom symbols
[not found] ` <f1e1b76e4f792631b897487b20738e67@openmail.cc>
@ 2017-06-06 23:40 ` edgar
2017-06-25 0:36 ` edgar
1 sibling, 0 replies; 4+ messages in thread
From: edgar @ 2017-06-06 23:40 UTC (permalink / raw)
To: emacs-orgmode
On 2017-06-05 07:00, edgar@openmail.cc wrote:
> I managed to get the special symbols by
>
> 1. M-x customize-variable org-preview-latex-process-alist
> 2. Doing [Ins] into the dvipng (or imagemagick) section
> 3. typing :latex-header in the Key: field
> 4. typing "\\input{./symbols.tex}" in the Value: field
>
Not working for other symbols. Sorry...
-------------------------------------------------
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!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: exporting LaTeX to ODT with custom symbols
[not found] ` <f1e1b76e4f792631b897487b20738e67@openmail.cc>
2017-06-06 23:40 ` edgar
@ 2017-06-25 0:36 ` edgar
1 sibling, 0 replies; 4+ messages in thread
From: edgar @ 2017-06-25 0:36 UTC (permalink / raw)
To: emacs-orgmode
On 2017-06-05 07:00, edgar@openmail.cc wrote:
> On 2017-06-04 09:36, Nicolas Goaziou wrote:
>> You may want to try tweaking `org-preview-latex-process-alist'.
>
> Thanks. This helped!
>
> I leave this in case that it may be useful to others (one thing
> worked, the other didn't):
>
> I managed to get the special symbols by
>
> 1. M-x customize-variable org-preview-latex-process-alist
> 2. Doing [Ins] into the dvipng (or imagemagick) section
> 3. typing :latex-header in the Key: field
> 4. typing "\\input{./symbols.tex}" in the Value: field
>
> I can also change the resolution of the pictures, if I manually set
> the density in the :image-converter option, but the size changes. To
> fix it, I tried by
>
> 1. adding -scale 50\% at the end of the imagemagick (convert) string
> 2. modifying the value of :image-size-adjust, and
> 3. changing the scale in org-format-latex-options
>
> , but that did not help. I don't care too much about the resolution. I
> can live with the output of dvipng.
>
> Thanks again!
For posterity (read only if you are looking for a custom answer):
I noticed that using the :latex-header option in
org-preview-latex-process-alist, disables the regular heading (created
through org-format-latex-header, may be?). It replaces the heading
(document class, packages, etc.) with whatever the :latex-header line
states. This possibly means that one could create a custom _full_ header
(with document class, any other package and customisation), and load it
by means of :latex-header to see previews and exporting to ODT. This is
just an idea. I hope it helps someone.
-------------------------------------------------
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!
^ 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).