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