From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Math formatting in HTML export - The Org Manual Date: Sun, 12 Oct 2014 10:17:32 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd91a8c1ee9ee0505356b8c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdELi-0007s4-Mz for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 04:17:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdELh-0002QA-NV for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 04:17:54 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:56136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdELh-0002NU-Fi for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 04:17:53 -0400 Received: by mail-wg0-f41.google.com with SMTP id b13so6765604wgh.24 for ; Sun, 12 Oct 2014 01:17:52 -0700 (PDT) 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: "Liste-emacs-orgmode@gnu.org" --047d7bd91a8c1ee9ee0505356b8c Content-Type: text/plain; charset=UTF-8 http://orgmode.org/manual/Math-formatting-in-HTML-export.html Hello the list, Unfortunately, I do not know how to use Mathjax in order to convert any mathematical symbol or any proof in html. Therefore the only solution that I see is to use imagemagick. But the line #+OPTIONS: tex:imagemagick in my setup gives always corrupted png images and I do not succeed to understand why. I would be thankful if someone could tell me how to configure my emacs in order to use imagemagick to convert any proof in png image to export it in html. Thanks ! Jo. --047d7bd91a8c1ee9ee0505356b8c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Unfortunate= ly, I do not know how to use Mathjax in order to convert any mathematical s= ymbol or any proof in html. Therefore the only solution that I see is to us= e imagemagick.
But the line
 #+OPTIONS: tex:i=
magemagick

in my setup gives always corrupted =
png images and I do not succeed to understand why. 
I would be thankful = if someone could tell me how to configure my emacs in order to use imagemag= ick to convert any proof in png image to export it in html.

<= pre class=3D"">Thanks !

Jo. 

--047d7bd91a8c1ee9ee0505356b8c-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: Math formatting in HTML export - The Org Manual Date: Sun, 12 Oct 2014 19:45:06 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdTl8-0007w1-Gv for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 20:45:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdTl7-0003oa-IG for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 20:45:10 -0400 Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:35730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdTl7-0003nt-At for emacs-orgmode@gnu.org; Sun, 12 Oct 2014 20:45:09 -0400 Received: by mail-oi0-f42.google.com with SMTP id a141so11763753oig.15 for ; Sun, 12 Oct 2014 17:45:06 -0700 (PDT) In-Reply-To: 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: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" What version of Emacs and org mode are you using? What is your configuration? What action did you perform on what document? What did you want and expect to have happen with that action? What happened instead? On Sun, Oct 12, 2014 at 3:17 AM, Joseph Vidal-Rosset wrote: > http://orgmode.org/manual/Math-formatting-in-HTML-export.html > > Hello the list, > > Unfortunately, I do not know how to use Mathjax in order to convert any > mathematical symbol or any proof in html. Therefore the only solution tha= t I > see is to use imagemagick. > But the line > > #+OPTIONS: tex:imagemagick > > in my setup gives always corrupted png images and I do not succeed to > understand why. > I would be thankful if someone could tell me how to configure my emacs in > order to use imagemagick to convert any proof in png image to export it i= n > html. > > Thanks ! > > Jo. > > --=20 Grant Rettke gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) =E2=80=9CLife has become immeasurably better since I have been forced to st= op taking it seriously.=E2=80=9D --Thompson From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: Math formatting in HTML export - The Org Manual Date: Mon, 13 Oct 2014 09:45:26 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=047d7bea3a6637a313050549163d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdaKD-0001cP-9U for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 03:45:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdaKC-0002tG-BO for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 03:45:49 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:48354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdaKB-0002t2-WD for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 03:45:48 -0400 Received: by mail-wi0-f173.google.com with SMTP id fb4so6588487wid.12 for ; Mon, 13 Oct 2014 00:45:47 -0700 (PDT) In-Reply-To: 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: Grant Rettke , "Liste-emacs-orgmode@gnu.org" --047d7bea3a6637a313050549163d Content-Type: multipart/alternative; boundary=047d7bea3a6637a30e050549163b --047d7bea3a6637a30e050549163b Content-Type: text/plain; charset=UTF-8 Thanks for your reply. 2014-10-13 2:45 GMT+02:00 Grant Rettke : > What version of Emacs and org mode are you using? > GNU Emacs 24.3.1 > What is your configuration? > I'm using org from Elpa. OS: At the moment Xubuntu 14.04 , but the same problem occurred with Debian testing. > > What action did you perform on what document? > Here is a minimal document as example #+OPTIONS: tex:imagemagick #+TITLE: Minimal logic #+AUTHOR: Joseph Vidal-Rosset \begin{equation} \neg A \to (A \to B) \end{equation} > What did you want and expect to have happen with that action? > > The export to latex works well. BUT the export to html works BUT... > What happened instead? > produces always a corrupted png image for the equation. See the attachment. Thanks for your help Best wiishes Jo. --047d7bea3a6637a30e050549163b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for your reply.

