I am trying to use tufte-book document class in org-mode. But for some reason, org-mode doesn't let me use it and says it is unrecognized. So I am going to the resulting .tex file and manually changing article
to tufte-book
. But doing this everytime got worrysome. So I want a way to make org-mode recognize tufte-book. I looked for the manual and found something about org-article
class but couldn't make much sense out of it for my own problem.
Add a comment
|
2 Answers
By default org-mode
only knows about the article
, report
and book
classes. To teach it a new one you have to add an entry to it to org-latex-classes
. I'm not familiar with tufte-book
but most of the time it suffices to copy the existing values and just change the \documentclass
part. Adding something like:
(add-to-list 'org-latex-classes
'("tufte-book"
"\\documentclass{tufte-book}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
to your config file should enable the class
-
Rather than adding this to the config file, it's also possible to use 'customize-variable'. The wizard may make setting these configurations a bit easier. Commented Jul 5, 2020 at 18:18
-
For some reason I can't get this to work as stated (I'm using straight-use-package)... I think it may have something to do with the order things are loaded. Custom does make it work though. Weird... Commented Oct 5, 2021 at 21:09
-
-
Yeah, not good terminology. By 'wizard' I just meant the 'customize-variable' interface. Commented Mar 10, 2022 at 22:02