TeX 容量超出,抱歉 [输入堆栈大小=5000

TeX 容量超出,抱歉 [输入堆栈大小=5000
\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:[email protected]}{[email protected]}
\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 code here

答案1

下面列表中的第 1 项解决了主要问题。但是,请同时考虑其他项。

  1. 您不能同时使用ngerman包和babel

  2. ngerman包已过时

  3. ifpdf不需要测试graphicx

  4. 删除pdftex选项color

  5. utf8x已经过时

  6. inputenc如果你的文件是 UTF-8 编码的,则不需要

  7. 不要使用\def

  8. 尽可能分离包加载和设置

  9. 如果我要求 TeXinsbesondere在德语中使用连字符,答案是ins-be-son-de-re,因此无需设置它

  10. 的适当值为,而pdfpagemode不是UseNoneNone

\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:[email protected]}{[email protected]}
\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}

在此处输入图片描述

答案2

只需从您的文档中删除\usepackage{ngerman},它就会编译。

相关内容