From mboxrd@z Thu Jan 1 00:00:00 1970 From: FengShu Subject: How to include a very complicated latex head Date: Wed, 21 Mar 2012 17:00:24 +0800 Message-ID: <87y5qu2us7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAHOO-0006Xj-Dr for emacs-orgmode@gnu.org; Wed, 21 Mar 2012 04:59:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAHOJ-0006Ns-O8 for emacs-orgmode@gnu.org; Wed, 21 Mar 2012 04:59:39 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:56560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAHOJ-0006NT-Ca for emacs-orgmode@gnu.org; Wed, 21 Mar 2012 04:59:35 -0400 Received: by iajr24 with SMTP id r24so1562354iaj.0 for ; Wed, 21 Mar 2012 01:59:32 -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: emacs-orgmode@gnu.org I want to set the latex-head for latex exporting, I use=20 *org-export-latex-append-header*,but it seem not used by *org-preview-latex-fragment* . is there any other way? simple way?=20=20 #+begin_latex \ifxetex % xelatex \usepackage[xetex]{hyperref} \else \ifpdf % pdflatex \usepackage[pdftex,unicode]{hyperref} \else % dvipdfmx or dvips \usepackage[dvipdfmx,unicode]{hyperref} %\usepackage[ps2pdf,unicode]{hyperref} \fi \fi \ifxetex\else\ifpdf\else % pdftex 3.1415926-1.40.10-2.2 has trouble with it \InputIfFileExists{zhwinfonts.tex}{}{} \fi\fi #+end_latex #+begin_src emacs-lisp (setq org-export-latex-append-header " \\ifxetex % xelatex \\usepackage[hyperref,UTF8,nofonts]{ctex} \\setCJKmainfont[ItalicFont=3D{AR PL UKai CN}]{AR PL UMing CN}% =E6=96=87= =E9=BC=8E=E5=AE=8B=E4=BD=93=E5=92=8C=E6=A5=B7=E4=B9=A6 \\setCJKsansfont{WenQuanYi Zen Hei}% =E6=96=87=E6=B3=89=E9=A9=BF=E7=9A=84= =E9=BB=91=E4=BD=93 \\setCJKmonofont{WenQuanYi Zen Hei} \\usepackage[xetex]{hyperref} \\else \\ifpdf % pdflatex \\usepackage[pdftex,unicode]{hyperref} \\else % dvipdfmx or dvips \\usepackage[dvipdfmx,unicode]{hyperref} %\\usepackage[ps2pdf,unicode]{hyperref} \\fi \\fi \\ifxetex\\else\\ifpdf\\else % pdftex 3.1415926-1.40.10-2.2 has trouble with it \\InputIfFileExists{zhwinfonts.tex}{}{} \\fi\\fi ") #+end_src