emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* HTML export for math markup
@ 2017-01-09 15:28 Lawrence Bottorff
  2017-01-09 17:30 ` Nick Dokos
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Lawrence Bottorff @ 2017-01-09 15:28 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export
this to HTML, it produces png files for each markup and puts them in a
subfolder ltximg. Is there any way to skip this translating to pictures and
just use MathJax directly. I've seen this
<http://orgmode.org/manual/Math-formatting-in-HTML-export.html>, but my
setup seems to be defaulted to png picture production, not direct MathJax
rendering via "
http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML. I
understand that what's happening is this
<http://orgmode.org/worg/org-tutorials/org-latex-preview.html>, but that's
not MathJax. What am I doing (thinking) wrong?

LB

[-- Attachment #2: Type: text/html, Size: 841 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-09 15:28 HTML export for math markup Lawrence Bottorff
@ 2017-01-09 17:30 ` Nick Dokos
  2017-01-09 21:53   ` Lawrence Bottorff
  2017-01-09 17:31 ` Nicolas Goaziou
  2017-01-09 22:34 ` Thierry Banel
  2 siblings, 1 reply; 11+ messages in thread
From: Nick Dokos @ 2017-01-09 17:30 UTC (permalink / raw)
  To: emacs-orgmode

Lawrence Bottorff <borgauf@gmail.com> writes:

> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export this to HTML, it produces png
> files for each markup and puts them in a subfolder ltximg. Is there any way to skip this translating to
> pictures and just use MathJax directly. I've seen this, but my setup seems to be defaulted to png
> picture production, not direct MathJax rendering via "http://cdn.mathjax.org/mathjax/latest/MathJax.js?
> config=TeX-AMS_HTML. I understand that what's happening is this, but that's not MathJax. What am I doing
> (thinking) wrong?
>

Have you tried exporting with a minimal init file and none of your customizations?

-- 
Nick

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-09 15:28 HTML export for math markup Lawrence Bottorff
  2017-01-09 17:30 ` Nick Dokos
@ 2017-01-09 17:31 ` Nicolas Goaziou
  2017-01-09 22:34 ` Thierry Banel
  2 siblings, 0 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2017-01-09 17:31 UTC (permalink / raw)
  To: Lawrence Bottorff; +Cc: emacs-orgmode Mailinglist

Hello,

Lawrence Bottorff <borgauf@gmail.com> writes:

> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export
> this to HTML, it produces png files for each markup and puts them in a
> subfolder ltximg. Is there any way to skip this translating to pictures and
> just use MathJax directly. I've seen this
> <http://orgmode.org/manual/Math-formatting-in-HTML-export.html>, but my
> setup seems to be defaulted to png picture production, not direct MathJax
> rendering via "
> http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML. I
> understand that what's happening is this
> <http://orgmode.org/worg/org-tutorials/org-latex-preview.html>, but that's
> not MathJax. What am I doing (thinking) wrong?

MathJax should be the default behaviour. See `org-html-with-latex'.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-09 17:30 ` Nick Dokos
@ 2017-01-09 21:53   ` Lawrence Bottorff
  2017-01-09 22:57     ` Nick Dokos
  0 siblings, 1 reply; 11+ messages in thread
From: Lawrence Bottorff @ 2017-01-09 21:53 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]

The default behavior with a plain vanilla installation is, indeed, to use
png files and create the ltximg subdirectory. It's not a huge problem, but
I'd prefer it not doing that; instead, using MathJax. Anyone know how to
switch this behavior?

On Mon, Jan 9, 2017 at 12:30 PM, Nick Dokos <ndokos@gmail.com> wrote:

> Lawrence Bottorff <borgauf@gmail.com> writes:
>
> > I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I
> export this to HTML, it produces png
> > files for each markup and puts them in a subfolder ltximg. Is there any
> way to skip this translating to
> > pictures and just use MathJax directly. I've seen this, but my setup
> seems to be defaulted to png
> > picture production, not direct MathJax rendering via "
> http://cdn.mathjax.org/mathjax/latest/MathJax.js?
> > config=TeX-AMS_HTML. I understand that what's happening is this, but
> that's not MathJax. What am I doing
> > (thinking) wrong?
> >
>
> Have you tried exporting with a minimal init file and none of your
> customizations?
>
> --
> Nick
>
>
>

