抱歉,标题不够详细,但我刚接触 LaTeX,不知道如何调试或理解错误。
我修改了发票模板这里以满足我的需要,但我收到下面这个令人费解的错误。
Package babel Error: You haven't loaded the option english yet
我的.tex
文件如下(已清除个人信息):
\documentclass[DIN, pagenumber=false, parskip=half,
fromalign=right, fromphone=true, fromfax=false,
fromrule=false]{scrlttr2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{longtable}
\newcommand{\stdlohn}[0]{11 \euro}
\renewcommand*{\raggedsignature}{\raggedright}
\setkomavar{fromname}{My Name}
\setkomavar{fromemail}{[email protected]}
\setkomavar{fromphone}{+5555 55555}
\setkomavar{fromaddress}{}
\setkomavar{frombank}{}
\setkomavar{subject}[]{Invoice for [Services Rendered]/Description}
\setkomavar{yourmail}[Ref. No.]{080213-1}
\setkomavar{yourref}[E-mail]{}
\setkomavar{date}[Datum]{08 February 2012}
%===================================
% footer
\setkomavar{firstfoot}{
\parbox[t]{\textwidth}{\footnotesize
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{Company:}\\
sdf\\
sdfdsf\\ \\
Telefon: \usekomavar{fromphone} \\
E-Mail: \usekomavar{fromemail} \\
\end{tabular}
\hfill{}
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{Legal information:}\\
Sole Proprietor\\
Tax: 0255 980 24 5\\ \\
Full Name: sdf\\
ID: 32112 5390 081\\
\end{tabular}
\hfill{}
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{Banking Details:}\\
\usekomavar{frombank}
\end{tabular}
}}
\begin{document}
%===================================
% receiver
\begin{letter}{
Mr Client Guy
}
\opening{\ }
\vspace{-1.5cm}
%===================================
\begin{longtable}{p{2.5cm}p{5.5cm}p{2.5cm}p{2.5cm}}
\hline
Index & Description & Units(hr) & Total\\
\hline
\textbf{General}\\
10 & Analysis and planning for data extraction & 4 & 1200,00\\
20 & Cleaning dirty data & 2 & 600,00\\
\multicolumn{3}{r}{Subtotal:} & 1800,00\\
\\
\textbf{Programming}\\
30 & Production/implementation of code/solution & 4 & 1200,00\\
40 & Refactoring for unique cases & 2 & 600,00\\
\multicolumn{3}{r}{Subtotal:} & 1800,00\\
\\
\textbf{Design}\\
\multicolumn{3}{r}{Subtotal:} & 0,00\\
\\
\hline\hline
\end{longtable}
\begin{longtable}{p{5.5cm}p{2.5cm}p{2cm}p{3cm}}
\multicolumn{3}{r}{Total Net. Amount}\\
\hline
\multicolumn{3}{r}{} &3600,00\\
\hline
\hline
\end{longtable}
\end{letter}
\end{document}
编辑:
- 删除我的
.aux
文件出现此错误:
No file angebot.aux.
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
! Undefined control sequence.
\select@language ... \@empty }\languageshorthands
{none}\babel@beginsave \cs...
l.58 \begin{document}
- 添加
\usepackage{english}
会给出稍微好一点的响应,但我该如何解决它呢?
! Package babel Error: You have used an old interface to call babel
(babel) You may expect compatibility problems wit other packages
.
See the babel package documentation for explanation.
Type H <return> for immediate help.
...
l.73 \bblstyerror
答案1
添加\usepackage[english]{babel}
解决了错误 - 谢谢@hpesoj626