发票类别:如何更改货币

发票类别:如何更改货币

我只是想知道是否有人熟悉发票类,可以告诉我如何将货币从美元更改为英镑。下面是所需的代码 - 我希望将表中的美元更改为英镑。请注意,我从这里获取了此文件关联。需要invoice.cls文件来编译此文档。我看过这个关联但它并没有真正解释如何使用其他货币来实现这一点。

\documentclass{invoice}

\def \tab {\hspace*{3ex}} 

\begin{document}

\hfil{\Huge\bf Initech Inc.}\hfil 
\bigskip\break % Whitespace
\hrule % Horizontal line

123 Broadway \hfill (000) 111-1111 \\ 
City, State 12345 \hfill [email protected]
\\ \\
{\bf Invoice To:} \\
\tab James Smith \\ % Invoice recipient
\tab Generic Corporation \\ % Recipient's company

{\bf Date:} \\
\tab \today \\ 

\begin{invoiceTable}

\feetype{Consulting Services} 

\hourrow{October 3, 2012}{8}{12} 
\hourrow{October 4, 2012}{6.5}{12}
\hourrow{October 5, 2012}{5.25}{12}
\hourrow{October 10, 2012}{9.75}{20}
\hourrow{October 11, 2012}{5}{12.51}

\feetype{Accounting Services} % Fee category description

\hourrow{October 10, 2012}{2}{80}
\hourrow{October 11, 2012}{1}{80}

\feetype{Hosting Expenses} 

\feerow{Web Hosting: October, 2012}{60} 

\end{invoiceTable}
\end{document}

答案1

美元符号的使用在模板中被硬编码为。如果您想要完全用\$替换,您可以添加$£

\renewcommand{\$}{\pounds}

你的序言。

在此处输入图片描述

\documentclass{invoice}

\def\tab{\hspace*{3ex}} 
\renewcommand{\$}{\pounds}% $ -> £
\begin{document}

\hfil{\Huge\bfseries Initech Inc.}\hfil 
\bigskip\break % Whitespace
\hrule % Horizontal line

123 Broadway \hfill (000) 111-1111 \\ 
City, State 12345 \hfill [email protected]
\\ \\
{\bfseries Invoice To:} \\
\tab James Smith \\ % Invoice recipient
\tab Generic Corporation \\ % Recipient's company

{\bfseries Date:} \\
\tab \today \\ 

\begin{invoiceTable}

\feetype{Consulting Services} 

\hourrow{October 3, 2012}{8}{12} 
\hourrow{October 4, 2012}{6.5}{12}
\hourrow{October 5, 2012}{5.25}{12}
\hourrow{October 10, 2012}{9.75}{20}
\hourrow{October 11, 2012}{5}{12.51}

\feetype{Accounting Services} % Fee category description

\hourrow{October 10, 2012}{2}{80}
\hourrow{October 11, 2012}{1}{80}

\feetype{Hosting Expenses} 

\feerow{Web Hosting: October, 2012}{60} 

\end{invoiceTable}
\end{document}

答案2

您需要编辑invoice.cls并查找\$并根据需要进行更改。可能更改为\pounds。查看第 62、69、74、80 和 107 行。

相关内容