Your init file defines a
notes class that can be used by org when exporting to LaTeX:
It works fine, in the sense that it produces a latex output that starts out like this:
But then, the org exporter calls
xelatex or something else depending on your setup) to process the LaTeX file. And guess what:
pdflatex chokes because there is no
notes.cls class file.
pdflatex returns an error and org duly reports it. IOW, this is a problem that LaTeX encounters; the org exporter is just the bearer of the bad news.
Note that in your second link, the author defines a class
bjmarticle that can be
used with the
#+LATEX_CLASS directive in the org file, but that is defined in terms of the standard
article LaTeX class:
so the LaTeX file that is produced starts with
which causes no problems: the LaTeX processor knows about the
So you either have to define your org-mode
notes class in terms of a LaTeX class that exists on your system or install a
notes class into your LaTeX installation
(assuming that such a class exists).
BTW, unless your org mode installation is really old, you need
org-latex in your init file:
The blog posts you found are from 2011 and 2015 resp. and
org mode has changed substantially since then. Because of that, it's always a good idea to report your version - just do:
and add it to your question.
EDIT: Here are some debugging hints:
- If you are on Linux (or some sort of Unix system), then
kpsewhich can tell you whether a LaTeX class exists on your system:
$ kpsewhich article.cls
$ kpsewhich notes.cls
I don't know if that's available on Windows.
- When you export an org file
foo.org to PDF, a LaTeX file
foo.tex is produced. You can try to process that file on the command line and see if you get errors:
You might need to add the
--shell-escape option, depending on your setup:
pdflatex --shell-escape foo.tex
- When the exporter tries to export to PDF, the output of the LaTeX processor ends up in an emacs buffer called
*Org PDF LaTeX Output* which you can visit with
C-x b. That's another way to see whether there are errors in the LaTeX processing.