[-- Attachment #2: Type: text/html, Size: 1655 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-09 15:28 HTML export for math markup Lawrence Bottorff
  2017-01-09 17:30 ` Nick Dokos
  2017-01-09 17:31 ` Nicolas Goaziou
@ 2017-01-09 22:34 ` Thierry Banel
  2017-01-10  0:13   ` Lawrence Bottorff
       [not found]   ` <88f10863f4f94677abfb0514800db64f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2 siblings, 2 replies; 11+ messages in thread
From: Thierry Banel @ 2017-01-09 22:34 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/html, Size: 1915 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-09 21:53   ` Lawrence Bottorff
@ 2017-01-09 22:57     ` Nick Dokos
  0 siblings, 0 replies; 11+ messages in thread
From: Nick Dokos @ 2017-01-09 22:57 UTC (permalink / raw)
  To: emacs-orgmode

Lawrence Bottorff <borgauf@gmail.com> writes:

> The default behavior with a plain vanilla installation is, indeed, to use png files and create the
> ltximg subdirectory. It's not a huge problem, but I'd prefer it not doing that; instead, using MathJax.
> Anyone know how to switch this behavior?

No, the default with a plain vanilla install is MathJax. In your minimal init environment,
what is the value of org-html-with-latex? What about org-export-with-latex? Both of these
should be t by default.

If they are, I would edebug org-html-format-latex, run the export and,
when it stops at org-html-format-latex, look at its arguments: the
second argument is the processing-type and it *should* be mathjax.

>
> On Mon, Jan 9, 2017 at 12:30 PM, Nick Dokos <ndokos@gmail.com> wrote:
>
>     Lawrence Bottorff <borgauf@gmail.com> writes:
>    
>     > I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export this to HTML, it
>     produces png
>     > files for each markup and puts them in a subfolder ltximg. Is there any way to skip this
>     translating to
>     > pictures and just use MathJax directly. I've seen this, but my setup seems to be defaulted to png
>     > picture production, not direct MathJax rendering via "http://cdn.mathjax.org/mathjax/latest/
>     MathJax.js?
>     > config=TeX-AMS_HTML. I understand that what's happening is this, but that's not MathJax. What am I
>     doing
>     > (thinking) wrong?
>     >
>    
>     Have you tried exporting with a minimal init file and none of your customizations?
>    
>     --
>     Nick
>

-- 
Nick

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-09 22:34 ` Thierry Banel
@ 2017-01-10  0:13   ` Lawrence Bottorff
  2017-01-10  0:24     ` Lawrence Bottorff
       [not found]   ` <88f10863f4f94677abfb0514800db64f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 1 reply; 11+ messages in thread
From: Lawrence Bottorff @ 2017-01-10  0:13 UTC (permalink / raw)
  To: Thierry Banel; +Cc: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 2404 bytes --]

This is the entirety of my header section. I'm sure there are redundancies
etc. But again, the clean vanilla of Emacs 25.1.1 and org-mode 9.0.2 is
defaulting to producing png's.

#+TITLE: \zwnj^{147}Pm SAGA
#+AUTHOR: 147Pm
#+EMAIL: borgauf@sdf.org
# date ... will set (change) each time (if remembered)
#+DATE: <2015-05-09 Sat 07:53>
#+FILETAGS: :CompleteReWrite:
#+LANGUAGE:  en
#+INFOJS_OPT: view:showall ltoc:t mouse:underline path:
http://orgmode.org/org-info.js
#+HTML_HEAD: <link rel="stylesheet" href="data/stylesheet.css"
type="text/css">
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+OPTIONS: H:10 num:4 toc:nil \n:nil @:t ::t |:t _:{} *:t ^:{} prop:t
#+OPTIONS: prop:t
#+OPTIONS: tex:imagemagick
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [american]
# Setup tikz package for both LaTeX and HTML export:
#+LATEX_HEADER: \usepackage{tikz}
#+LaTeX_HEADER: \usepackage{pgfplots}
#+LaTeX_HEADER: \usepackage{sansmath}
#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
#+PROPERTY: header-args:latex+ :packages '(("" "tikz"))
#
#+PROPERTY: header-args:latex+ :imagemagick (by-backend (latex nil) (t
"yes"))
#+PROPERTY: header-args:latex+ :exports results :fit yes
#
#+STARTUP: showall
#+STARTUP: align
#+STARTUP: indent
#+STARTUP: entitiespretty
#+STARTUP: logdrawer

On Mon, Jan 9, 2017 at 5:34 PM, Thierry Banel <tbanelwebmin@free.fr> wrote:

> Le 09/01/2017 16:28, Lawrence Bottorff a écrit :
>
> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I export
> this to HTML, it produces png files for each markup and puts them in a
> subfolder ltximg. Is there any way to skip this translating to pictures and
> just use MathJax directly. I've seen this
> <http://orgmode.org/manual/Math-formatting-in-HTML-export.html>, but my
> setup seems to be defaulted to png picture production, not direct MathJax
> rendering via "http://cdn.mathjax.org/mathjax/latest/MathJax.js?
> config=TeX-AMS_HTML. I understand that what's happening is this
> <http://orgmode.org/worg/org-tutorials/org-latex-preview.html>, but
> that's not MathJax. What am I doing (thinking) wrong?
>
> LB
>
>
> I use
> #+HTML_MATHJAX: align: left etc...
> Works well.
>
> Then you can control appearance through CSS. For instance:
> .MathJax_Display {
>     color: #080;
>     margin: 0;
> }
>
> Have fun
>
>

[-- Attachment #2: Type: text/html, Size: 3960 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-10  0:13   ` Lawrence Bottorff
@ 2017-01-10  0:24     ` Lawrence Bottorff
  0 siblings, 0 replies; 11+ messages in thread
From: Lawrence Bottorff @ 2017-01-10  0:24 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist, Nick Dokos

[-- Attachment #1: Type: text/plain, Size: 2818 bytes --]

org-html-with-latex is t and org-export-with-latex is also t. I don't have
a org-html-format-latex, or at least nothing comes up with C-h
v org-html-format-latex. Also, how does edebug work as you, Nick, described?

On Mon, Jan 9, 2017 at 7:13 PM, Lawrence Bottorff <borgauf@gmail.com> wrote:

> This is the entirety of my header section. I'm sure there are redundancies
> etc. But again, the clean vanilla of Emacs 25.1.1 and org-mode 9.0.2 is
> defaulting to producing png's.
>
> #+TITLE: \zwnj^{147}Pm SAGA
> #+AUTHOR: 147Pm
> #+EMAIL: borgauf@sdf.org
> # date ... will set (change) each time (if remembered)
> #+DATE: <2015-05-09 Sat 07:53>
> #+FILETAGS: :CompleteReWrite:
> #+LANGUAGE:  en
> #+INFOJS_OPT: view:showall ltoc:t mouse:underline path:
> http://orgmode.org/org-info.js
> #+HTML_HEAD: <link rel="stylesheet" href="data/stylesheet.css"
> type="text/css">
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
> #+OPTIONS: H:10 num:4 toc:nil \n:nil @:t ::t |:t _:{} *:t ^:{} prop:t
> #+OPTIONS: prop:t
> #+OPTIONS: tex:imagemagick
> #+LATEX_CLASS: article
> #+LATEX_CLASS_OPTIONS: [american]
> # Setup tikz package for both LaTeX and HTML export:
> #+LATEX_HEADER: \usepackage{tikz}
> #+LaTeX_HEADER: \usepackage{pgfplots}
> #+LaTeX_HEADER: \usepackage{sansmath}
> #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
> #+PROPERTY: header-args:latex+ :packages '(("" "tikz"))
> #
> #+PROPERTY: header-args:latex+ :imagemagick (by-backend (latex nil) (t
> "yes"))
> #+PROPERTY: header-args:latex+ :exports results :fit yes
> #
> #+STARTUP: showall
> #+STARTUP: align
> #+STARTUP: indent
> #+STARTUP: entitiespretty
> #+STARTUP: logdrawer
>
> On Mon, Jan 9, 2017 at 5:34 PM, Thierry Banel <tbanelwebmin@free.fr>
> wrote:
>
>> Le 09/01/2017 16:28, Lawrence Bottorff a écrit :
>>
>> I've got an org file with Latex math markup, e.g. $x_2/y^3$. When I
>> export this to HTML, it produces png files for each markup and puts them in
>> a subfolder ltximg. Is there any way to skip this translating to pictures
>> and just use MathJax directly. I've seen this
>> <http://orgmode.org/manual/Math-formatting-in-HTML-export.html>, but my
>> setup seems to be defaulted to png picture production, not direct MathJax
>> rendering via "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config
>> =TeX-AMS_HTML. I understand that what's happening is this
>> <http://orgmode.org/worg/org-tutorials/org-latex-preview.html>, but
>> that's not MathJax. What am I doing (thinking) wrong?
>>
>> LB
>>
>>
>> I use
>> #+HTML_MATHJAX: align: left etc...
>> Works well.
>>
>> Then you can control appearance through CSS. For instance:
>> .MathJax_Display {
>>     color: #080;
>>     margin: 0;
>> }
>>
>> Have fun
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 4655 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
       [not found]   ` <88f10863f4f94677abfb0514800db64f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-01-10  8:21     ` Eric S Fraga
  2017-01-10 13:12       ` Lawrence Bottorff
       [not found]       ` <68254ff0988e445a973c6d43f255aa9e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 11+ messages in thread
From: Eric S Fraga @ 2017-01-10  8:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

On Tuesday, 10 Jan 2017 at 00:13, Lawrence Bottorff wrote:
> This is the entirety of my header section. I'm sure there are
> redundancies etc. But again, the clean vanilla of Emacs 25.1.1 and
> org-mode 9.0.2 is defaulting to producing png's.

[...]

> #+OPTIONS: tex:imagemagick

Maybe this is the problem?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-189-ge46676

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
  2017-01-10  8:21     ` Eric S Fraga
@ 2017-01-10 13:12       ` Lawrence Bottorff
       [not found]       ` <68254ff0988e445a973c6d43f255aa9e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 0 replies; 11+ messages in thread
From: Lawrence Bottorff @ 2017-01-10 13:12 UTC (permalink / raw)
  To: Eric S Fraga, emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

Yes, I tested all my header lines and found that was the 'offender." It got
there on someone's suggestion it was needed for proper TikZ. Or was it
bibtex? Or does a ton of pngs come if you choose Latex preview? No time for
further investigation. Confusion will be my epitaph. . . .

On Tue, Jan 10, 2017 at 3:21 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> On Tuesday, 10 Jan 2017 at 00:13, Lawrence Bottorff wrote:
> > This is the entirety of my header section. I'm sure there are
> > redundancies etc. But again, the clean vanilla of Emacs 25.1.1 and
> > org-mode 9.0.2 is defaulting to producing png's.
>
> [...]
>
> > #+OPTIONS: tex:imagemagick
>
> Maybe this is the problem?
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-189-ge46676
>

[-- Attachment #2: Type: text/html, Size: 1214 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: HTML export for math markup
       [not found]       ` <68254ff0988e445a973c6d43f255aa9e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-01-11  7:00         ` Eric S Fraga
  0 siblings, 0 replies; 11+ messages in thread
From: Eric S Fraga @ 2017-01-11  7:00 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

On Tuesday, 10 Jan 2017 at 13:12, Lawrence Bottorff wrote:
> Yes, I tested all my header lines and found that was the 'offender."
> It got there on someone's suggestion it was needed for proper TikZ. Or
> was it bibtex? Or does a ton of pngs come if you choose Latex preview?
> No time for further investigation. Confusion will be my epitaph. . . .

I think, IIUC, the tex: option is for inline LaTeX and maybe (maybe not)
exported LaTeX.  If you want to use mathjax for this, then tikz et
al. need to be done differently, e.g. using src blocks with a :file
output.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-189-ge46676

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-01-11  8:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 15:28 HTML export for math markup Lawrence Bottorff
2017-01-09 17:30 ` Nick Dokos
2017-01-09 21:53   ` Lawrence Bottorff
2017-01-09 22:57     ` Nick Dokos
2017-01-09 17:31 ` Nicolas Goaziou
2017-01-09 22:34 ` Thierry Banel
2017-01-10  0:13   ` Lawrence Bottorff
2017-01-10  0:24     ` Lawrence Bottorff
     [not found]   ` <88f10863f4f94677abfb0514800db64f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-10  8:21     ` Eric S Fraga
2017-01-10 13:12       ` Lawrence Bottorff
     [not found]       ` <68254ff0988e445a973c6d43f255aa9e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-11  7:00         ` Eric S Fraga

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).