2014-10-13 2:45= GMT+02:00 Grant Rettke <gcr@wisdomandwonder.com>:
=
What version of Emacs and org mode are you usin= g?

GNU Emacs 24.3.1
=C2=A0
What is your configuration?

I'= ;m using org from Elpa.

OS: At the moment Xubuntu 14.04 = , but the same problem occurred with Debian testing.
=C2=A0<= /div>

What action did you perform on what document?
Here is a minimal document as example

#+OPTIONS: tex:i= magemagick
#+TITLE: Minimal logic
#+AUTHOR: Joseph Vidal-Rosset

\begin{equation}
\neg A \to (A \to B)
\end{equation}



What did you want and expect to have happen with that action?


The export to latex works well. =

BUT the export to html=C2=A0 works BUT...
=C2=A0
What happened instead?

produces always a corrup= ted png image for the equation. See the attachment.
=C2=A0
Thanks for your help

Best wiishes

Jo.
=
--047d7bea3a6637a30e050549163b-- --047d7bea3a6637a313050549163d Content-Type: image/png; name="corrupted-image.png" Content-Disposition: attachment; filename="corrupted-image.png" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i17in5x40 iVBORw0KGgoAAAANSUhEUgAAAe4AAAASBAAAAAB9q49dAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC AK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dE AA86Mj6jAAAACW9GRnMAAAHGAAAAnABmGIXFAAAACXBIWXMAAAB4AAAAeACd9VpgAAAACXZwQWcA AAP8AAAFKAAd/BK3AAABcElEQVRYw92XvU7DMBRGzQSbYarUxYgFiSXvwZJXoRvqEtEFicWvUFgq sfjV7AgplpeL7fgvJimI7eYOlurEUo7PlxuXwGKZ5UsgAGl9hscnaWZX3/LghoFVs9xvyB4r9yhz W3C3s06/6tlXCr2BHqtwAe/W5CBIKXJSBz/qeuFAwVDQDU5sC6Wos564X7oqCz7mejPzTltueMPJ 7XRRh5B950Tf+JFV8VcsBcBCK5zcbeAeMrfMUS67OU3TYyCOYO5E/IGtdCRipIMQ2utpGqLlzN37 8WncFsTliUhyLKttCY4p/Oh8R7Yabj3xzUWQzkvf2gR4uSLfliZbLH1e5MjHXi7X43tTWvQfLGPF qq7oayZ9vg/V1iA6rXFPkLj7Sw6ST/o5PALcPgNcTfq51i00jvkep2vbwbXjbsjMRZ5jDXPNDnEl KLJ4y+lP65HVKZ7BlrlV9/t6dBXOHh9nfJ/9/22wBn0fHv+f3AL7i/4NMaIB/LpCyCEAAAAldEVY dGRhdGU6Y3JlYXRlADIwMTQtMTAtMTNUMDk6NDM6MDgrMDI6MDCoTMy9AAAAJXRFWHRkYXRlOm1v ZGlmeQAyMDE0LTEwLTEzVDA5OjQzOjA4KzAyOjAw2RF0AQAAABR0RVh0cGRmOlZlcnNpb24AUERG LTEuNSAFXAs5AAAAAElFTkSuQmCC --047d7bea3a6637a313050549163d-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Math formatting in HTML export - The Org Manual Date: Mon, 13 Oct 2014 12:45:28 +0100 Message-ID: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xde4M-0004fl-0F for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 07:45:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xde4E-0007XF-7o for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 07:45:41 -0400 Received: from mail-db3on0125.outbound.protection.outlook.com ([157.55.234.125]:41376 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xde4D-0007Wx-R4 for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 07:45:34 -0400 In-Reply-To: (Joseph Vidal-Rosset's message of "Mon, 13 Oct 2014 09:45:26 +0200") 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: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" , Grant Rettke On Monday, 13 Oct 2014 at 09:45, Joseph Vidal-Rosset wrote: [...] > Here is a minimal document as example > > #+OPTIONS: tex:imagemagick > #+TITLE: Minimal logic > > #+AUTHOR: Joseph Vidal-Rosset > > \begin{equation} > \neg A \to (A \to B) > \end{equation} This works perfectly fine for me with both dvipng (my default choice) and imagemagick. The problem may be in your LaTeX installation: what fonts are used etc.? What does the PDF or DVI for this LaTeX file: --8<---------------cut here---------------start------------->8--- % Created 2014-10-13 Mon 12:43 \documentclass{minimal} \begin{document} \begin{equation} \neg A \to (A \to B) \end{equation} % Emacs 24.4.50.1 (Org mode 8.3beta) \end{document} --8<---------------cut here---------------end--------------->8--- look like? -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-408-g39f5f0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: Math formatting in HTML export - The Org Manual Date: Mon, 13 Oct 2014 17:50:37 +0200 Message-ID: <8738asarzm.fsf@gmail.com> References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xdhtg-0003WF-1a for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 11:50:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xdhte-0001hw-Qw for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 11:50:55 -0400 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:45893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xdhte-0001hj-K4 for emacs-orgmode@gnu.org; Mon, 13 Oct 2014 11:50:54 -0400 Received: by mail-wi0-f174.google.com with SMTP id h11so4168492wiw.7 for ; Mon, 13 Oct 2014 08:50:53 -0700 (PDT) In-Reply-To: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> (Eric S. Fraga's message of "Mon, 13 Oct 2014 12:45:28 +0100") 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: Grant Rettke Cc: "Liste-emacs-orgmode@gnu.org" Le lun. 13 oct. 2014 =C3=A0 01:45:28 , Eric S Fraga = a envoy=C3=A9 ce message: > On Monday, 13 Oct 2014 at 09:45, Joseph Vidal-Rosset wrote: > > [...] > >> Here is a minimal document as example >> >> #+OPTIONS: tex:imagemagick >> #+TITLE: Minimal logic >> >> #+AUTHOR: Joseph Vidal-Rosset >> >> \begin{equation} >> \neg A \to (A \to B) >> \end{equation} > > This works perfectly fine for me with both dvipng (my default choice) > and imagemagick. The problem may be in your LaTeX installation: what > fonts are used etc.? I have just tested=20 and it works. I conclude that the problem comes from imagemagick.=20 But dvipng does not succeed to make png images of proofs via bussproofs.sty= .=20 For example, I do not succeed to transform this proof into a png image:=20 \begin{prooftree} \def\fCenter{\ \Rightarrow\ } \AxiomC{} \RightLabel{\scriptsize{Ax.}} \UnaryInf$A \to \bot, \bot \fCenter \bot$ \RightLabel{\scriptsize{$L\neg$def.}} \UnaryInf$ \neg A, \bot \fCenter \bot$ \RightLabel{\scriptsize{$R\neg$}} \UnaryInf$\bot \fCenter \neg \neg A$ \AxiomC{} \RightLabel{\scriptsize{Ax.}} \UnaryInf$A, \bot \fCenter \bot$ \RightLabel{\scriptsize{$R\neg$}} \UnaryInf$\bot \fCenter \neg A$ \RightLabel{\scriptsize{$R\land$}} \BinaryInf$\bot \fCenter \neg \neg A \land \neg A$ \end{prooftree} I succeeded also to do it with Gnus by adding #+LaTeX_HEADERS: \usepackage{bussproofs} on the top of the message, and no it does not no more... that's another problem...=20 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Math formatting in HTML export - The Org Manual Date: Tue, 14 Oct 2014 08:25:30 +0100 Message-ID: <87mw8zm7th.fsf@ucl.ac.uk> References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> <8738asarzm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xdwmg-0002A3-Vr for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 03:44:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdwmZ-0006vx-At for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 03:44:42 -0400 Received: from mail-db3on0141.outbound.protection.outlook.com ([157.55.234.141]:60832 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdwmZ-0006v0-2E for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 03:44:35 -0400 In-Reply-To: <8738asarzm.fsf@gmail.com> (Joseph Vidal-Rosset's message of "Mon, 13 Oct 2014 17:50:37 +0200") 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: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" , Grant Rettke Have a look at the following variable and note the SNIPPET argument: ,----[ C-h v org-latex-packages-alist RET ] | org-latex-packages-alist is a variable defined in `org.el'. | Its value is (("" "xcolor") | ("" "tikz") | ("" "listings") | ("version=3" "mhchem") | ("" "amsmath" t)) | | Original value was nil | | Documentation: | Alist of packages to be inserted in every LaTeX header. | | These will be inserted after `org-latex-default-packages-alist'. | Each element is either a cell or a string. | | A cell is of the format: | | ("options" "package" SNIPPET-FLAG) | | SNIPPET-FLAG, when non-nil, indicates that this package is also | needed when turning LaTeX snippets into images for inclusion into | non-LaTeX output. | | A string will be inserted as-is in the header of the document. | | Make sure that you only list packages here which: | | - you want in every file; | - do not conflict with the setup in `org-format-latex-header'; | - do not conflict with the default packages in | `org-latex-default-packages-alist'. | | You can customize this variable. `---- -- Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: Math formatting in HTML export - The Org Manual Date: Tue, 14 Oct 2014 19:23:03 +0200 Message-ID: References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> <8738asarzm.fsf@gmail.com> <87mw8zm7th.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04182620c2409f0505654576 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe5om-0008C1-OD for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 13:23:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xe5ol-00065C-Dp for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 13:23:28 -0400 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:36611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe5ol-00064l-4c for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 13:23:27 -0400 Received: by mail-wi0-f178.google.com with SMTP id h11so7536779wiw.17 for ; Tue, 14 Oct 2014 10:23:25 -0700 (PDT) In-Reply-To: <87mw8zm7th.fsf@ucl.ac.uk> 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: Joseph Vidal-Rosset , Grant Rettke , "Liste-emacs-orgmode@gnu.org" --f46d04182620c2409f0505654576 Content-Type: text/plain; charset=UTF-8 Thanks Eric. I have tested this solution that works with imagemagick and html export. I have added these lines in my init.el : ; Include the latex-exporter (require 'ox-latex) ;; Add minted to the defaults packages to include when exporting. ;(add-to-list 'org-latex-packages-alist '("" "minted")) ;; Tell the latex export to use the minted package for source ;; code coloration. (setq org-latex-listings 'minted) ;; Let the exporter use the -shell-escape option to let latex ;; execute external programs. ;; This obviously and can be dangerous to activate! (setq org-latex-pdf-process '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f")) and it works. But now it does not work in my Gnus if I want to include some png images of proofs... I have to deleted these "dangerous lines"... I do not understand why I need minted and shell-escape... Best wishes Jo. 2014-10-14 9:25 GMT+02:00 Eric S Fraga : > Have a look at the following variable and note the SNIPPET argument: > > ,----[ C-h v org-latex-packages-alist RET ] > | org-latex-packages-alist is a variable defined in `org.el'. > | Its value is (("" "xcolor") > | ("" "tikz") > | ("" "listings") > | ("version=3" "mhchem") > | ("" "amsmath" t)) > | > | Original value was nil > | > | Documentation: > | Alist of packages to be inserted in every LaTeX header. > | > | These will be inserted after `org-latex-default-packages-alist'. > | Each element is either a cell or a string. > | > | A cell is of the format: > | > | ("options" "package" SNIPPET-FLAG) > | > | SNIPPET-FLAG, when non-nil, indicates that this package is also > | needed when turning LaTeX snippets into images for inclusion into > | non-LaTeX output. > | > | A string will be inserted as-is in the header of the document. > | > | Make sure that you only list packages here which: > | > | - you want in every file; > | - do not conflict with the setup in `org-format-latex-header'; > | - do not conflict with the default packages in > | `org-latex-default-packages-alist'. > | > | You can customize this variable. > `---- > > > -- > Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) > --f46d04182620c2409f0505654576 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Eric.

I have= tested this solution that works with imagemagick and html export. I have a= dded these lines in my init.el :

; Include the latex-exporter
(r= equire 'ox-latex)
;; Add minted to the defaults packages to include = when exporting.
;(add-to-list 'org-latex-packages-alist '("= " "minted"))
;; Tell the latex export to use the minted p= ackage for source
;; code coloration.
(setq org-latex-listings 'm= inted)
;; Let the exporter use the -shell-escape option to let latex
= ;; execute external programs.
;; This obviously and can be dangerous to = activate!
(setq org-latex-pdf-process
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = '("xelatex -shell-escape -interaction nonstopmode -output-director= y %o %f"))

and it works.

But now it does no= t work in my Gnus if I want to include some png images of proofs... I have = to deleted these "dangerous lines"...

I do not unde= rstand why I need minted and shell-escape...

Best wishes
<= br>Jo.


2014-10-14 9:25 GMT+02:00 E= ric S Fraga <e.fraga@ucl.ac.uk>:
Have a look at the following variable and note the SNIPPET argument:=

,----[ C-h v org-latex-packages-alist RET ]
| org-latex-packages-alist is a variable defined in `org.el'.
| Its value is (("" "xcolor")
|=C2=A0 ("" "tikz")
|=C2=A0 ("" "listings")
|=C2=A0 ("version=3D3" "mhchem")
|=C2=A0 ("" "amsmath" t))
|
| Original value was nil
|
| Documentation:
| Alist of packages to be inserted in every LaTeX header.
|
| These will be inserted after `org-latex-default-packages-alist'.
| Each element is either a cell or a string.
|
| A cell is of the format:
|
|=C2=A0 =C2=A0 =C2=A0("options" "package" SNIPPET-FLAG)=
|
| SNIPPET-FLAG, when non-nil, indicates that this package is also
| needed when turning LaTeX snippets into images for inclusion into
| non-LaTeX output.
|
| A string will be inserted as-is in the header of the document.
|
| Make sure that you only list packages here which:
|
|=C2=A0 =C2=A0- you want in every file;
|=C2=A0 =C2=A0- do not conflict with the setup in `org-format-latex-header&= #39;;
|=C2=A0 =C2=A0- do not conflict with the default packages in
|=C2=A0 =C2=A0 =C2=A0`org-latex-default-packages-alist'.
|
| You can customize this variable.
`----


--
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)

--f46d04182620c2409f0505654576-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Math formatting in HTML export - The Org Manual Date: Tue, 14 Oct 2014 13:51:06 -0400 Message-ID: <87mw8y8rqt.fsf@alphaville.bos.redhat.com> References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> <8738asarzm.fsf@gmail.com> <87mw8zm7th.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe6Fv-0005j5-3M for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 13:51:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xe6Fk-0007JH-Eg for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 13:51:31 -0400 Received: from plane.gmane.org ([80.91.229.3]:42190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe6Fk-0007J0-7p for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 13:51:20 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xe6Fi-0001GA-Ku for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 19:51:18 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Oct 2014 19:51:18 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Oct 2014 19:51:18 +0200 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 Joseph Vidal-Rosset writes: > Thanks Eric. > > I have tested this solution that works with imagemagick and html export. I have added these lines in my init.el : > > ; Include the latex-exporter > (require 'ox-latex) > ;; Add minted to the defaults packages to include when exporting. > ;(add-to-list 'org-latex-packages-alist '("" "minted")) > ;; Tell the latex export to use the minted package for source > ;; code coloration. > (setq org-latex-listings 'minted) > ;; Let the exporter use the -shell-escape option to let latex > ;; execute external programs. > ;; This obviously and can be dangerous to activate! > (setq org-latex-pdf-process >       '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f")) > > and it works. > > But now it does not work in my Gnus if I want to include some png > images of proofs... I have to deleted these "dangerous lines"... > > I do not understand why I need minted and shell-escape... > I don't know why you need minted (I have not followed the conversation), but to use minted you *need* -shell-escape: minted requires running an external program (pygments), but tex does not like doing that for security reasons - the -shell-escape option gives tex permission to run such an external program. Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Math formatting in HTML export - The Org Manual Date: Tue, 14 Oct 2014 20:09:01 +0100 Message-ID: <87lhoitqnm.fsf@ucl.ac.uk> References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> <8738asarzm.fsf@gmail.com> <87mw8zm7th.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe7TB-0002ST-HG for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 15:09:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xe7T4-0000RE-20 for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 15:09:17 -0400 Received: from mail-db3on0132.outbound.protection.outlook.com ([157.55.234.132]:29814 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe7T3-0000Qi-QO for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 15:09:09 -0400 In-Reply-To: (Joseph Vidal-Rosset's message of "Tue, 14 Oct 2014 19:23:03 +0200") 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: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" On Tuesday, 14 Oct 2014 at 19:23, Joseph Vidal-Rosset wrote: [...] > But now it does not work in my Gnus if I want to include some png images of > proofs... I have to deleted these "dangerous lines"... Sorry, I missed this the first time around. What does gnus have to do with this? You were talking about exporting to HTML but never mentioned gnus in the original post. If you are trying to write an html based email, you should be looking at different functionality than exporting. Check out org-mime-htmlize, for instance. Exporting creates files which reference other files (for images). Messages are different. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-450-gbc9a58 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: Math formatting in HTML export - The Org Manual Date: Wed, 15 Oct 2014 07:54:47 +0200 Message-ID: References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> <8738asarzm.fsf@gmail.com> <87mw8zm7th.fsf@ucl.ac.uk> <87mw8y8rqt.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2400c2a95ed05056fc60b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeHYD-0000s7-QX for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 01:55:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeHYC-0004R6-S9 for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 01:55:09 -0400 Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:55659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeHYC-0004QB-Lp for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 01:55:08 -0400 Received: by mail-wg0-f50.google.com with SMTP id a1so516301wgh.9 for ; Tue, 14 Oct 2014 22:55:07 -0700 (PDT) In-Reply-To: <87mw8y8rqt.fsf@alphaville.bos.redhat.com> 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: Nick Dokos Cc: "Liste-emacs-orgmode@gnu.org" --001a11c2400c2a95ed05056fc60b Content-Type: text/plain; charset=UTF-8 2014-10-14 19:51 GMT+02:00 Nick Dokos : > I don't know why you need minted (I have not followed the conversation), > but to use minted you *need* -shell-escape: minted requires running an > external program (pygments), but tex does not like doing that for > security reasons - the -shell-escape option gives tex permission to run > such an external program. > Thanks for this explanatio Nick. I need minted, strangely, in order to get png images in html export. If I try to avoid the use of minted, the png images are corrupted... Best wishes Jo. --001a11c2400c2a95ed05056fc60b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= 2014-10-14 19:51 GMT+02:00 Nick Dokos <ndokos@gmail.com>:
=
I don't know why you need minted (I have not followed the c= onversation),
but to use minted you *need* -shell-escape: minted requires running an
external program (pygments), but tex does not like doing that for
security reasons - the -shell-escape option gives tex permission to run
such an external program.


Thanks for this explanatio Nick. I need minted, strangely,= in order to get png images in html export. If I try to avoid the use of mi= nted, the png images are corrupted...

Best wishes

Jo.
--001a11c2400c2a95ed05056fc60b-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: Math formatting in HTML export - The Org Manual Date: Wed, 15 Oct 2014 07:59:04 +0200 Message-ID: References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> <8738asarzm.fsf@gmail.com> <87mw8zm7th.fsf@ucl.ac.uk> <87lhoitqnm.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c28b4e76110b05056fd56f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeHcM-0001aC-Ia for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 01:59:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeHcL-0005cL-IR for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 01:59:26 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:46183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeHcL-0005cB-B8 for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 01:59:25 -0400 Received: by mail-wi0-f171.google.com with SMTP id em10so11930714wid.4 for ; Tue, 14 Oct 2014 22:59:24 -0700 (PDT) In-Reply-To: <87lhoitqnm.fsf@ucl.ac.uk> 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: Joseph Vidal-Rosset , "Liste-emacs-orgmode@gnu.org" --001a11c28b4e76110b05056fd56f Content-Type: text/plain; charset=UTF-8 2014-10-14 21:09 GMT+02:00 Eric S Fraga : > > But now it does not work in my Gnus if I want to include some png images > of > > proofs... I have to deleted these "dangerous lines"... > > Sorry, I missed this the first time around. What does gnus have to do > with this? You were talking about exporting to HTML but never mentioned > gnus in the original post. > > If you are trying to write an html based email, you should be looking at > different functionality than exporting. Check out org-mime-htmlize, for > instance. Exporting creates files which reference other files (for > images). Messages are different. Yes, I'm using precisely org-mime-htmlize with gnus when want to send messages with png images. But with minted in my setup (to export correctly html), the preview function does not work and then org-mime-htmlize fails... Again thanks ! Best wishes Jo. --001a11c28b4e76110b05056fd56f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= 2014-10-14 21:09 GMT+02:00 Eric S Fraga <e.fraga@ucl.ac.uk>:=
>= But now it does not work in my Gnus if I want to include some png images o= f
> proofs... I have to deleted these "dangerous lines"...

Sorry, I missed this the first time around.=C2=A0 What does gnus hav= e to do
with this?=C2=A0 You were talking about exporting to HTML but never mention= ed
gnus in the original post.

If you are trying to write an html based email, you should be looking at different functionality than exporting.=C2=A0 Check out org-mime-htmlize, f= or
instance.=C2=A0 Exporting creates files which reference other files (for images).=C2=A0 Messages are different.


Yes, I'm using precisely org-mime-htmlize with g= nus when want to send messages with png images. But with minted in my setup= (to export correctly html), the preview function does not work and then or= g-mime-htmlize fails...

Again than= ks !

Best wishes

Jo.
--001a11c28b4e76110b05056fd56f-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Math formatting in HTML export - The Org Manual Date: Wed, 15 Oct 2014 08:21:57 +0100 Message-ID: <871tq9ol0q.fsf@ucl.ac.uk> References: <878ukktcpz.fsf@pinto.chemeng.ucl.ac.uk> <8738asarzm.fsf@gmail.com> <87mw8zm7th.fsf@ucl.ac.uk> <87lhoitqnm.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeIuR-0001On-8I for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 03:22:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeIuJ-0002YR-Nh for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 03:22:11 -0400 Received: from mail-db3on0138.outbound.protection.outlook.com ([157.55.234.138]:26743 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeIuJ-0002YK-GB for emacs-orgmode@gnu.org; Wed, 15 Oct 2014 03:22:03 -0400 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: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain On Wednesday, 15 Oct 2014 at 07:59, Joseph Vidal-Rosset wrote: [...] > Yes, I'm using precisely org-mime-htmlize with gnus when want to send > messages with png images. But with minted in my setup (to export correctly > html), the preview function does not work and then org-mime-htmlize > fails... Interesting. The following has three LaTeX equations, one without any org LaTeX directives, one for inline use and one for LaTeX blocks. Only the first works. (please accept my apologies for sending an HTML formatted email to this list ;-) * test This is a test of the equations: \begin{equation} y = \sqrt{x} \end{equation} Alternatively, using LaTeX directives: first, the single line ~#+latex~ directive for an equation inline, say, #+LATEX: y = f(x) followed by a begin/end latex block: * summary The last one has disappeared completely. The second is there in the raw email but has not been translated. Only the first case works. The export engine must work differently when exporting as a string? It is indeed surprising that the whole begin/end latex block is removed from the raw text version, as you indicated in your OP. This behaviour does seem rather strange. Looking at org-mime.el, it is not obvious (to me) what is wrong. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-450-gbc9a58 --=-=-= Content-Type: multipart/related; boundary="==-=-=" --==-=-= Content-Type: text/html

Table of Contents

On Wednesday, 15 Oct 2014 at 07:59, Joseph Vidal-Rosset wrote:

[…]

> Yes, I'm using precisely org-mime-htmlize with gnus when want to send
> messages with png images. But with minted in my setup (to export correctly
> html), the preview function does not work and then org-mime-htmlize
> fails…

Interesting. The following has three LaTeX equations, one without any org LaTeX directives, one for inline use and one for LaTeX blocks. Only the first works.

(please accept my apologies for sending an HTML formatted email to this list ;-)

1 test

This is a test of the equations:

\begin{equation}
y = \sqrt{x}
\end{equation}

Alternatively, using LaTeX directives: first, the single line #+latex directive for an equation inline, say,

followed by a begin/end latex block:

2 summary

The last one has disappeared completely. The second is there in the raw email but has not been translated. Only the first case works. The export engine must work differently when exporting as a string? It is indeed surprising that the whole begin/end latex block is removed from the raw text version, as you indicated in your OP.

This behaviour does seem rather strange. Looking at org-mime.el, it is not obvious (to me) what is wrong.


Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-450-gbc9a58
--==-=-= Content-Type: image/png Content-ID: <_tmp_ltxpng_latex2910f8Z_c8b273a09cc52bc7773376bcf189a21d680017cb.png> Content-Disposition: inline; filename="latex2910f8Z_c8b273a09cc52bc7773376bcf189a21d680017cb.png" Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAegAAAATCAMAAABsrG5QAAAAWlBMVEX///8AAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAACxH1ioAAAAHXRSTlMARGa7iXYQ7yLdVDKrmc1OLg6vfl7fz78+nx5u j+Id7nYAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAHjSURBVGgF7VnbksIgDA3YO3Srot1W5f9/c0Oh jLpi5WGXOiYzWmhDCeeQkAJAlHDtJaodKb8XAix/L3s/19puezX28+6q8lJxU7ykRkqpEeg6a8HB XsZIe1gW2YDU0yCw25t+BzVq2/+g4uwgh47DK5m2cp48OKKhjwreghw6GXVxHR8dr57oCzLP+Abf kr2QZslphea8FTyXcT2T9n8isO1db57obg9FDmUFUDeLlojWqDQVsFI0mtKyRcCSKXTfrmtP9NAD K0QJUMzEyY0XdmeoxPmARAPkNTa4e0jVFSGg5tzLEw1msc4wDDdIdkgy5BWlmhzalKQvmRrJ6hAI EF2i67bhNZcJPYV169BmUOVymF/d2D/KoADRJmrX3CHxKHTLL3xYualQQGUaENcrnjqH6TMaDfSh e3vEGvLG9LT+BmwXWqDP4w+l0ZBjvOe0RgfAWsPt4XcyZu7wlsv5w/qxmV8SCufQQnLGs9yy/lib 7iZHwGZcJ7XXF3Uy1qiztenJEm0UGl05h7bq9L9yBEa31e3N7JFujlHb5GPPpJZmU4XkXRA43Z1i THXNIFva2+SoRPJGCKjrU0qA0WyJ8iabU+7wSJZmQrglPUmCwM0R9M3hdBJzqNM/Q2DKwdzbTfkH MtMPBq8mV1cAAAAASUVORK5CYII= --==-=-=-- --=-=-=--