* Re: #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
@ 2024-01-18 6:45 Pedro Andres Aranda Gutierrez
2024-01-18 12:19 ` Ihor Radchenko
0 siblings, 1 reply; 8+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-18 6:45 UTC (permalink / raw)
To: Org Mode List, Ihor Radchenko
[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]
Hi Just to document this discussion a bit more:
Ihor writes:
>Horst Leps <horstleps@outlook.de> writes:
>
>> #+latex_class: koma-article
>
>This is non-standard.
>What is your value of org-latex-classes?
There is a translation from koma-article to scrartcl in the
org-latex-classes, so that is not the problem.
>> Makes:
>> ...
>> \usepackage[germanb]{babel}
>> ...
>> \usepackage[greek,german]{babel}
>> ...
>> -------------------
>>
>> ! LaTeX Error: Option clash for package babel.
>> -------------------
>>
>> Only one latex run. Tableofconts Table remains empty.
>>
>> Supposition:
>>
>> 1. The Latex source contains {babel} twice, but only once is allowed.
>
>ox-latex tries hard to not duplicate babel. I am unable to reproduce
>duplication with your file (but with #+latex_class: koma-article removed)
Despite this, there is a repetition, and the clash is because ox-latex
wants ngerman wiith
#+language: de
while Horst wants to use germanb. The clash is between what ox-latex
generates and what Horst tries to add with #+LATEX_HEADER:
Actually, he also needs greek and for that I have recommended to customise
variables so that fontenc is "LGR,T1" and the parameters for babel are
"greek,AUTO", instead of trying to add a #+LATEX_HEADER:
\usepackage[LGR,T1]fontenc, because that also generates a package
option clash.
That is something we might need to explore more, if/when people need/want
to use pdflatex instead of luatex or xelatex.
>> 2. There is an error in my Orgmode code because it exports {babel} once
>> too many
>
>Does the problem persist without #+latex_class: koma-article?
Once again, yes, because it is mainly a matter of #+language.
I think we need the following
1) more docs on #+language
2) more thought on multilingual documents (#+language: gr,de)
3) more though on documents with multiple font encodings.
Best, /PA
--
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet
[-- Attachment #2: Type: text/html, Size: 2912 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
2024-01-18 6:45 #+LATEX_HEADER: \usepackage[greek,german]{babel} ?? Pedro Andres Aranda Gutierrez
@ 2024-01-18 12:19 ` Ihor Radchenko
0 siblings, 0 replies; 8+ messages in thread
From: Ihor Radchenko @ 2024-01-18 12:19 UTC (permalink / raw)
To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List
Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>>ox-latex tries hard to not duplicate babel. I am unable to reproduce
>>duplication with your file (but with #+latex_class: koma-article removed)
>
> Despite this, there is a repetition, and the clash is because ox-latex
> wants ngerman wiith
> #+language: de
> while Horst wants to use germanb. The clash is between what ox-latex
> generates and what Horst tries to add with #+LATEX_HEADER:
>
> Actually, he also needs greek and for that I have recommended to customise
> variables so that fontenc is "LGR,T1" and the parameters for babel are
> "greek,AUTO", instead of trying to add a #+LATEX_HEADER:
> \usepackage[LGR,T1]fontenc, because that also generates a package
> option clash.
>
> That is something we might need to explore more, if/when people need/want
> to use pdflatex instead of luatex or xelatex.
I doubt that we can easily catch option clashes like this.
People can customize things arbitrarily with #+latex_header, and we
cannot catch all the possible problems.
What we might improve is displaying compilation errors in a popup buffer
rather than almost-invisible message in the echo area.
>>> 2. There is an error in my Orgmode code because it exports {babel} once
>>> too many
>>
>>Does the problem persist without #+latex_class: koma-article?
> Once again, yes, because it is mainly a matter of #+language.
> I think we need the following
> 2) more thought on multilingual documents (#+language: gr,de)
> 3) more though on documents with multiple font encodings.
Agree.
For multiple languages, see the discussion in
https://list.orgmode.org/orgmode/878r9t7x7y.fsf@posteo.net/
> 1) more docs on #+language
If you have ideas how to improve the manual, feel free to share them.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Tableofcontents
@ 2024-01-12 10:24 Horst Leps
2024-01-12 16:53 ` Tableofcontents Tory S. Anderson
0 siblings, 1 reply; 8+ messages in thread
From: Horst Leps @ 2024-01-12 10:24 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
(I use Emacs 28, Mac-Mini Apple M2, Sonoma 14.2.1)
Since a few days: Orgmode export to Latex only creates one Latex run, so that the table of contents remains empty and no longer shows any sections. - What to do? Horst
[-- Attachment #2: Type: text/html, Size: 1958 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tableofcontents
2024-01-12 10:24 Tableofcontents Horst Leps
@ 2024-01-12 16:53 ` Tory S. Anderson
2024-01-13 12:27 ` Tableofcontents Ihor Radchenko
0 siblings, 1 reply; 8+ messages in thread
From: Tory S. Anderson @ 2024-01-12 16:53 UTC (permalink / raw)
To: Horst Leps; +Cc: emacs-orgmode@gnu.org
Horst Leps <horstleps@outlook.de> writes:
> (I use Emacs 28, Mac-Mini Apple M2, Sonoma 14.2.1)
> Since a few days: Orgmode export to Latex only creates one Latex run, so that the table of contents remains empty and no longer shows any sections. -
> What to do? Horst
I don't run the cutting-edge org, but I often have to run my export twice to get things like page numbers correct. Maybe it's not ideal, but if you run the export a second time does it change the result?
- Tory
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tableofcontents
2024-01-12 16:53 ` Tableofcontents Tory S. Anderson
@ 2024-01-13 12:27 ` Ihor Radchenko
2024-01-16 19:12 ` #+LATEX_HEADER: \usepackage[greek,german]{babel} ?? Horst Leps
0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2024-01-13 12:27 UTC (permalink / raw)
To: Tory S. Anderson; +Cc: Horst Leps, emacs-orgmode@gnu.org
webdev@toryanderson.com (Tory S. Anderson) writes:
> I don't run the cutting-edge org, but I often have to run my export twice to get things like page numbers correct. Maybe it's not ideal, but if you run the export a second time does it change the result?
When available, Org mode uses latexmk, which takes care about running
LaTeX as many times as necessary.
In this particular case, latexmk is used. The problem is with LaTeX
throwing critical errors. Critical enough to not produce pdf in one of
the iterations.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 8+ messages in thread
* #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
2024-01-13 12:27 ` Tableofcontents Ihor Radchenko
@ 2024-01-16 19:12 ` Horst Leps
2024-01-16 19:27 ` Ihor Radchenko
2024-01-16 19:46 ` Juan Manuel Macías
0 siblings, 2 replies; 8+ messages in thread
From: Horst Leps @ 2024-01-16 19:12 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hi,
------------------------------
#+latex_class: koma-article
#+TITLE: Zu einer aktuellen ACCCC
#+SUBTITLE: Der Klassiker und einige moderne und aktuelle Texte
#+DATE: \today
#+AUTHOR: HL
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[LGR,T1]{fontenc}
#+LATEX_HEADER: \usepackage[greek,german]{babel}
#+latex: \newpage
Ach, unsere Freunde die Griechen:
* Otto
Abc
* Emil
Ganz links
-------------
Makes:
-------------
% Created 2024-01-16 Tue 20:00
% Intended LaTeX compiler: pdflatex
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage[germanb]{babel}
\usepackage[utf8]{inputenc}
\usepackage[LGR,T1]{fontenc}
\usepackage[greek,german]{babel}
\author{HL}
\date{\today}
\title{Zu einer aktuellen ACCCC\\\medskip
\large Der Klassiker und einige moderne und aktuelle Texte}
\hypersetup{
pdfauthor={HL},
pdftitle={Zu einer aktuellen ACCCC},
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 25.3.50.1 (Org mode 9.3.6)},
pdflang={Germanb}}
\begin{document}
\maketitle
\tableofcontents
\newpage
Ach, unsere Freunde die Griechen:
\section{Otto}
\label{sec:orge3c9696}
Abc
\section{Emil}
\label{sec:org283cbcf}
Ganz links
\end{document}
-------------------
makes:
-------------------
! LaTeX Error: Option clash for package babel.
-------------------
Only one latex run. Tableofconts Table remains empty.
Supposition:
1. The Latex source contains {babel} twice, but only once is allowed.
2. There is an error in my Orgmode code because it exports {babel} once
too many
Horst
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
2024-01-16 19:12 ` #+LATEX_HEADER: \usepackage[greek,german]{babel} ?? Horst Leps
@ 2024-01-16 19:27 ` Ihor Radchenko
2024-01-17 17:14 ` Horst Leps
2024-01-16 19:46 ` Juan Manuel Macías
1 sibling, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2024-01-16 19:27 UTC (permalink / raw)
To: Horst Leps; +Cc: emacs-orgmode@gnu.org
Horst Leps <horstleps@outlook.de> writes:
> #+latex_class: koma-article
This is non-standard.
What is your value of org-latex-classes?
> Makes:
> ...
> \usepackage[germanb]{babel}
> ...
> \usepackage[greek,german]{babel}
> ...
> -------------------
>
> ! LaTeX Error: Option clash for package babel.
> -------------------
>
> Only one latex run. Tableofconts Table remains empty.
>
> Supposition:
>
> 1. The Latex source contains {babel} twice, but only once is allowed.
ox-latex tries hard to not duplicate babel. I am unable to reproduce
duplication with your file (but with #+latex_class: koma-article removed)
> 2. There is an error in my Orgmode code because it exports {babel} once
> too many
Does the problem persist without #+latex_class: koma-article?
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
2024-01-16 19:27 ` Ihor Radchenko
@ 2024-01-17 17:14 ` Horst Leps
2024-01-17 17:24 ` Horst Leps
2024-01-18 12:12 ` Ihor Radchenko
0 siblings, 2 replies; 8+ messages in thread
From: Horst Leps @ 2024-01-17 17:14 UTC (permalink / raw)
To: Ihor Radchenko, Mailingliste Orgmode,
Pedro Andres Aranda Gutierrez
Ihor Radchenko schrieb:
Hi,
I have this part here in the .emacs:
(add-to-list 'org-latex-classes
'("koma-article"
"\\documentclass{scrartcl}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
But I changed the org header and rebuilt it from the beginning:
#+latex_class: article
#+TITLE: *Lesson piece: Our town hall*
#+SUBTITLE: Using the example of the Hamburg town hall, plus the town
halls of Lüneburg, Ahrensburg and Berlin-Marzahn -- a desk design
#+AUTHOR: Dr. Horst Leps
#+DATE: \today, \dtc
#+LATEX_HEADER: \usepackage{time}
#+LANGUAGE: de
#+HTML_DOCTYPE: html4 transitional
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[LGR,T1]{fontenc}
#+LATEX_HEADER: \usepackage[greek,german]{babel}
#+LATEX_HEADER: \usepackage[a4paper, left=2cm, right=2cm, top=2cm]{geometry}
#+LATEX_HEADER: \usepackage{etoolbox}
#+LATEX_HEADER:
\appto\UrlBreaks{\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\
do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\
w\do\x\do\y\do\z}
#+LATEX_HEADER: \pagestyle{headings}
#+LATEX_HEADER: \usepackage{hyperref}
#+LATEX_HEADER: \hypersetup{colorlinks=true, linkcolor=blue,
pagecolor=blue, urlcolor=blue, pdfborder={0 0 0}}
#+LATEX_HEADER: \usepackage{booktabs}
First of all, I'm very happy with the result:
https://www.leps.de/wp-content/uploads/rathaus8-ex3/rathaus8-ex3.pf
Because this pdf is very large, I also use an html so that the text can
be viewed quickly. I create the HTML with latex2html because latex2html
creates a folder with complete contents:
https://www.leps.de/wp-content/uploads/rathaus8-ex3/index.html
Everything works.
Thanks!
Feedback geben
Seitenleisten
> Horst Leps <horstleps@outlook.de> writes:
>
>> #+latex_class: koma-article
>
> This is non-standard.
> What is your value of org-latex-classes?
>
>> Makes:
>> ...
>> \usepackage[germanb]{babel}
>> ...
>> \usepackage[greek,german]{babel}
>> ...
>> -------------------
>>
>> ! LaTeX Error: Option clash for package babel.
>> -------------------
>>
>> Only one latex run. Tableofconts Table remains empty.
>>
>> Supposition:
>>
>> 1. The Latex source contains {babel} twice, but only once is allowed.
>
> ox-latex tries hard to not duplicate babel. I am unable to reproduce
> duplication with your file (but with #+latex_class: koma-article removed)
>
>> 2. There is an error in my Orgmode code because it exports {babel} once
>> too many
>
> Does the problem persist without #+latex_class: koma-article?
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
2024-01-17 17:14 ` Horst Leps
@ 2024-01-17 17:24 ` Horst Leps
2024-01-18 12:12 ` Ihor Radchenko
1 sibling, 0 replies; 8+ messages in thread
From: Horst Leps @ 2024-01-17 17:24 UTC (permalink / raw)
To: Ihor Radchenko, Mailingliste Orgmode,
Pedro Andres Aranda Gutierrez
Horst Leps schrieb:
https://www.leps.de/wp-content/uploads/rathaus8-ex3/rathaus8-ex3.pdf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
2024-01-17 17:14 ` Horst Leps
2024-01-17 17:24 ` Horst Leps
@ 2024-01-18 12:12 ` Ihor Radchenko
1 sibling, 0 replies; 8+ messages in thread
From: Ihor Radchenko @ 2024-01-18 12:12 UTC (permalink / raw)
To: Horst Leps; +Cc: Mailingliste Orgmode, Pedro Andres Aranda Gutierrez
Horst Leps <horstleps@outlook.de> writes:
> I have this part here in the .emacs:
>
> (add-to-list 'org-latex-classes
> '("koma-article"
> "\\documentclass{scrartcl}"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
> ("\\paragraph{%s}" . "\\paragraph*{%s}")
> ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
Thanks!
I just checked your first example, and we at least do not duplicate
\usepackage[...]{babel} when using the latest Org mode main.
So, there is no bug on the latest Org as far as I can tell.
> First of all, I'm very happy with the result:
> https://www.leps.de/wp-content/uploads/rathaus8-ex3/rathaus8-ex3.pf
>
> Because this pdf is very large, I also use an html so that the text can
> be viewed quickly. I create the HTML with latex2html because latex2html
> creates a folder with complete contents:
> https://www.leps.de/wp-content/uploads/rathaus8-ex3/index.html
>
> Everything works.
Good to hear!
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: #+LATEX_HEADER: \usepackage[greek,german]{babel} ??
2024-01-16 19:12 ` #+LATEX_HEADER: \usepackage[greek,german]{babel} ?? Horst Leps
2024-01-16 19:27 ` Ihor Radchenko
@ 2024-01-16 19:46 ` Juan Manuel Macías
1 sibling, 0 replies; 8+ messages in thread
From: Juan Manuel Macías @ 2024-01-16 19:46 UTC (permalink / raw)
To: Horst Leps; +Cc: emacs-orgmode@gnu.org
Horst Leps writes:
> % Created 2024-01-16 Tue 20:00
> % Intended LaTeX compiler: pdflatex
> \documentclass{scrartcl}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{graphicx}
> \usepackage{grffile}
> \usepackage{longtable}
> \usepackage{wrapfig}
> \usepackage{rotating}
> \usepackage[normalem]{ulem}
> \usepackage{amsmath}
> \usepackage{textcomp}
> \usepackage{amssymb}
> \usepackage{capt-of}
> \usepackage{hyperref}
> \usepackage[germanb]{babel}
> \usepackage[utf8]{inputenc}
> \usepackage[LGR,T1]{fontenc}
> \usepackage[greek,german]{babel}
> \author{HL}
The document loads babel twice:
\usepackage[germanb]{babel} <==
\usepackage[utf8]{inputenc}
\usepackage[LGR,T1]{fontenc}
\usepackage[greek,german]{babel} <==
Hence the 'option class for package babel' error. You have loaded babel
in your org document with the [greek,german] option and (probably, in
the class you are loading) babel is already loaded as well.
Try:
#+LaTeX_Header: \PassOptionsToPackage{greek,german}{babel}
Best regards,
Juan Manuel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-01-18 12:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18 6:45 #+LATEX_HEADER: \usepackage[greek,german]{babel} ?? Pedro Andres Aranda Gutierrez
2024-01-18 12:19 ` Ihor Radchenko
-- strict thread matches above, loose matches on Subject: below --
2024-01-12 10:24 Tableofcontents Horst Leps
2024-01-12 16:53 ` Tableofcontents Tory S. Anderson
2024-01-13 12:27 ` Tableofcontents Ihor Radchenko
2024-01-16 19:12 ` #+LATEX_HEADER: \usepackage[greek,german]{babel} ?? Horst Leps
2024-01-16 19:27 ` Ihor Radchenko
2024-01-17 17:14 ` Horst Leps
2024-01-17 17:24 ` Horst Leps
2024-01-18 12:12 ` Ihor Radchenko
2024-01-16 19:46 ` Juan Manuel Macías
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).