emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to include a very complicated latex head
@ 2012-03-21  9:00 FengShu
  2012-03-21 10:51 ` Alan Schmitt
  2012-03-21 12:52 ` Nick Dokos
  0 siblings, 2 replies; 3+ messages in thread
From: FengShu @ 2012-03-21  9:00 UTC (permalink / raw)
  To: emacs-orgmode


I want to set the latex-head for latex exporting, I use 
*org-export-latex-append-header*,but it seem not used by
*org-preview-latex-fragment* . is there any other way?
simple way?  

#+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={AR PL UKai CN}]{AR PL UMing CN}% 文鼎宋体和楷书
  \\setCJKsansfont{WenQuanYi Zen Hei}% 文泉驿的黑体
  \\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

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

end of thread, other threads:[~2012-03-21 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21  9:00 How to include a very complicated latex head FengShu
2012-03-21 10:51 ` Alan Schmitt
2012-03-21 12:52 ` Nick Dokos

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).