From: "M. Pger" <mpger@protonmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
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 [thread overview]
Message-ID: <UjnDBpZJ77FdrrCGU5aLjNgcnf2IIg8ww6814JkjtgWvQmpmAamiJyg62pjz00UCxRaeIoQrr6Cvr8--hQJVh189e3iMlnlI229xPv68Dns=@protonmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 5658 bytes --]
next reply other threads:[~2022-09-13 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 15:54 M. Pger [this message]
2022-09-13 17:55 ` error org export to pdf when latex letter class has been added to org-latex-classes Juan Manuel Macías
2022-09-13 19:59 ` M. Pger
2022-09-13 20:15 ` Juan Manuel Macías
2022-09-14 2:53 ` Ihor Radchenko
2022-09-15 7:07 Pedro Andres Aranda Gutierrez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='UjnDBpZJ77FdrrCGU5aLjNgcnf2IIg8ww6814JkjtgWvQmpmAamiJyg62pjz00UCxRaeIoQrr6Cvr8--hQJVh189e3iMlnlI229xPv68Dns=@protonmail.com' \
--to=mpger@protonmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).