emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: empty LaTeX export template
Date: Tue, 11 Jun 2013 15:01:36 +0200	[thread overview]
Message-ID: <87k3m0ztqn.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: 20130611121420.GA18792@kuru.dyndns-at-home.com

Suvayu Ali <fatkasuvayu+linux@gmail.com> 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

  reply	other threads:[~2013-06-11 13:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11  9:31 empty LaTeX export template Andreas Leha
2013-06-11 12:14 ` Suvayu Ali
2013-06-11 13:01   ` Andreas Leha [this message]
2013-06-13  7:57     ` Eric S Fraga
2013-06-13 13:47       ` Rasmus
2013-06-13 16:10         ` Andreas Leha
2013-06-13 18:16           ` Rasmus
2013-06-13 20:58             ` Andreas Leha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3m0ztqn.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).