1
\documentclass[11pt,a4paper]{article}
\usepackage{ngerman}
\usepackage[ngerman]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{marvosym}
\usepackage{ifpdf}
\usepackage[pdftex]{color}
\ifpdf
  \usepackage[pdftex]{graphicx}
\else
  \usepackage[dvips]{graphicx}\fi

\pagestyle{empty}

\usepackage[scale=0.775]{geometry}
\setlength{\parindent}{0pt}
\addtolength{\parskip}{6pt}

\def\firstname{Max}
\def\familyname{Mustermann}
\def\FileAuthor{\firstname~\familyname}
\def\FileTitle{\firstname~\familyname's Bewerbungsschreiben}
\def\FileSubject{Bewerbungsschreiben}
\def\FileKeyWords{\firstname~\familyname, Bewerbungsschreiben}

\renewcommand{\ttdefault}{pcr}
\hyphenation{ins-be-son-de-re}
\usepackage{url}
\urlstyle{tt}
\ifpdf
  \usepackage[pdftex,pdfborder=0,breaklinks,baseurl=http://,pdfpagemode=None,pdfstartview=XYZ,pdfstartpage=1]{hyperref}
  \hypersetup{
    pdfauthor   = \FileAuthor,%
    pdftitle    = \FileTitle,%
    pdfsubject  = \FileSubject,%
    pdfkeywords = \FileKeyWords,%
    pdfcreator  = \LaTeX,%
    pdfproducer = \LaTeX}
\else
  \usepackage[dvips]{hyperref}
\fi

\definecolor{firstnamecolor}{RGB}{125,85,85}
\definecolor{familynamecolor}{RGB}{138,74,57}
\hypersetup{pdfborder=0 0 0}

\begin{document}
\sffamily   % for use with a résumé using sans serif fonts;
%\rmfamily  % for use with a résumé using serif fonts;
\hfill%
\begin{minipage}[t]{.6\textwidth}
    \raggedleft%
    {\bfseries {\color{firstnamecolor}\firstname}~{\color{familynamecolor}\familyname}}\\[.35ex]
    \small\itshape%
    Musterstraße 08/15\\
    8010 Graz\\[.35ex]
    \Mobilefone~+43 123 45 789 90\\
    \Letter~\href{mailto:max@mustermann.at}{max@mustermann.at}
\end{minipage}\\[0.5em]
%
{\color{firstnamecolor}\rule{\textwidth}{.25ex}}
%
\begin{minipage}[t]{.4\textwidth}
    \raggedright%
    % {\bfseries {\color{firstnamecolor}
    \vspace*{1em}
    Musterfirma\\[.35ex]
    % }}
    \small%
    Hans-im-Glück-Gasse 47 Top 11\\
    8010 Graz
\end{minipage}
%
\hfill
%
\begin{minipage}[t]{.4\textwidth}
    \raggedleft % US style
    \today
    %April 6, 2006 % US informal style
    %05/04/2006 % UK formal style
\end{minipage}\\[1em]
\raggedright

{\bfseries \color{familynamecolor}Bewerbung als Kasperl}\\[1.5em]

Sehr geehrter Herr DI Dr. Pezi,\\[1em]
%
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

  
%Yours sincerely,\\[2em] % if the opening is "Dear Mr(s) Doe,"
Mit freundlichen Grüßen,\\[3em] % if the opening is "Dear Sir or Madam,"
%
%\includegraphics[scale=0.75]{signature_blue}\\
{\bfseries \firstname~\familyname}\\
%
\vfill%
{\slshape \bfseries Bewerbungsunterlagen}\\
% {\slshape Curriculum Vit\ae{}}
\end{document}

How can I fix this error?

I attached the file.

Thanks!

enter code here
2
  • 2
    unrelated but you should remove the \ifpdf tests, just ise \usepackage{graphicx} with no option and let it choose the correct option iteslf, similarly for hyperrref Jan 28 at 8:54
  • 3
    remove \usepackage{ngerman}. It is unneeded (you are using babel too) and breaks stuff. Jan 28 at 8:56

2 Answers 2

3

Item 1 in the list below solves the main problem. But, please, also consider the other items.

  1. You can't use both the ngerman package and babel

  2. The ngerman package is obsolete

  3. The ifpdf test for graphicx is not needed

  4. Remove the pdftex option for color

  5. utf8x is obsolete

  6. There is no need for inputenc if your file is UTF-8 encoded

  7. Don't use \def

  8. Separate package loading and settings whenever possible

  9. If I ask TeX to hyphenate insbesondere in German, the answer is ins-be-son-de-re, so there's no need to set it

  10. The appropriate value for pdfpagemode is UseNone, not None

\newcommand\firstname{Max}
\newcommand\familyname{Mustermann}
\newcommand\FileAuthor{\firstname~\familyname}
\newcommand\FileTitle{\firstname~\familyname's Bewerbungsschreiben}
\newcommand\FileSubject{Bewerbungsschreiben}
\newcommand\FileKeyWords{\firstname~\familyname, Bewerbungsschreiben}

\documentclass[11pt,a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{marvosym}
\usepackage{color}
\usepackage{graphicx}
\usepackage[scale=0.775]{geometry}
\usepackage{url}

\ifpdf
  \usepackage[pdftex,]{hyperref}
  \hypersetup{
    breaklinks,
    baseurl=http://,
    pdfpagemode=UseNone,
    pdfstartview=XYZ,
    pdfstartpage=1,
    pdfauthor   = \FileAuthor,
    pdftitle    = \FileTitle,
    pdfsubject  = \FileSubject,
    pdfkeywords = \FileKeyWords,
    pdfcreator  = \LaTeX,
    pdfproducer = \LaTeX
  }
\else
  \usepackage[dvips]{hyperref}
\fi
\hypersetup{pdfborder=0 0 0}

\pagestyle{empty}
\setlength{\parindent}{0pt}
\addtolength{\parskip}{6pt}

\urlstyle{tt}


\renewcommand{\ttdefault}{pcr}

%\hyphenation{ins-be-son-de-re}

\definecolor{firstnamecolor}{RGB}{125,85,85}
\definecolor{familynamecolor}{RGB}{138,74,57}



\begin{document}

\sffamily   % for use with a résumé using sans serif fonts;
%\rmfamily  % for use with a résumé using serif fonts;
\hfill%
\begin{minipage}[t]{.6\textwidth}
    \raggedleft%
    {\bfseries {\color{firstnamecolor}\firstname}~{\color{familynamecolor}\familyname}}\\[.35ex]
    \small\itshape%
    Musterstraße 08/15\\
    8010 Graz\\[.35ex]
    \Mobilefone~+43 123 45 789 90\\
    \Letter~\href{mailto:max@mustermann.at}{max@mustermann.at}
\end{minipage}\\[0.5em]
%
{\color{firstnamecolor}\rule{\textwidth}{.25ex}}
%
\begin{minipage}[t]{.4\textwidth}
    \raggedright%
    % {\bfseries {\color{firstnamecolor}
    \vspace*{1em}
    Musterfirma\\[.35ex]
    % }}
    \small%
    Hans-im-Glück-Gasse 47 Top 11\\
    8010 Graz
\end{minipage}
%
\hfill
%
\begin{minipage}[t]{.4\textwidth}
    \raggedleft % US style
    \today
    %April 6, 2006 % US informal style
    %05/04/2006 % UK formal style
\end{minipage}\\[1em]
\raggedright

{\bfseries \color{familynamecolor}Bewerbung als Kasperl}\\[1.5em]

Sehr geehrter Herr DI Dr. Pezi,\\[1em]
%
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

  
%Yours sincerely,\\[2em] % if the opening is "Dear Mr(s) Doe,"
Mit freundlichen Grüßen,\\[3em] % if the opening is "Dear Sir or Madam,"
%
%\includegraphics[scale=0.75]{signature_blue}\\
{\bfseries \firstname~\familyname}\\
%
\vfill%
{\slshape \bfseries Bewerbungsunterlagen}\\
% {\slshape Curriculum Vit\ae{}}

\end{document}

enter image description here

2

Just eliminate \usepackage{ngerman} from your document, and it will compile.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.