You are not logged in.
Pages: 1
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
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
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
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
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
@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
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
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
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
files for `ngerman` are now part of `texlive-langgerman`.
Offline
Pages: 1