From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: empty LaTeX export template Date: Tue, 11 Jun 2013 15:01:36 +0200 Message-ID: <87k3m0ztqn.fsf@med.uni-goettingen.de> References: <87obbdyow4.fsf@med.uni-goettingen.de> <20130611121420.GA18792@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmOCw-0001tV-SZ for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 09:01:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmOCt-0004Mb-Ms for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 09:01:54 -0400 Received: from plane.gmane.org ([80.91.229.3]:48528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmOCt-0004ML-Ga for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 09:01:51 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UmOCs-0000tq-3Q for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 15:01:50 +0200 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Jun 2013 15:01:50 +0200 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Jun 2013 15:01:50 +0200 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 Suvayu Ali writes: > On Tue, Jun 11, 2013 at 11:31:39AM +0200, Andreas Leha wrote: >> >> So I'd like to ask: Is there a possibility to get a really empty LaTeX >> export that reads everything (including the documentclass) from the >> #+LATEX_HEADER ? >> >> The reason for this is, that many journals/conferences come with their >> own LaTeX template (if I am lucky, that is). It would be very >> convenient, if I could just yank the provided header into my *.org >> file (and prefix with #+LATEX_HEADER). > > I think you can just define a minimal class in org-latex-classes; > something like > > \documentclass{article} > [NO-DEFAULT-PACKAGES] > [NO-PACKAGES] > [EXTRA] > > Then none of the packages listed in org-latex-default-packages-alist and > org-latex-packages-alist are included, and only the > #+LATEX_HEADER(_EXTRA) keywords are considered. > > Hope this helps, Hi Suvayu, this did help, indeed. Thanks a lot. I did not think it was that easy. I found, that I can just omit the documentclass from the org-latex-classes. So, now I have: --8<---------------cut here---------------start------------->8--- (add-to-list 'org-latex-classes '("bare" " \[NO-DEFAULT-PACKAGES] \[NO-PACKAGES] \[EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) --8<---------------cut here---------------end--------------->8--- This should work in most cases. To use this I do: --8<---------------cut here---------------start------------->8--- #+OPTIONS: toc:nil author:nil skip:nil #+LATEX_CLASS: bare #+LATEX_HEADER: % everything from the template --8<---------------cut here---------------end--------------->8--- One problem remains, though: orgmode keeps messing with the title. I can, of course, set the title through #+TITLE: but I would prefer to set it through some #+LATEX_HEADER as the templates often require their own title setting directives. So, my follow-up question is: How can I get orgmode to not fiddle with the title in a LaTeX export? Regards, Andreas