그리스어로 된 사용자 정의 설명으로 클래스의 사용자 정의 설명을 변경하고 싶습니다 invoice
.
문제:
- 영어로 된 일부 영어 설명을 변경할 수 있지만 테이블 설명은 변경할 수 없습니다.
- $를 유로로 변경하세요.
이 모든 것을 바꿀 수 있는 방법이 있나요? 미리 답변해 주셔서 감사합니다.
\documentclass{invoice}
\usepackage[english,greek]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\def \tab {\hspace*{3ex}}
\begin{document}
\hfil{\Huge\bf Οδοντιατρείο Πέτρου Μουρούζη}\hfil
\bigskip\break
\hrule
Κ.Καραμανλή 77 \hfill (2310) 911-890 \\
Θεσσαλονίκη, 54642 \hfill \selectlanguage{english}{[email protected]}
\\ \\
\selectlanguage{greek}
{\bf Οικονομική ανάλυση εργασιών:} \\
\tab Αθανάσιος \\
\tab \\
{\bf Ημερομηνία:} \\
\tab \today \\
\selectlanguage{english}
\begin{invoiceTable}
\selectlanguage{greek}
\feetype{Οδοντιατρικές εργασίες}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}
\selectlanguage{greek}
\hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}
\selectlanguage{greek}
\hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}
\selectlanguage{greek}
\feetype{Προσωρινές αποκαταστάσεις}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}
\selectlanguage{greek}
\hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}
\selectlanguage{greek}
\hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}
\subtotal
\feetype{Expenses}
\feerow{Web Hosting: October, 2012}{60}
\end{invoiceTable}
\end{document}
답변1
나는 그리스어를 할 수 없기 때문에 영어 단어를 그리스어로 바꿀 수 있는 곳만 알려드릴 수 있습니다. 번역은 직접 해주세요.
다음 MWe를 살펴보시기 바랍니다. Greek:
예를 들어 다음 영어 텍스트를 번역해야 하는 곳에 추가했습니다 .
{\bf Greek:Subtotal} & {\bf \total{subhours} hours} & & {\bf \$\total{subcost}}
% ^^^^^^^^^^^^^^
번역하는 모습을 보여줍니다 Subtotal
.
송장에 유로 기호를 포함하려면 두 줄을 추가하세요.
\usepackage{eurosym} % <================================================
\renewcommand{\$}{\euro} % <============================================
코드에.
완전한 MWE
\documentclass{invoice}
\usepackage[english,greek]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{eurosym} % <================================================
\def \tab {\hspace*{3ex}}
\renewcommand{\$}{\euro} % <============================================
\makeatletter
\renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
\newcommand*{\unitrow}[4]{%
\addtocounter{cost}{1000 * \real{##2} * \real{##3}}%
\addtocounter{subcost}{1000 * \real{##2} * \real{##3}}%
##1 & \formatNumber{##2} ##4 & \$\formatNumber{##3} & \$\FPmul{\cost}{##2}{##3}\formatNumber{\cost}%
\\
}
% Create a new row from title and expense amount
\newcommand*{\feerow}[2]{%
\addtocounter{cost}{1000 * \real{##2}}%
\addtocounter{subcost}{1000 * \real{##2}}%
##1 & & \$\formatNumber{##2} & \$\FPmul{\cost}{##2}{1}\formatNumber{\cost}%
\\
}
\newcommand{\subtotalNoStar}{
{\bf Greek:Subtotal} & {\bf \total{subhours} hours} & & {\bf \$\total{subcost}} % <================================================
\setcounter{subcost}{0}
\setcounter{subhours}{0}
\\*[1.5ex]
}
\newcommand{\subtotalStar}{
{\bf Greek:Subtotal} & & & {\bf \$\total{subcost}} % <================================================
\setcounter{subcost}{0}
\\*[1.5ex]
}
\newcommand{\subtotal}{
\hline
\@ifstar
\subtotalStar%
\subtotalNoStar%
}
% Create a new row from date and hours worked (use stored fee type and hourly rate)
\newcommand*{\hourrow}[3]{%
\addtocounter{hours}{1000 * \real{##2}}%
\addtocounter{subhours}{1000 * \real{##2}}%
\unitrow{##1}{##2}{##3}{hours}%
}
\renewcommand{\tabcolsep}{0.8ex}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{@{\extracolsep{\fill}\hspace{\tabcolsep}} l r r r }
\hline
{\bf Greek:Description of Services} & \multicolumn{1}{c}{\bf Greek:Quantity} & \multicolumn{1}{c}{\bf Greek:Unit Price} & \multicolumn{1}{c}{\bf Greek:Amount} \\* % <================================================
\hline\hline
\endhead
}{
\hline\hline\hline
{\bf Greek:Balance Due} & & & {\bf \$\total{cost}} \\ % <================================================
\end{longtable}
}
\makeatother
\begin{document}
\hfil{\Huge\bf Οδοντιατρείο Πέτρου Μουρούζη}\hfil
\bigskip\break
\hrule
Κ.Καραμανλή 77 \hfill (2310) 911-890 \\
Θεσσαλονίκη, 54642 \hfill \selectlanguage{english}{[email protected]}
\\ \\
\selectlanguage{greek}
{\bf Οικονομική ανάλυση εργασιών:} \\
\tab Αθανάσιος \\
\tab \\
{\bf Ημερομηνία:} \\
\tab \today \\
\selectlanguage{english}
\begin{invoiceTable}
\selectlanguage{greek}
\feetype{Οδοντιατρικές εργασίες}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}
\selectlanguage{greek}
\hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}
\selectlanguage{greek}
\hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}
\selectlanguage{greek}
\feetype{Προσωρινές αποκαταστάσεις}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}
\selectlanguage{greek}
\hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}
\selectlanguage{greek}
\hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}
\subtotal
\feetype{Greek:Expenses} % <================================================
\feerow{Greek:Web Hosting: October, 2012}{60} % <================================================
\end{invoiceTable}
\end{document}
결과는 다음과 같습니다.
주석에 언급된 변경 사항을 사용하면 다음과 같은 코드를 얻을 수 있습니다.
\documentclass{invoice}
\usepackage[english,greek]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{eurosym} % <================================================
\def \tab {\hspace*{3ex}}
\renewcommand{\$}{\euro} % <============================================
\makeatletter
\renewenvironment{invoiceTable}{
% Create a new row from title, unit quantity, unit rate, and unit name
\newcommand*{\unitrow}[4]{%
\addtocounter{cost}{1000 * \real{##2} * \real{##3}}%
\addtocounter{subcost}{1000 * \real{##2} * \real{##3}}%
##1 & \formatNumber{##2} ##4 & \$\formatNumber{##3} & \$\FPmul{\cost}{##2}{##3}\formatNumber{\cost}%
\\
}
% Create a new row from title and expense amount
\newcommand*{\feerow}[2]{%
\addtocounter{cost}{1000 * \real{##2}}%
\addtocounter{subcost}{1000 * \real{##2}}%
##1 & & \$\formatNumber{##2} & \$\FPmul{\cost}{##2}{1}\formatNumber{\cost}%
\\
}
\newcommand{\subtotalNoStar}{%
{\selectlanguage{greek}\textbf{ΤΕΛΙΚΟ ΠΟΣΟ}} & {\textbf{\total{subhours}}\selectlanguage{greek} \textbf{Greek:hours}} & & {\bf \$\total{subcost}}% <================================================
\setcounter{subcost}{0}%
\setcounter{subhours}{0}%
\\*[1.5ex]
}
\newcommand{\subtotalStar}{%
{\bf Greek:Subtotal} & & & {\bf \$\total{subcost}}% <================================================
\setcounter{subcost}{0}
\\*[1.5ex]
}
\newcommand{\subtotal}{%
\hline
\@ifstar
\subtotalStar%
\subtotalNoStar%
}
% Create a new row from date and hours worked (use stored fee type and hourly rate)
\newcommand*{\hourrow}[3]{%
\addtocounter{hours}{1000 * \real{##2}}%
\addtocounter{subhours}{1000 * \real{##2}}%
\unitrow{##1}{##2}{##3}{\selectlanguage{greek} Greek:hours}%
}
\renewcommand{\tabcolsep}{0.8ex}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{@{\extracolsep{\fill}\hspace{\tabcolsep}} l r r r }
\hline
{\bf Greek:Description of Services} & \multicolumn{1}{c}{\bf Greek:Quantity} & \multicolumn{1}{c}{\bf Greek:Unit Price} & \multicolumn{1}{c}{\bf Greek:Amount} \\* % <================================================
\hline\hline
\endhead
}{
\hline\hline\hline
{\bf Greek:Balance Due} & & & {\bf \$\total{cost}} \\ % <================================================
\end{longtable}
}
\makeatother
\begin{document}
\hfil{\Huge\bf Οδοντιατρείο Πέτρου Μουρούζη}\hfil
\bigskip\break
\hrule
Κ.Καραμανλή 77 \hfill (2310) 911-890 \\
Θεσσαλονίκη, 54642 \hfill \selectlanguage{english}{[email protected]}
\\ \\
\selectlanguage{greek}
{\bf Οικονομική ανάλυση εργασιών:} \\
\tab Αθανάσιος \\
\tab \\
{\bf Ημερομηνία:} \\
\tab \today \\
\selectlanguage{english}
\begin{invoiceTable}
\selectlanguage{greek}
\feetype{Οδοντιατρικές εργασίες}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{750}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{750}
\selectlanguage{greek}
\hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{250}
\selectlanguage{greek}
\hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα, 46}{1}{350}
\selectlanguage{greek}
\feetype{Προσωρινές αποκαταστάσεις}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 25-26-27}{1}{80}
\selectlanguage{greek}
\hourrow{Ολοκεραμική γέφυρα, 16-15-14}{1}{80}
\selectlanguage{greek}
\hourrow{Ολοκεραμικές στεφάνες, 36-37-47}{3}{50}
\selectlanguage{greek}
\hourrow{Ολοκεραμική στεφάνη σε εμφύτευμα 46}{1}{80}
\subtotal
\feetype{Greek:Expenses} % <================================================
\feerow{Greek:Web Hosting: October, 2012}{60} % <================================================
\end{invoiceTable}
\end{document}
결과는 다음과 같습니다.
물론 그리스어로 번역해야 합니다. 그러면 테이블이 다시 작아집니다.
답변2
조정할 수 있는 통화를 변경하려면이것대답하고 다음을 추가하십시오.
\renewcommand{\$}{\euro}
.
\selectlanguage{english}
예를 들어 이전에는 왜 항상 그렇게 하시나요 \begin{invoiceTable}
?