From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yi Wang Subject: Bug: MathJax rendering problem on Google Chrome [8.2.7c] Date: Fri, 12 Dec 2014 20:38:44 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c29bca0b27e3050a0ae194 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzWzB-0006uf-Da for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 15:38:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzWz9-00076W-BM for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 15:38:49 -0500 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:61223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzWz8-00076O-TW for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 15:38:47 -0500 Received: by mail-la0-f53.google.com with SMTP id gm9so6877201lab.12 for ; Fri, 12 Dec 2014 12:38:45 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" --001a11c29bca0b27e3050a0ae194 Content-Type: text/plain; charset=UTF-8 The problem: I write a document with LaTeX equations in it, e.g. The quick $\alpha$ jumps over the lazy $\beta$ and use org-html-export-to-html to export to html. The equations are rendered in MathJax. In Google Chrome (version 39 for me), the rending time for the resulting html file is extremely slow (about 15 seconds). I noticed that, if I replace the line in the html file with the rendering time becomes normal. I think it is related to a bug in MathJax (report: https://groups.google.com/forum/#!msg/mathjax-users/S5x-RQDPJrI/Tn31F4NjcTcJ ), and emacs is using an old verison. It would be great if the MathJax on emacs server be upgraded or patched. ------------------------------------------------------------------------ Emacs : GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3) of 2014-10-21 on bitzer.hoetzel.info Package: Org-mode version 8.2.7c (8.2.7c-64-g01f736-elpa @ /home/wangyi/.emacs.d/elpa/org-20140915/) current state: ============== (setq org-src-lang-modes '(("mathematica" . "mma") ("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist) ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql) ("calc" . fundamental) ("C" . c) ("cpp" . c++) ("C++" . c++) ("screen" . shell-script)) org-tab-first-hook '(yas/org-very-safe-expand org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-html-format-drawer-function '(lambda (name contents) contents) org-latex-format-inlinetask-function 'ignore org-confirm-shell-link-function 'yes-or-no-p org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-file-apps '(("\\.nb\\'" . "Mathematica %s") ("\\.xls\\'" . "libreoffice %s") (directory . "dolphin %s") ("\\.djvu\\'" . "okular %s") ("\\.pdf\\'" . "okular %s") (auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default)) org-support-shift-select t org-latex-format-headline-function 'org-latex-format-headline-default-function org-todo-keyword-faces '(("[TODO]" :foreground "red" :weight bold) ("[PROG]" :foreground "magenta" :weight bold) ("[DONE]" :foreground "forest green" :weight bold) ("[WAIT]" :foreground "chocolate" :weight bold) ("[PEND]" :foreground "dim grey" :weight bold) ("[CANC]" :foreground "dim grey" :weight bold)) org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-drawer-function '(lambda (name contents) contents) org-from-is-user-regexp "\\" org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[nil "\302\300!\210\303 \304\305\306\"\210\307 \310\311#\207" [yas/trigger-key yas/keymap make-variable-buffer-local [tab] add-to-list org-tab-first-hook yas/org-very-safe-expand define-key [tab] yas/next-field] 4] wy-soft-wrap-lines #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes #[nil "\300\301\302\"\210\300\303\304\"\210\300\305\306\"\207" [local-set-key [134217840] wy-screenshot [f5] wy-org-to-texpdf [f6] wy-org-beamer-concurrent] 3] flyspell-mode) org-ascii-format-drawer-function '(lambda (name contents width) contents) org-replace-disputed-keys t org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-todo-keywords '((sequence "[TODO]" "[PROG]" "[WAIT]" "|" "[PEND]" "[CANC]" "[DONE]") ) org-babel-tangle-lang-exts '(("mathematica" . "m") ("python" . "py") ("C++" . "cpp") ("emacs-lisp" . "el")) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-latex-listings 'minted org-html-format-headline-function 'ignore org-babel-load-languages '((emacs-lisp) (C . t) (python . t) (sh . t)) org-html-format-inlinetask-function 'ignore org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-confirm-babel-evaluate nil org-src-fontify-natively t ) --001a11c29bca0b27e3050a0ae194 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The problem: I write a document with LaTeX equations in it, e.g.

