[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Loading several latex classes for ox-latex
From: |
Nicolas Richard |
Subject: |
Re: [O] Loading several latex classes for ox-latex |
Date: |
Wed, 10 Jul 2013 15:33:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Julien Cubizolles <address@hidden> writes:
> I tried the following:
> --8<---------------cut here---------------start------------->8---
> (eval-after-load 'ox-latex
> (progn '(add-to-list 'org-latex-classes
> '("mpsi_beamer" "\\documentclass{mpsi_beamer}\n
> [NO-DEFAULT-PACKAGES]"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
> ))
> '(add-to-list 'org-latex-classes
> '("mpsi" "\\documentclass[cours,Version,colonne]{mpsi}"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ))
> ))
> --8<---------------cut here---------------end--------------->8---
>
> but only the second one (mpsi) is loaded.
that's because your (progn) is unquoted and thus evaluated at the same
time as eval-after-load, i.e. it returns its last value (which is the
second add-to-list form) and that is what is being added to the
eval-after-load list. What you want is the whole (progn) added there, so
an easy fix probably is to say '(progn ...) *and* remove the quotes
around the calls to add-to-list.
--
Nico.