Re: [O] Latex export with \begin{equation}

2018-09-19 Thread Nicolas Goaziou
Hello,

Dominik Schrempf  writes:

> I tried to follow your suggestions. Please let me know, if the patch
> is OK like this.

Applied, with some changes to the commit message. Thank you.

> The patch only adds one footnote. It is unfortunate, that all
> subsequent footnotes are changed too.

This is a design choice. It keeps footnote numbers ordered. I find
having footnote numbers unordered confusing. Of course, as any design
choice, this is debatable.

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] Latex export with \begin{equation}

2018-09-18 Thread Dominik Schrempf

Hello,

I tried to follow your suggestions. Please let me know, if the patch is OK like
this.

The patch only adds one footnote. It is unfortunate, that all subsequent
footnotes are changed too.

Best,
Dominik

>From 4b97952b0d6d218de7d7cab6f7017f87b68b966c Mon Sep 17 00:00:00 2001
From: Dominik Schrempf 
Date: Tue, 18 Sep 2018 15:04:47 +0200
Subject: [PATCH] Mention peculiarities of Math in HTML code. TINYCHANGE.

---
 doc/org-manual.org | 132 +++--
 1 file changed, 68 insertions(+), 64 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 0732c1d97..90b2dbd12 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -12638,7 +12638,7 @@ is.
 #+vindex: org-html-mathjax-options~
 LaTeX math snippets (see [[*LaTeX fragments]]) can be displayed in two
 different ways on HTML pages.  The default is to use the [[http://www.mathjax.org][MathJax]],
-which should work out of the box with Org[fn:123].  Some MathJax
+which should work out of the box with Org[fn:123][fn:124].  Some MathJax
 display options can be configured via ~org-html-mathjax-options~, or
 in the buffer.  For example, with the following settings,
 
@@ -12650,7 +12650,7 @@ in the buffer.  For example, with the following settings,
 #+texinfo: @noindent
 equation labels are displayed on the left margin and equations are
 five em from the left margin.  In addition, it loads the two MathJax
-extensions =cancel.js= and =noErrors.js=[fn:124].
+extensions =cancel.js= and =noErrors.js=[fn:125].
 
 #+vindex: org-html-mathjax-template
 See the docstring of ~org-html-mathjax-options~ for all supported
@@ -12713,7 +12713,7 @@ line.
 #+vindex: org-export-html-todo-kwd-class-prefix
 #+vindex: org-export-html-tag-class-prefix
 You can modify the CSS style definitions for the exported file.  The
-HTML exporter assigns the following special CSS classes[fn:125] to
+HTML exporter assigns the following special CSS classes[fn:126] to
 appropriate parts of the document---your style specifications may
 change these, in addition to any of the standard classes like for
 headlines, tables, etc.
@@ -12953,7 +12953,7 @@ LaTeX export back-end finds the compiler version to use from
 Org file.  See the docstring for the
 ~org-latex-default-packages-alist~ for loading packages with certain
 compilers.  Also see ~org-latex-bibtex-compiler~ to set the
-bibliography compiler[fn:126].
+bibliography compiler[fn:127].
 
 *** LaTeX specific export settings
 :PROPERTIES:
@@ -13564,7 +13564,7 @@ a limit to a level before the absolute limit (see [[*Export Settings]]).
 
 The ODT export back-end handles creating of OpenDocument Text (ODT)
 format.  Documents created by this exporter use the
-{{{cite(OpenDocument-v1.2 specification)}}}[fn:127] and are compatible
+{{{cite(OpenDocument-v1.2 specification)}}}[fn:128] and are compatible
 with LibreOffice 3.4.
 
 *** Pre-requisites for ODT export
@@ -13965,7 +13965,7 @@ document in one of the following ways:
  variables ~org-latex-to-mathml-convert-command~ and
  ~org-latex-to-mathml-jar-file~.
 
- If you prefer to use MathToWeb[fn:128] as your converter, you can
+ If you prefer to use MathToWeb[fn:129] as your converter, you can
  configure the above variables as shown below.
 
  #+begin_src emacs-lisp
@@ -13975,7 +13975,7 @@ document in one of the following ways:
"/path/to/mathtoweb.jar")
  #+end_src
 
- To use LaTeX​ML[fn:129] use
+ To use LaTeX​ML[fn:130] use
 
  #+begin_src emacs-lisp
  (setq org-latex-to-mathml-convert-command
@@ -14295,7 +14295,7 @@ with the =#+ATTR_ODT= line.  For a discussion on default formatting of
 tables, see [[*Tables in ODT export]].
 
 This feature closely mimics the way table templates are defined in the
-OpenDocument-v1.2 specification.[fn:130]
+OpenDocument-v1.2 specification.[fn:131]
 
 #+vindex: org-odt-table-styles
 For quick preview of this feature, install the settings below and export the
@@ -14329,7 +14329,7 @@ templates, define new styles there.
 
 To use this feature proceed as follows:
 
-1. Create a table template[fn:131].
+1. Create a table template[fn:132].
 
A table template is set of =table-cell= and =paragraph= styles for
each of the following table cell categories:
@@ -14368,7 +14368,7 @@ To use this feature proceed as follows:
== element of the content template file
(see [[x-orgodtcontenttemplate-xml][Factory styles]]).
 
-2. Define a table style[fn:132].
+2. Define a table style[fn:133].
 
#+vindex: org-odt-table-styles
To define a table style, create an entry for the style in the
@@ -15395,7 +15395,7 @@ If you want to publish the Org file as an =.org= file but with
 ~org-publish-org-to-org~.  This produces =file.org= and put it in the
 publishing directory.  If you want a htmlized version of this file,
 set the parameter ~:htmlized-source~ to ~t~.  It produces
-=file.org.html= in the publishing directory[fn:133].
+=file.org.html= in the publishing 

Re: [O] Latex export with \begin{equation}

2018-09-17 Thread Nicolas Goaziou
Hello,

Dominik Schrempf  writes:

> Oh thanks,
>
> I thought it would be good to add a comment to the Org mode manual although it
> is of course not really Org mode related.
>
> I decided that a good location would be
> https://orgmode.org/manual/Math-formatting-in-HTML-export.html#Math-formatting-in-HTML-export
>
> A proposed patch is attached, please let me know what you think.

Thank you.

Please use a proper commit message and add TINYCHANGE if you haven't
signed FSF papers.

> --- org-manual.org2018-09-17 18:48:17.868785307 +0200
> +++ org-manual.org.new2018-09-17 18:48:09.708751068 +0200
> @@ -12655,7 +12655,9 @@
>  #+vindex: org-html-mathjax-template
>  See the docstring of ~org-html-mathjax-options~ for all supported
>  variables.  The MathJax template can be configure via
> -~org-html-mathjax-template~.
> +~org-html-mathjax-template~.  Please note that formulas will be part

I suggest to use the present tense instead of the future, per (info
"(elisp) Documentation Tips") and put this in a footnote since this is
not directly Org-related, as you point out.

> +of an HTML document, and that signs such as =<=, =>=, or =&= have
> +special meanings (see 
> [[http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax
>  TeX and LaTeX support]]).
>  

Regards,

-- 
Nicolas Goaziou



Re: [O] Latex export with \begin{equation}

2018-09-17 Thread Dominik Schrempf

Oh thanks,

I thought it would be good to add a comment to the Org mode manual although it
is of course not really Org mode related.

I decided that a good location would be
https://orgmode.org/manual/Math-formatting-in-HTML-export.html#Math-formatting-in-HTML-export

A proposed patch is attached, please let me know what you think.

Best,
Dominik

--- org-manual.org	2018-09-17 18:48:17.868785307 +0200
+++ org-manual.org.new	2018-09-17 18:48:09.708751068 +0200
@@ -12655,7 +12655,9 @@
 #+vindex: org-html-mathjax-template
 See the docstring of ~org-html-mathjax-options~ for all supported
 variables.  The MathJax template can be configure via
-~org-html-mathjax-template~.
+~org-html-mathjax-template~.  Please note that formulas will be part
+of an HTML document, and that signs such as =<=, =>=, or =&= have
+special meanings (see [[http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax TeX and LaTeX support]]).
 
 If you prefer, you can also request that LaTeX fragments are processed
 into small images that will be inserted into the browser page.  Before


Nick Dokos  writes:


Dominik Schrempf  writes:



so I found the reason. Both Org versions behave the same, sorry for the
confusion. The original equation that does not get exported correctly 
contained

angles:

\begin{equation}
  = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

This equation is correctly rendered when using a .tex file and native LaTeX.
If the angles are removed, the Org Mode HTML export works:

\begin{equation}
 k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

Does anybody know why? Is this expected behavior? Can this be changed?



Maybe this explains it:

"...Also, since the mathematics is initially given as text on the
page, you need to be careful that your mathematics doesn’t look like
HTML tags to the browser (which parses the page before MathJax gets to
see it). In particular, that means that you have to be careful about
things like less-than and greater-than signs (< and >), and ampersands
(&), which have special meaning to the browsers. For example,

... when $xhttp://docs.mathjax.org/en/latest/tex.html

the section entitled "TeX and LaTeX in HTML documents":


Re: [O] Latex export with \begin{equation}

2018-09-13 Thread Nick Dokos
Dominik Schrempf  writes:


> so I found the reason. Both Org versions behave the same, sorry for the
> confusion. The original equation that does not get exported correctly 
> contained
> angles:
>
> \begin{equation}
>   = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
> \end{equation}
>
> This equation is correctly rendered when using a .tex file and native LaTeX.
> If the angles are removed, the Org Mode HTML export works:
>
> \begin{equation}
>  k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
> \end{equation}
>
> Does anybody know why? Is this expected behavior? Can this be changed?
>

Maybe this explains it:

"...Also, since the mathematics is initially given as text on the
page, you need to be careful that your mathematics doesn’t look like
HTML tags to the browser (which parses the page before MathJax gets to
see it). In particular, that means that you have to be careful about
things like less-than and greater-than signs (< and >), and ampersands
(&), which have special meaning to the browsers. For example,

... when $xhttp://docs.mathjax.org/en/latest/tex.html
   
the section entitled "TeX and LaTeX in HTML documents":

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [O] Latex export with \begin{equation}

2018-09-13 Thread Julius Dittmar
Am 13.09.18 um 15:31 schrieb Dominik Schrempf:
> so I found the reason. Both Org versions behave the same, sorry for the
> confusion. The original equation that does not get exported correctly
> contained
> angles:
> 
> \begin{equation}
>   = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
> \end{equation}
> 
> This equation is correctly rendered when using a .tex file and native
> LaTeX.
> If the angles are removed, the Org Mode HTML export works:
> 
> \begin{equation}
>  k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
> \end{equation}
> 
> Does anybody know why? Is this expected behavior? Can this be changed?

I can't answer any of those questions, but you as a work-around you
could use \langle and \rangle instead of < and >. That's propably more
what you want anyways, as < and > are rendered as the less operator and
the greater operator, including the appropriate spacing, whereas \langle
and \rangle behave like parenthesis.

HTH,
Julius



Re: [O] Latex export with \begin{equation}

2018-09-13 Thread Dominik Schrempf

Hi,

so I found the reason. Both Org versions behave the same, sorry for the
confusion. The original equation that does not get exported correctly contained
angles:

\begin{equation}
  = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

This equation is correctly rendered when using a .tex file and native LaTeX.
If the angles are removed, the Org Mode HTML export works:

\begin{equation}
 k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

Does anybody know why? Is this expected behavior? Can this be changed?

Dominik Schrempf  writes:


Hi,

I have the following document:

\begin{equation}
foobar
\end{equation}

I perform an HTML export.

The equation is not rendered with MathJax when using Org Mode 9.1.14
(Spacemacs).

The equation is correctly rendered with =emacs -Q=; then, Org Mode 9.1.9 is
used.

I am sure that Spacemacs sets other variables that may influence the HTML
export, but even then LaTeX export works perfectly when using dollar signs to
mark the equation.

Help much appreciated!

Thanks,
Dominik




[O] Latex export with \begin{equation}

2018-09-13 Thread Dominik Schrempf

Hi,

I have the following document:

\begin{equation}
foobar
\end{equation}

I perform an HTML export.

The equation is not rendered with MathJax when using Org Mode 9.1.14
(Spacemacs).

The equation is correctly rendered with =emacs -Q=; then, Org Mode 9.1.9 is 
used.


I am sure that Spacemacs sets other variables that may influence the HTML
export, but even then LaTeX export works perfectly when using dollar signs to
mark the equation.

Help much appreciated!

Thanks,
Dominik