The problem is that you specify \documentclass
as a #+LATEX_HEADER
in your setup file. Instead, you should specify it in two pieces, using #+LATEX_CLASS
and #+LATEX_CLASS_OPTIONS
[1]:
#+OPTIONS: toc:nil
#+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [11pt]
#+LATEX_HEADER: \input{../header.tex}
#+KEYWORDS: orgmode pdf latex
#+LANGUAGE: en
After that, you don't have to worry about zeroing out the default preamble. It will consist of \usepackage
declarations that will load the packages into TeX's memory, but if you don't use them, they'll just sit there, bothering noone.
If you really want to zero it out, overriding the article
class in org-latex-classes
is indeed the way to go, but I suggest you don't go there unless you really have to.
Finally, in order to impose a new title structure, you can either redefine \maketitle
in your own header.tex
and leave it at that. But since you seem to want your own command \psetheader
, then you can redefine the variable org-latex-title-command
whose default value is "\\maketitle"
(remember that backslashes have to be escaped with another backslash in an elisp string). Use customize preferably (or set it in your init file: (setq org-latex-title-command "\\psetheader")
"\psetheader"). Assuming ). Assuming\psetheader
\psetheader works like works like\maketitle
\maketitle, it does NOT go in the preamble, so you don't add it as a , it does *NOT* go in the preamble: it has to be inserted right after the #+LATEX_HEADER
\begin{document} in your setup file: it has to be inserted right after the . Redefining the \begin{document}
org-latex-title-command`. Redefining the org-latex-title-command
is the way to accomplish that.
[1] See also LaTeX header and sectioning structure for a specific example.