From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scot Becker Subject: Re: trying to get xetex working with org-mode Date: Fri, 13 Aug 2010 13:50:07 +0100 Message-ID: References: <4C64ED67.10700@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=42622 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjtiP-0000Qj-CW for emacs-orgmode@gnu.org; Fri, 13 Aug 2010 08:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjtiO-0003C4-78 for emacs-orgmode@gnu.org; Fri, 13 Aug 2010 08:50:29 -0400 Received: from mail-qy0-f176.google.com ([209.85.216.176]:42825) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjtiO-0003Br-2r for emacs-orgmode@gnu.org; Fri, 13 Aug 2010 08:50:28 -0400 Received: by qyk34 with SMTP id 34so3090849qyk.0 for ; Fri, 13 Aug 2010 05:50:27 -0700 (PDT) In-Reply-To: <4C64ED67.10700@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christian Wittern Cc: Org Mode Mailing List 2010/8/13 Christian Wittern >=A0There are some more lines I did not ask for and do not want, like for > example the \usepackage[utf8]{inputenc} which does not work with XeTeX. > Now the number of possible relevant variables etc is just too complex for= me > to understand. =A0I would appreciate if some kind soul would explain to m= e how > to trim this down to use only the packages I need. Ain't that the truth. The new LaTeX header system is very flexible, but it multiplies the places you can put header stuff, and because of the way XeLaTeX headers are structured, not all of them work. This is what I do.=A0 The following is a little hastily written.=A0 I'm happy to come back to anything that doesn't make sense. First, I set org-export-latex-classes like so. The relevant stanzas are 5-7, staring with "mythesis" Note that I explicitly exclude ORG's default set of loaded packages, so i can include my own set. Also note that it's a pretty small header. For some reason I couldn't get things to work if I put all of the XeTeX header stuff in there, nor could I get it to work by putting in a bunch of #+Latex_header lines (or whatever their syntax is). (setq org-export-latex-classes '(("article" "\\documentclass[11pt, a4paper]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt, a4paper]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("beamer" "\\documentclass{beamer}" org-beamer-sectioning) ;; Here starts my personal latex classes ;; use them with: #+LaTeX_CLASS: mythesis ("mythesis" "%!TEX TS-program =3D xelatex\n%!TEX encoding =3D UTF-8 Unicode\n\\documentclass[12pt,oneside,a4paper]{book}\n\\usepackage{fontspec= }\n\\usepackage{xunicode}\n\\usepackage{xltxtra}\n\n% Load My Thesis Defaults\n\\input{/home/scot/lin/tex/thesis-header.tex}\n% Don't Load Org's standard list for this class\n[NO-DEFAULT-PACKAGES]\n\\defaultfontfeatures{Scale=3DMatchLowercase,= Mapping=3Dtex-text} % converts LaTeX specials (``quotes'' --- dashes etc.) to unicode\n\\setromanfont{Gentium}\n\\setsansfont{Liberation Sans} %change this, if you even use it." ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("mychapter" "%!TEX TS-program =3D xelatex\n%!TEX encoding =3D UTF-8 Unicode\n\\documentclass[12pt,oneside,a4paper]{book}\n\\usepackage{fontspec= }\n\\usepackage{xunicode}\n\\usepackage{xltxtra}\n\n% Load My Thesis Defaults\n\\input{/home/scot/lin/tex/thesis-header.tex}\n% Don't Load Org's standard list for this class\n[NO-DEFAULT-PACKAGES]\n\\defaultfontfeatures{Scale=3DMatchLowercase,= Mapping=3Dtex-text} % converts LaTeX specials (``quotes'' --- dashes etc.) to unicode\n\\setromanfont{Gentium}\n\\setsansfont{Liberation Sans} %change this, if you even use it." ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("mytextchunk" "%!TEX TS-program =3D xelatex\n%!TEX encoding =3D UTF-8 Unicode\n\\documentclass[12pt,oneside,a4paper]{article}\n\\usepackage{fonts= pec}\n\\usepackage{xunicode}\n\\usepackage{xltxtra}\n\n% Load My Thesis Defaults\n\\input{/home/scot/lin/tex/thesis-header.tex}\n% Don't Load Org's standard list for this class\n[NO-DEFAULT-PACKAGES]\n\\defaultfontfeatures{Scale=3DMatchLowercase,= Mapping=3Dtex-text} % converts LaTeX specials (``quotes'' --- dashes etc.) to unicode\n\\setromanfont{Gentium}\n\\setsansfont{Liberation Sans} %change this, if you even use it." ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) Then I have the following in my thesis-header.tex file. % Standard org stuff which I have to include by hand % since I didn't want the other (font handling, entities) bits: \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} %\usepackage{soul} \usepackage{hyperref} \tolerance=3D1000 That seems to produce a header that works with xetex. I haven't yet set org up to run xelatex automatically, but that's possible = too. Scot