From: Giovanni Ridolfi <giovanni.ridolfi@yahoo.it>
To: emacs-orgmode@gnu.org
Cc: Jambunathan K <kjambunathan@gmail.com>
Subject: problems with mathjax CDN and HTML export
Date: Mon, 07 Nov 2011 17:02:31 +0100 [thread overview]
Message-ID: <83obwnkjjc.fsf@yahoo.it> (raw)
Hello everybody,
I have a problem with HTML export and Mathjax.
On the Mathjax site it is written that:"
There are two ways to access MathJax: the easiest way is to use the copy
of MathJax available from our distributed network service at
cdn.mathjax.org,
[and some lines below: "We recommend using the CDN service"]
but you can also download and install a copy of MathJax on your own server,
or for use locally on your own hard disk (with no need for network access)."
So I went for the CDN service.
Incidentally, if it worked, we could drop the
http://orgmode.org/mathjax/MathJax.js support.
In the section "Putting mathematics in a web page" of the
[[http://www.mathjax.org/docs/1.1/start.html#putting-mathematics-in-a-web-page][Mathjax documentation]]
it is written that: "To put mathematics in your web page, you can use
either TeX and LaTeX notation or MathML notation or both within the
same page;"
and this is done putting two scripts in the html file[1]
"The default math delimiters are $$...$$ and \[...\] for displayed
mathematics, and \(...\) for in-line mathematics."
Now if I try to export to HTML the following file
--------------------------------------
-*- mode: org -*-
* mathjax test
:PROPERTIES:
:EXPORT_TITLE:
:EXPORT_FILE_NAME: 000000-bbbbb.html
:EXPORT_OPTIONS: H:3 num:nil toc:nil \n:t @:t ::t |:t ^:t f:nil *:t tags:nil TeX:t LaTeX:nil skip:t p:nil author:nil email:nil creator:nil timestamp:t
:END:
#+STYLE: <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} }); </script>
#+STYLE: <script type="text/javascript" src="https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
#+MATHJAX: align:"left" mathml:t path:"https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js"
** Test
*** $$
$$
\alpha = \frac{1}{L_{0}} \left( \frac{L_2-L_1}{T_2-T_1} \right)
= \frac{1}{L_0}\frac{\Delta L}{\Delta T}
$$
*** @$$
@$$
\alpha = \frac{1}{L_{0}} \left( \frac{L_2-L_1}{T_2-T_1} \right)
= \frac{1}{L_0}\frac{\Delta L}{\Delta T}
@$$
#+END_SRC
*** #+BEGIN_HTML
#+BEGIN_HTML
$$
\alpha = \frac{1}{L_{0}} \left( \frac{L_2-L_1}{T_2-T_1} \right)
= \frac{1}{L_0}\frac{\Delta L}{\Delta T}
$$
#+END_HTML
*** nothing
u(\alpha) = \delta\alpha = {
\Bigg(
\left[\frac{-(\Delta L+c)}{L_{0}\cdot (T_1 -T_0)^{2}} \delta T_1 \right]^2 +
---------------------------------------------------------------------------------------------
the math snippets are always "converted" in HTML format e.g.: α = \frac{1}{L<sub>0</sub>}
:-(
unless they're inside the #+BEGIN_HTML block.
Is there another way to tell the HTML exporter to copy verbatim the lines inside the
math delimiters?
cheers,
Giovanni
[1]
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} }); </script>
<script type="text/javascript" src="https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
C-h v org-export-html-mathjax-options :
org-export-html-mathjax-options is a variable defined in `org-html.el'.
Its value is ((path "http://orgmode.org/mathjax/MathJax.js")
(scale "100")
(align "center")
(indent "2em")
(mathml nil))
next reply other threads:[~2011-11-07 16:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 16:02 Giovanni Ridolfi [this message]
2011-11-07 20:47 ` problems with mathjax CDN and HTML export Christian Moe
2011-11-08 16:09 ` Giovanni Ridolfi
2011-11-09 9:09 ` Christian Moe
2011-11-09 14:56 ` SOLVED " Giovanni Ridolfi
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83obwnkjjc.fsf@yahoo.it \
--to=giovanni.ridolfi@yahoo.it \
--cc=emacs-orgmode@gnu.org \
--cc=kjambunathan@gmail.com \
/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 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.