I am a beginner with LaTeX. I have a LaTeX template for my thesis which I have to use. The problem is that the special characters in the german language (called Umlaut) are not displayed in a correct way. Here is the code for the basic template:
%gibt an: Papierformat, Schriftgröße
\documentclass[a4paper,german,12pt]{article}
\setlength{\parskip}{0.2cm}
\setlength{\parindent}{0cm}
%-----------------------------------------------------------------------------------------------------------------------------
%Übersetzung von E in D
\usepackage{german}
%Einstellung der Randabstände
\usepackage[lmargin={2.5cm},rmargin={2.5cm},tmargin={1.5cm},bmargin={2.5cm}]{geometry}
%zur Einbindung von Graphiken
\usepackage{graphicx}
%Bearbeitung von Kopf- und Fusszeile
\usepackage{fancyhdr}
%Schriftart
\usepackage{helvet}
%stellt unabhängige Textmarken zu Verfügung
\usepackage{extramarks}
%aktiviert eine Umgebung in der der Mathematikmodus aktiv ist
\usepackage{amsmath}
%aktiviert eine Umgebung in der der Mathematikmodus aktiv ist
\usepackage{amsthm}
%aktiviert eine Umgebung in der der Mathematikmodus aktiv ist
\usepackage{amssymb}
%aktiviert Hyperlinks
\usepackage{hyperref}
%Stellt das Eurozeichen € zu Verfügung
\usepackage[right]{eurosym}
%Übersetzt die Tastatureingaben für LaTex
\usepackage[latin1]{inputenc}
\usepackage{fancybox}
\usepackage{xcolor}
\usepackage{color}
\usepackage{float}
\usepackage{framed}
\usepackage{url}
%Weitere
\usepackage{bibgerm} %Bibliothek
\usepackage{booktabs}
\usepackage{tabularx} %Tabellen, die sich der Seitenbreite anpassen
\usepackage{multirow} % Verbundene Zellen in Tabellen
\usepackage{rotating} % Quergestellte Tabellen
\usepackage{rotfloat}
\usepackage[bottom]{footmisc} %Fußnoten immer am Ende der Seite
%Definitionen
\newtheoremstyle{mystyle}% name
{10pt}% Space above
{10pt}% Space below
{\itshape}% Body font
{}% Indent amount:
{\bfseries}% Theorem head font
{:}% Punctuation after theorem head
{0.5em}% Space after theorem head
{\thmname{#1}\thmnumber{ #2}:\thmnote{ #3}}% Theorem head
\theoremstyle{mystyle}% default
\newtheorem{definition}{Definition}
\numberwithin{equation}{section}
\renewcommand{\proofname}{Beweis}
%Paragraphen
\newcommand{\myparagraph}[1]{\paragraph{}\mbox{}\\}
%-----------------------------------------------------------------------------------------------------------------------------------------
\renewcommand{\baselinestretch}{1.2}
\fancyhead[LO]{\slshape \small \firstleftmark}
\fancyhead[RO]{\normalsize\thepage} \fancyfoot{}
\begin{document}
%-----------------------------------------------------------------------------------------------------------------------------------------
%Titelseite
\begin{titlepage}
% font / Schriftart
%------------------
\begin{figure}[htbp]
%\centering
\begin{minipage}[t]{0.4\textwidth}
\includegraphics[scale=0.75]{0_Logos/kit.jpg}
\end{minipage}
\hfill
\begin{minipage}[b]{0.3\textwidth}
\begin{flushleft}
\includegraphics[scale=0.09]{0_Logos/aifb.png}
\end{flushleft}
\begin{flushleft}
\tiny\textbf{TEXT}
\textbf{TEXT}
\end{flushleft}
\end{minipage}
\end{figure}
\vspace*{1.5cm}
\leftskip=4cm
\textbf{{\Huge %TODO
M}\\
{\Huge %TODO
}}
\vspace*{1.5cm}\\
{\Large %TODO
TEXT}\\
{\Large von} \\
{\Large %TODO
TEXT}
\vspace*{3.5cm}\\
an der Fakultät für Wirtschaftswissenschaften
\vspace*{0.5cm}\\
In dem Studiengang\\
%TODO
TEXT
\vspace*{1.5cm}\\
eingereicht am %TODO Datum
beim\\
TEXT\\
TEXT\\
TEXT
\vspace*{2.5cm}\\
TEXT
\\
TEXT\\
\vspace*{1.5cm}\\
{\footnotesize TEXT}\\
{\footnotesize TEXT}\\
\hfill
\end{titlepage}
\thispagestyle{empty}\cleardoublepage
\mbox{}\thispagestyle{empty}
\cleardoublepage
\mbox{}\thispagestyle{empty}
\vspace*{1cm}
{\Large \textbf{Eidesstattliche Erklärung}}
\bigskip
Ich versichere hiermit wahrheitsgemäß, die Arbeit und alle Teile daraus selbständig angefertigt, alle benutzten Hilfsmittel vollständig und genau angegeben und alles kenntlich gemacht zu haben, was aus Arbeiten anderer unverändert oder mit Abänderung entnommen wurde.\\
\vspace{1cm}
\textit{Karlsruhe, den DATUM} \hspace{4cm} \textit{NAME} \\
\thispagestyle{empty}\cleardoublepage
\mbox{}\thispagestyle{empty}
\cleardoublepage
\rmfamily \pagestyle{fancy} \setcounter{secnumdepth}{4}
\pagenumbering{roman}
\setcounter{page}{3}
\tableofcontents
\newcounter{roemisch}
\setcounter{roemisch}{\value{page}}
\include{acronyms}
\cleardoublepage
\listoffigures
\cleardoublepage
\listoftables
\cleardoublepage
\setcounter{page}{2} \pagenumbering{arabic}
\interfootnotelinepenalty=10000 % Keine Seitenumbrüche bei Fußnoten
% % % % % % % % % % % % %INHALTE % % % % % % % % % % % % % %
\include{einleitung}
% \include{kapitel1}
% \include{kapitel2}
%\include{fazit}
% % % % % % % % % % % % % ANHANG% % % % % % % % % % % % % % % %
\appendix %Anhang
\include{anhang} %Anhang
% % % % % % % % % % % % % LITERATUR% % % % % % % % % % % % % % %
\bibliographystyle{geralpha} %Literaturverzeichnis
\bibliography{Literatur} %Literaturverzeichnis
\end{document}
And here is the code for the first chapter(called "Einleitung", which is included in the basic template
\section{Einleitung}
\label{Einleitung}
\subsection{Motivation}
\label{Motivation}
Seit Beginn der Industriellen Revolution ist Konzentration von Treibhausgasen in der Atmosphäre deutlich angestiegen. Der Grund dafür
\subsection{Fragestellung}
\label{Fragestellung}
Now I searched in the Internet and found many suggestions how to solve this problem. Unfortunately none of them worked in this context. Here are the suggestions which I found in the Internet and tried out:
If I use the line: "\usepackage[latin1]{inputenc}
" (this is the default line of the template)
I get the message: "Latex Error: Command \textcurrenxy unavailable in encoding OT1
"
By using the line (instead of the default line) : "\usepackage[ansinew]{inputenc}
"
I get the message: "Latex Error: Command \textcurrenxy unavailable in encoding OT1
"
By using the line (instead of the default line): "\usepackage[T1]{fontenc}
"
I do not get an error message; nevertheless the special characters are not displayed in a correct way
By using the line (instead of the default line): "\usepackage[utf8]{inputenc}
"
I get 10 errors of the type: "Package inputenc Error: Unicode char \u8:ÜR not set up for use with LaTeX
" HOWEVER the special characters are displayed in a correct way and the whole document looks the way I want it to look
By using the line (instead of the default line):"\usepackage{textcomp}
"
I do not get an error, but the special characters are not displayed at all (as if I have not used them)
I really tried much but without success. Can anyone help me with this problem? I would really appreciate it.
Many thanks in advance!
Update:
Thanks for your answers. Unfortunately I have still not managed to solve the problem.
I tried the solutions of Christian Lindig:
\usepackage[ngerman]{babel} % the new way
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
and as mentioned before: I get 10 errors of the type:
Package inputenc Error: Unicode char \u8:ÜR not set up for use with LaTeX
HOWEVER the special characters are displayed in a correct way and the whole document looks the way I want it to look. So I have 10 LaTeX errors. Do I have to live with that or is there a way not to get those errors while at the same time the document looks how it should look?
When using the second solution of Christian Linding
% \usepackage{german} % outdated
\usepackage[ngerman]{babel} % the new way
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
The Umlaute are not displayed in a correct way and I get one error:
Latex Error: Command \textcurrenxy unavailable in encoding T1
\usepackage[T1]{fontenc}
Comment aside, you should replace thegerman
package with thegerman
option ofbabel
.\usepackage[utf8]{inputenc}
seems to be the correct starting point. Add also\usepackage{textcomp}
. Then identifiy the first error.inputenc
needs to match the actual encoding of your document. The template does not seem that out-dated, but it does seem rather confused and, like @MaxNoe, I would recommend not using it if you have a choice.inputenc
package fromlatin1
toutf8
, (ii) adding the optiondemo
to thegraphicx
package (since I don't have any of the graphic files you use), and (ii) replacing\usepackage{german}
with\usepackage[ngerman]{babel}
, I don't encounter any of the problems you say you encounter. I wouldn't use\renewcommand{\baselinestretch}{1.2}
, though. Instead, load thesetspace
package and issue the instruction\setstretch{1.2}
.