all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How can I use xelatex with the new latex exporter?
@ 2012-11-08 12:33 Alan Schmitt
  2012-11-09  0:40 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Schmitt @ 2012-11-08 12:33 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I'm playing with the new latex exporter, and I'd like to use xelated
with it. I used to follow the instructions from worg
(http://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export), but
it seems that the hook org-export-latex-after-initial-vars-hook is not
used for the new exporter. Is there a similar hook I can use?

Thanks a lot,

Alan

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

* Re: How can I use xelatex with the new latex exporter?
  2012-11-08 12:33 How can I use xelatex with the new latex exporter? Alan Schmitt
@ 2012-11-09  0:40 ` Nicolas Goaziou
  2012-11-09  7:22   ` Suvayu Ali
  2012-11-09 11:36   ` Alan Schmitt
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2012-11-09  0:40 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Hello,

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> I'm playing with the new latex exporter, and I'd like to use xelated
> with it. I used to follow the instructions from worg
> (http://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export), but
> it seems that the hook org-export-latex-after-initial-vars-hook is not
> used for the new exporter. Is there a similar hook I can use?

Before using this machinery, is it enough to customize
`org-e-latex-pdf-process'?

To answer your question, there are only two hooks in the new exporter.
Any of them should do the job. For example
`org-export-before-parsing-hook'.

Regards,

-- 
Nicolas Goaziou

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

* Re: How can I use xelatex with the new latex exporter?
  2012-11-09  0:40 ` Nicolas Goaziou
@ 2012-11-09  7:22   ` Suvayu Ali
  2012-11-09 12:42     ` Alan Schmitt
  2012-11-09 11:36   ` Alan Schmitt
  1 sibling, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2012-11-09  7:22 UTC (permalink / raw)
  To: emacs-orgmode

On Fri, Nov 09, 2012 at 01:40:14AM +0100, Nicolas Goaziou wrote:
> Hello,
> 
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> 
> > I'm playing with the new latex exporter, and I'd like to use xelated
> > with it. I used to follow the instructions from worg
> > (http://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export), but
> > it seems that the hook org-export-latex-after-initial-vars-hook is not
> > used for the new exporter. Is there a similar hook I can use?
> 

I never understood that FAQ.  I have been using XeLaTeX for sometime now
with minimal configuration.

> Before using this machinery, is it enough to customize
> `org-e-latex-pdf-process'?
> 

This is pretty much what I do.


;;; XeLaTeX customisations
;; remove "inputenc" from default packages as it clashes with xelatex
(setf org-export-latex-default-packages-alist
      (remove '("AUTO" "inputenc" t) org-export-latex-default-packages-alist))

(add-to-list 'org-export-latex-packages-alist '("" "xltxtra" t))
;; commented for now as preferable to set per file for now
;; (add-to-list 'org-export-latex-packages-alist '("" "unicode-math" t))
;; (add-to-list 'org-export-latex-packages-alist
;; 	     "\\setmathfont{Linux Libertine O}" t) ; needed for unicode-math

;; org to latex customisations, -shell-escape needed for minted
(setq org-latex-to-pdf-process		; for regular export
      '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f")
      org-export-dispatch-use-expert-ui t ; non-intrusive export dispatch
      org-e-latex-pdf-process		; for experimental org-export
      '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"))


I do not use unicode-math anymore but the OP can try uncommenting some
of the lines above.

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: How can I use xelatex with the new latex exporter?
  2012-11-09  0:40 ` Nicolas Goaziou
  2012-11-09  7:22   ` Suvayu Ali
@ 2012-11-09 11:36   ` Alan Schmitt
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Schmitt @ 2012-11-09 11:36 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> I'm playing with the new latex exporter, and I'd like to use xelated
>> with it. I used to follow the instructions from worg
>> (http://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export), but
>> it seems that the hook org-export-latex-after-initial-vars-hook is not
>> used for the new exporter. Is there a similar hook I can use?
>
> Before using this machinery, is it enough to customize
> `org-e-latex-pdf-process'?

Yes, this works. This is what I added:

(setq org-e-latex-pdf-process 
      '("latexmk -pdflatex='xelatex --shell-escape' -pdf -quiet %f"))

(I need the "--shell-escape" to run minted)

Thanks a lot!

Alan

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

* Re: How can I use xelatex with the new latex exporter?
  2012-11-09  7:22   ` Suvayu Ali
@ 2012-11-09 12:42     ` Alan Schmitt
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Schmitt @ 2012-11-09 12:42 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

>> Before using this machinery, is it enough to customize
>> `org-e-latex-pdf-process'?
>> 
>
> This is pretty much what I do.
>
>
> ;;; XeLaTeX customisations
> ;; remove "inputenc" from default packages as it clashes with xelatex
> (setf org-export-latex-default-packages-alist
>       (remove '("AUTO" "inputenc" t) org-export-latex-default-packages-alist))
>
> (add-to-list 'org-export-latex-packages-alist '("" "xltxtra" t))
> ;; commented for now as preferable to set per file for now
> ;; (add-to-list 'org-export-latex-packages-alist '("" "unicode-math" t))
> ;; (add-to-list 'org-export-latex-packages-alist
> ;; 	     "\\setmathfont{Linux Libertine O}" t) ; needed for unicode-math
>
> ;; org to latex customisations, -shell-escape needed for minted
> (setq org-latex-to-pdf-process		; for regular export
>       '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
> 	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
> 	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f")
>       org-export-dispatch-use-expert-ui t ; non-intrusive export dispatch
>       org-e-latex-pdf-process		; for experimental org-export
>       '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
> 	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
> 	"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
>
>
> I do not use unicode-math anymore but the OP can try uncommenting some
> of the lines above.

Thank you, this is most helpful.

Alan

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

end of thread, other threads:[~2012-11-09 12:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 12:33 How can I use xelatex with the new latex exporter? Alan Schmitt
2012-11-09  0:40 ` Nicolas Goaziou
2012-11-09  7:22   ` Suvayu Ali
2012-11-09 12:42     ` Alan Schmitt
2012-11-09 11:36   ` Alan Schmitt

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.