> On Tue, Sep 08, 2009 at 02:41:17PM -0600, Peter Jones wrote: > > I recently started exporting some org headlines to LaTeX. I poked > > around but couldn't find the best way to customize the output, e.g. add > > a call to hypersetup. The best I came up with was: > > > > > > But by doing that, I would have to update this variable when pulling > > down a new org version that might have changed the default value of > > org-export-latex-classes. > > > > Is there a better way to do stuff like insert a call to hypersetup? > > Russell Adams <rlad...@adamsinfoserv.com> wrote:
> That's where the export header comes in handy. > > In .emacs: > > > ,---- > > | (setq org-export-latex-classes > > | '(("article" > > | "\\documentclass[11pt]{article}" > > | ("\\section{%s}" . "\\section*{%s}") > > | ("\\subsection{%s}" . "\\subsection*{%s}") > > | ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > > | ("\\paragraph{%s}" . "\\paragraph*{%s}") > > | ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) > > `---- > > At the top of your .org file: > > #+LATEX_HEADER \\usepackage[utf8]{inputenc} > #+LATEX_HEADER \\usepackage[T1]{fontenc} > #+LATEX_HEADER \\usepackage{graphicx} > #+LATEX_HEADER \\usepackage{longtable} > #+LATEX_HEADER \\usepackage{soul} > #+LATEX_HEADER \\usepackage{hyperref} > #+LATEX_HEADER \\hypersetup{ > #+LATEX_HEADER hyperindex=true, > #+LATEX_HEADER plainpages=false, > #+LATEX_HEADER colorlinks=true, > #+LATEX_HEADER linkcolor=black > #+LATEX_HEADER } > Two things: o It needs colons after the LATEX_HEADER and single backslashes: #+LATEX_HEADER: \hypersetup{ etc. o The \usepackage commands are already (mostly) provided by the standard definition of org-export-latex-classes. The longtable \usepackage can be added by an option: #+ATTR_LaTeX: longtable Thanks, Nick _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode