all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Mathjax export taking into account custom macros
@ 2011-09-08 17:20 Christian Straßer
  0 siblings, 0 replies; only message in thread
From: Christian Straßer @ 2011-09-08 17:20 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

there is an asymmetry between the html-export of latex-formulas by
means of dvipng on the one hand and by means of mathjax on the other
hand. The asymmetry concerns the handling of information provided by
the
#+LaTeX_HEADER:
parameter. The parameter is taken into account when exporting by means
of dvipng, but not when exporting by means of mathjax.

Let me give a small example:

*Scenario 1*

Say we have a file "test.org" which looks as follows:

#+OPTIONS: LaTeX:dvipng
#+LaTeX_HEADER: \newcommand{\vd}{\vdash}
* Header 1
$\vd$

Now exporting this file into html produces a png image with the "|-" symbol.

*Scenario 2*

Now our file "test.org" looks as follows:

#+OPTIONS: LaTeX:t
#+LaTeX_HEADER: \newcommand{\vd}{\vdash}
* Header 1
$\vd$

[the only change is in line 1]
Exporting this file produces a html file with \vd in red (meaning
mathjax doesn't have a subroutine dealing with the command "\vd").

I am not sure if this is the intended behavior. I personally would
prefer if the mathjax export would take into account the commands
specified in the LaTeX_HEADER.

A similar scenario we get with respect to the
org-export-latex-default-packages-alist. I have a small style package
with all my custom definitions that is listed in
org-export-latex-default-packages-alist (with snippet toggled to 't').
Again the LaTeX:dvipng option takes into account the package while the
mathjax export ignores it.

For the example illustrated in the two examples I used a minimal setup
with the following .emacs file:
(setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
(setq load-path (cons "~/.emacs.d/org-mode/contrib/lisp" load-path))
(require 'org-install)

The org-mode is an up-to-date clone from git:
M-x org-version returns:
Org-mode version 7.7 (release_7.7.264.gbe69)

Thanks!

Best,

Christian

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-08 17:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08 17:20 Mathjax export taking into account custom macros Christian Straßer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.