I am trying to export this small example from org to Latex. However, it is working only for the article class. With report or book, it produces the following error: Unknown LaTeX class report or Unknown LaTeX class book

My org file:

#+TITLE: My title
#+AUTHOR: My name

#+LaTeX_CLASS: report
#+LaTeX_CLASS_OPTIONS: [12pt,a4paper,oneside,draft]

* Introduction
** abc
 cuc uewoefh fh wf w fhwiufwifwuifwj  fijw

* Conclusion
sdjsds dsodjisodsod j

I've already checked the org source file (ox-latex.el) book and report are correctly defined. Any idea about what is missing?

  • Your example is working without any problems on my system. Is it working if you try to directly use report or book classes without org? – andrej Nov 20 at 9:33
  • Yes, I can compile report or book classes directly in latex. I am using org 9.1.7 and emacs 25.2.2. – GP. Nov 20 at 11:16
  • checked with emacs 24.5.1 and org 8.2.10 (and also with emacs 27.0.50 and org 9.1.14) both is working fine for me. What is the value of the variable. Have you changed the value of the variable org-latex-classes somewhere in your config? Try reproducing the same with emacs -Q. – andrej Nov 20 at 11:25
  • You are right. It was an issue in my init.el file. Thank you @andrej – GP. Nov 20 at 11:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.