I would like to create this Latex template in org-mode :
\documentclass[french, 11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[hidelinks]{hyperref}
\usepackage[ddmmyyyy]{datetime}
\usepackage{microtype}
\usepackage{antiqua}
\author{My Name}
\date{\today}
\renewcommand{\contentsname}{Table des matières}
So I have added this to my .emacs in order to not have any of the default packages, just the one I want, based on what I saw on this tutorial :
(require 'ox-latex)
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes
'("koma-article"
"\documentclass[french, 11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[hidelinks]{hyperref}
\usepackage[ddmmyyyy]{datetime}
\usepackage{microtype}
\usepackage{antiqua}
\author{My Name}
\date{\today}
\renewcommand{\contentsname}{Table des matières}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
So that when I want to create a new document in org-mode I just have to put :
#+TITLE: My Title
#+LaTeX_CLASS: koma-article
However when I try to compile a document I get :Unknown LaTeX class 'koma-article'
. I am not sure what I'm doing wrong here. Is there a way to load only these packages without having to specify then in the buffer using #+LATEX_HEADER: \usepackage
?
\\documentclass
,\\usepackage
. Otherwise you're going to end up with an error in youradd-to-list
call.org-latex-classes
withC-h v org-latex-classes RET
. As @Zeta points out, you are probably not adding the entry.