=C2=A0 =C2=A0 The quick $\alpha$ jumps over the laz= y $\beta$

and use org-html-export-to-html to expor= t to html. The equations are
rendered in MathJax. In Google Chrom= e (version 39 for me), the rending
time for the resulting html fi= le is extremely slow (about 15 seconds).

I noticed= that, if I replace the line in the html file

=C2= =A0 =C2=A0 <script type=3D"text/javascript" src=3D"http://orgmode.org/mathjax/Math= Jax.js"></script>

with

=C2=A0 =C2=A0 <script type=3D"text/javascript"= src=3D"h= ttp://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>= ;

the rendering time becomes normal. I think it is= related to a bug in
MathJax (report:

-------------------------------------------------------------------= -----

Emacs =C2=A0: GNU Emacs 24.4.1 (x86_64-unkno= wn-linux-gnu, GTK+ Version 3.14.3)
Package: = Org-mode version 8.2.7c (8.2.7c-64-g01f736-elpa @ /home/wangyi/.emacs.d/elp= a/org-20140915/)

current state:
=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq
=C2=A0org-sr= c-lang-modes '(("mathematica" . "mma") ("ocaml= " . tuareg)
=C2=A0 =C2=A0 =C2=A0("elisp" . emacs-lisp) (&q= uot;ditaa" . artist)
=C2=A0 =C2=A0 =C2=A0("asymptote" . as= y) ("dot" . fundamental)
=C2=A0 =C2=A0 =C2=A0("sqlite"= ; . sql) ("calc" . fundamental) ("C" . c)
=C2=A0 =C2= =A0 =C2=A0("cpp" . c++) ("C++" . c++) ("screen&quo= t; . shell-script))
=C2=A0org-tab-first-hook '(yas/org-very-s= afe-expand org-hide-block-toggle-maybe
=C2=A0 =C2=A0 =C2=A0org-src-native= -tab-command-maybe
=C2=A0 =C2=A0 =C2=A0org-babel-hide-result-toggle-maybe=
=C2=A0 =C2=A0 =C2=A0org-babel-header-arg-expand)
=C2=A0org-spe= ed-command-hook '(org-speed-command-default-hook
=C2=A0org-babel-sp= eed-command-hook)
=C2=A0org-occur-hook '(org-first-headline-r= ecenter)
=C2=A0org-metaup-hook '(org-babel-load-in-session-ma= ybe)
=C2=A0org-html-format-drawer-function '(lambda (name con= tents) contents)
=C2=A0org-latex-format-inlinetask-function '= ignore
=C2=A0org-confirm-shell-link-function 'yes-or-no-p
=C2=A0org-ascii-format-inlinetask-function 'org-ascii-format-inl= inetask-default
=C2=A0org-file-apps '(("\\.nb\\'&quo= t; . "Mathematica %s")
("\\.xls\\'" . "libre= office %s") (directory . "dolphin %s")
("\\.djvu\\= 9;" . "okular %s") ("\\.pdf\\'" . "okular= %s")
(auto-mode . emacs) ("\\.mm\\'" . default)
=
(&q= uot;\\.x?html?\\'" . default))
=C2=A0org-support-shift-s= elect t
=C2=A0org-latex-format-headline-function 'org-latex-f= ormat-headline-default-function
=C2=A0org-todo-keyword-faces '= ;(("[TODO]" :foreground "red" :weight bold)
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> =C2=A0(&= quot;[PROG]" :foreground "magenta" :weight bold)
<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> =C2=A0(&= quot;[DONE]" :foreground "forest green" :weight bold)
<= div> =C2= =A0("[WAIT]" :foreground "chocolate" :weight bold)
= =C2=A0("[PEND]" :foreground "dim grey" :weight bold)
= =C2=A0("[CANC]" :foreground "dim grey" :weight bold))<= /div>
=C2=A0org-after-todo-state-change-hook '(org-clock-out-if-cur= rent)
=C2=A0org-latex-format-drawer-function '(lambda (name c= ontents) contents)
=C2=A0org-from-is-user-regexp "\\<Yi W= ang\\>"
=C2=A0org-src-mode-hook '(org-src-babel-confi= gure-edit-buffer
=C2=A0 =C2=A0 org-src-mode-configure-edit-buffer)
<= div>=C2=A0org-agenda-before-write-hook '(org-agenda-add-entry-text)
=C2=A0org-babel-pre-tangle-hook '(save-buffer)
=C2=A0o= rg-mode-hook '(#[nil
=C2=A0 "\302\300!\210\303 \304\305\306\&quo= t;\210\307 = \310\311#\207"
=C2=A0 [yas/trigger-key yas/keymap make-variable-buff= er-local
=C2=A0 =C2=A0[tab] add-to-list org-tab-first-hook
=C2=A0 =C2= =A0yas/org-very-safe-expand define-key [tab] yas/next-field]
=C2=A0 4]
= wy-soft-wrap-lines
#[nil "\300\301\302\303\304$\207"
= =C2=A0 [= org-add-hook change-major-mode-hook org-show-block-all
=C2=A0 =C2=A0appen= d local]
=C2=A0 5]
#[nil "\300\301\302\303\304$\207"
=C2=A0= [org-add-hook change-major-mode-hook
=C2=A0 =C2=A0org-babel-show-result-= all append local]
=C2=A0 5]
org-babel-result-hide-spec org-babel-hide-a= ll-hashes
#[nil
=C2=A0 "\300\301\302\"\210\300\303\304\"= \210\300\305\306\"\207"
=C2=A0 [local-set-key [134217840] wy-sc= reenshot [f5]
=C2=A0 =C2=A0wy-org-to-texpdf [f6] wy-org-beamer-concurrent= ]
=C2=A0 3]
flyspell-mode)
=C2=A0org-ascii-format-drawer-func= tion '(lambda (name contents width) contents)
=C2=A0org-repla= ce-disputed-keys t
=C2=A0org-ctrl-c-ctrl-c-hook '(org-babel-h= ash-at-point
=C2=A0org-babel-execute-safely-maybe)
=C2=A0org-c= ycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
= =C2=A0org-cycle-hide-inline-tasks org-cycle-show-empty-lines
=C2=A0org-op= timize-window-after-visibility-change)
=C2=A0org-todo-keywords &#= 39;((sequence "[TODO]" "[PROG]" "[WAIT]" &quo= t;|" "[PEND]"
=C2=A0 =C2=A0 =C2=A0"[CANC]" "= ;[DONE]")
=C2=A0 =C2=A0 )
=C2=A0org-babel-tangle-lang-exts= '(("mathematica" . "m") ("python" . &quo= t;py")
=C2=A0 =C2=A0 =C2=A0("C++" . "cpp") (&qu= ot;emacs-lisp" . "el"))
=C2=A0org-confirm-elisp-li= nk-function 'yes-or-no-p
=C2=A0org-metadown-hook '(org-ba= bel-pop-to-session-maybe)
=C2=A0org-latex-listings 'minted
=C2=A0org-html-format-headline-function 'ignore
=C2= =A0org-babel-load-languages '((emacs-lisp) (C . t) (python . t) (sh . t= ))
=C2=A0org-html-format-inlinetask-function 'ignore
=C2=A0org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
=
=C2=A0org-confirm-babel-evaluate nil
=C2=A0org-src-fontify-n= atively t
=C2=A0)

--001a11c29bca0b27e3050a0ae194--