emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error org export to pdf when latex letter class has been added to org-la


From: M. Pger
Subject: error org export to pdf when latex letter class has been added to org-latex-classes
Date: Tue, 13 Sep 2022 15:54:00 +0000


Dear All,

I've told Org about the letter class with the following in my init file:
```
(with-eval-after-load 'ox-latex
  (add-to-list 'org-latex-classes '("letter" "\\documentclass{letter}"))
  )
```

After that I can create a org document containing e.g.:
```
#+latex_class: letter
#+latex_header: \signature{M. Pger}
#+latex_header: \address{42 My Street \\ My Town}
#+latex: \begin{letter}{Org mailing-list \\ 42 GNU Street \\ GNU Town}
#+latex: \date{September 2022}
#+latex: \opening{Dear Members of the Org mailing-list,}

Here is the text of the letter.

#+latex: \closing{Yours faithfully,}
#+latex: \end{letter}

```

When I export it using C-c C-e l o, an error appears:
```
(/usr/share/texlive/texmf-dist/tex/latex/natbib/natbib.sty

! LaTeX Error: Environment thebibliography undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                 
l.1063 \renewenvironment{thebibliography}
                                         [1]{%
?
! Emergency stop.
 ...                                              
                                                 
l.1063 \renewenvironment{thebibliography}
                                         [1]{%
!  ==> Fatal error occurred, no output PDF file produced!
```

In order to have a pdf output, I can use -interaction=nonstopmode​  in the org-latex-pdf-process​, but of course the error is still there (but now I have a pdf, which is good). Exporting from org, the error is there whenever I use latexmk​ (with pdflatex​) or directly pdflatex​.

However, there is no error when creating such a letter from a .tex file in Auctex (which appears to also use pdflatex​ as the compiler).

Any thoughts?

Best,

M


reply via email to

[Prev in Thread] Current Thread [Next in Thread]