You are not logged in.

#1 2023-10-30 18:54:23

jonsch318
Member
From: Germany
Registered: 2023-10-30
Posts: 2
Website

Texlive and Babel ngerman not defined

I want to compile a latex project with latexmk. I have installed the entire texlive package suite with texlive-langenglish and texlive-langgerman.

The problem that occurs is an error of the pdflatex:

! Package babel Error: You haven't defined the language 'ngerman' yet.
(babel)                Perhaps you misspelled it or your installation
(babel)                is not complete.

I used \usepackage[english]{babel}.

Then in my template there is one \iflanguage{ngerman} that i can't remove. Nowhere else in the project ngerman is mentioned.

I know that the template works on overleaf(an online latex service) but not in my arch laptop and not on my arch pc. Am I missing a package or have I something configured globaly that sets ngerman as default?

Thanks (i know that maybe i am in the wrong place)

Offline

#2 2023-11-02 14:24:04

daysfled
Member
From: Belgium
Registered: 2023-06-18
Posts: 20

Re: Texlive and Babel ngerman not defined

Can you post a minimal tex file that compiles in overleaf but does not compile on your machine ?

By minimal, I mean without any unnecessary text (just enough to produce a non empty pdf file) and without any unnecessary package (i.e. packages not related to your problem, you test if removing them still let your document compile on overleaf).

Shouldn't you use

\usepackage[ngerman,english]{babel}

instead ?

And if you don't use ngerman anywhere in your document, I fail to understand why that instruction could not be removed from your file ? (just keeping the part of the \iflanguage instruction relative to the part where ngerman is not true).

Sorry, I cannot even try to help more without a working example.

Offline

#3 2023-11-02 19:55:35

jonsch318
Member
From: Germany
Registered: 2023-10-30
Posts: 2
Website

Re: Texlive and Babel ngerman not defined

No no i'm sorry. I should have given steps to reproduce just needed a bit more time:

\documentclass[a4paper]{scrartcl}

\usepackage[ngerman, english]{babel}
\selectlanguage{english}

\begin{document}

\iflanguage{ngerman}{Seminararbeit}{Seminar Thesis}

\end{document}

And you're right. with

\usepackage[ngerman, english]{babel}

the compilation error disappears (so now i'm completely certain this has nothing to do with arch or the arch texlive installation)


But the language is still german even when i use

\selectlanguage{english}

I'cant really change the template so the \iflanguage part has to stay.

Last edited by jonsch318 (2023-11-02 20:00:16)

Offline

#4 2023-11-03 00:53:30

daysfled
Member
From: Belgium
Registered: 2023-06-18
Posts: 20

Re: Texlive and Babel ngerman not defined

As stated in the babel documentation, the \iflanguage command is far from ideal to test language because it tests hyphenation patterns more than the language itself.

I am no specialist because I usually only use one language at a time but I think the recommended way to check language is to use the \IfLanguageName command for the iflang package. When I test your example with that command, it seems that the correct language is detected. I suggest you give it a try.

Offline

#5 2023-11-03 06:17:41

ddeimeke
Member
From: Grüt (Gossau ZH), Switzerland
Registered: 2022-05-20
Posts: 13
Website

Re: Texlive and Babel ngerman not defined

Hi all

Swissgerman does not work either.

\documentclass[a4paper]{scrartcl}

\usepackage[swissgerman]{babel}

\begin{document}

Bla

\end{document}

gives an

! Package babel Error: Unknown option 'swissgerman'. Either you misspelled it
(babel)                or the language definition file swissgerman.ldf was not 
found.

It works with manually installed TeXlive.

Cheers

Dirk

Offline

#6 2023-11-03 09:36:47

daysfled
Member
From: Belgium
Registered: 2023-06-18
Posts: 20

Re: Texlive and Babel ngerman not defined

@ddeimeke : it also works on texlive installed by arch packages. I tried your example and it compiles without errors.
The swissgerman.ldf is provided by package texlive-langgerman. Is it installed on your machine ?

Offline

#7 2023-11-03 10:27:21

ddeimeke
Member
From: Grüt (Gossau ZH), Switzerland
Registered: 2022-05-20
Posts: 13
Website

Re: Texlive and Babel ngerman not defined

Hi!

It worked until an update some time ago.

The package is not installed anymore (I thought I had installed TeXlive completely)

Thanks for the hint!

Dirk

Offline

#8 2023-11-03 13:38:31

lmn
Member
Registered: 2021-05-09
Posts: 89
Website

Re: Texlive and Babel ngerman not defined

The split was covered by the news: TeX Live package reorganization.
Make sure to check your Tex packages or maybe consider the texlive-meta package.

Offline

#9 2023-11-04 08:09:55

ddeimeke
Member
From: Grüt (Gossau ZH), Switzerland
Registered: 2022-05-20
Posts: 13
Website

Re: Texlive and Babel ngerman not defined

lmn wrote:

The split was covered by the news: TeX Live package reorganization.
Make sure to check your Tex packages or maybe consider the texlive-meta package.

Thank you!

Offline

#10 2023-11-20 16:12:26

leuko
Member
Registered: 2020-06-01
Posts: 23

Re: Texlive and Babel ngerman not defined

files for `ngerman` are now part of `texlive-langgerman`.

Offline

Board footer

Powered by FluxBB