![如何将标题“表格”更改为希腊语?](https://linux22.com/image/357531/%E5%A6%82%E4%BD%95%E5%B0%86%E6%A0%87%E9%A2%98%E2%80%9C%E8%A1%A8%E6%A0%BC%E2%80%9D%E6%9B%B4%E6%94%B9%E4%B8%BA%E5%B8%8C%E8%85%8A%E8%AF%AD%EF%BC%9F.png)
我想将标题“Table”更改为“Πίνακας”。因此,希腊语单词是“Πίνακας”。我尝试了许多命令,但都没有用。
我也尝试过这个包,babel
但是没有用。
当我使用\renewcommand{\tablename}{Πίνακας}
结果是:
\begin{longtable}{c c c c | c c c c}
\caption{\textit{Upper bounds on M with q=3}} \\ [-2ex]
\hline
Sr no. & \textit{N} & \textit{M} & \textit{E(f$ _{NOD} $)}& Sr no. & \textit{N} & \textit{M} & \textit{E(f$ _{NOD} $)}\\
\hline
1 &6 &5 &2 &17 &54 &25 &0\\
2 &9 &4 &0 &18 &57 &29 &2\\
3 &12 &7 &2 &19 &60 &31 &2\\
4 &15 &8 &2 &20 &63 &31 &0\\
5 &18 &7 &0 &21 &66 &34 &2\\
6 &21 &11 &2 &22 &69 &35 &2\\
7 &24 &13 &2 &23 &72 &34 &0\\
8 &27 &13 &0 &24 &75 &38 &2\\
9 &30 &16 &2 &25 &78 &40 &2\\
10 &33 &17 &2 &26 &81 &40 &0\\
11 &36 &16 &0 &27 &84 &43 &2\\
12 &39 &20 &2 &28 &87 &44 &2\\
13 &42 &22 &2 &29 &90 &43 &0\\
14 &45 &22 &0 &30 &93 &47 &2\\
15 &48 &25 &2 &31 &96 &49 &2 \\
16 &51 &26 &2 &32 &99 &49 &0\\
\hline
\end{longtable}
当我使用\renewcommand{\tablename}{ΠΙΝΑΚΑΣ}
结果是:
我认为问题出在小写和大写上。
有谁知道如何修理它?
谢谢你!
答案1
对我来说,以下是有效的:
\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage{longtable}
\usepackage[main=english,greek]{babel}
\addto\captionsenglish{
\renewcommand*{\tablename}{\textbf{\foreignlanguage{greek}{Πίνακας}}}%
}
\begin{document}
\begin{table}
\centering
\begin{tabular}{cc}
test&test
\end{tabular}
\caption{test}
\label{tab:test}
\end{table}
\begin{longtable}{c c c c | c c c c}
\caption{\textit{Upper bounds on M with q=3}} \\ [-2ex]
\hline
Sr no. & \textit{N} & \textit{M} & \textit{E(f$ _{NOD} $)}& Sr no. & \textit{N} & \textit{M} & \textit{E(f$ _{NOD} $)}\\
\hline
1 &6 &5 &2 &17 &54 &25 &0\\
2 &9 &4 &0 &18 &57 &29 &2\\
3 &12 &7 &2 &19 &60 &31 &2\\
4 &15 &8 &2 &20 &63 &31 &0\\
5 &18 &7 &0 &21 &66 &34 &2\\
6 &21 &11 &2 &22 &69 &35 &2\\
7 &24 &13 &2 &23 &72 &34 &0\\
8 &27 &13 &0 &24 &75 &38 &2\\
9 &30 &16 &2 &25 &78 &40 &2\\
10 &33 &17 &2 &26 &81 &40 &0\\
11 &36 &16 &0 &27 &84 &43 &2\\
12 &39 &20 &2 &28 &87 &44 &2\\
13 &42 &22 &2 &29 &90 &43 &0\\
14 &45 &22 &0 &30 &93 &47 &2\\
15 &48 &25 &2 &31 &96 &49 &2 \\
16 &51 &26 &2 &32 &99 &49 &0\\
\hline
\end{longtable}
\end{document}
答案2
正如 OP 提到的,他/她使用XeLaTeX
,因此使用包的解决方案polyglossia
如下(基于@Skillmon 的回答)。
\documentclass{article}
\usepackage{longtable}
%\usepackage[main=english,greek]{babel}
\usepackage{polyglossia}
\setmainlanguage{english}
\setmainfont{Times New Roman}
\newfontfamily\greekfont{Times New Roman}
\addto\captionsenglish{
\renewcommand*{\tablename}{\textbf{Πίνακας}}%
}
\begin{document}
\begin{table}
\centering
\begin{tabular}{cc}
test&test
\end{tabular}
\caption{test}
\label{tab:test}
\end{table}
\begin{longtable}{c c c c | c c c c}
\caption{\textit{Upper bounds on M with q=3}} \\ [-2ex]
\hline
Sr no. & \textit{N} & \textit{M} & \textit{E(f$ _{NOD} $)}& Sr no. & \textit{N} & \textit{M} & \textit{E(f$ _{NOD} $)}\\
\hline
1 &6 &5 &2 &17 &54 &25 &0\\
2 &9 &4 &0 &18 &57 &29 &2\\
3 &12 &7 &2 &19 &60 &31 &2\\
4 &15 &8 &2 &20 &63 &31 &0\\
5 &18 &7 &0 &21 &66 &34 &2\\
6 &21 &11 &2 &22 &69 &35 &2\\
7 &24 &13 &2 &23 &72 &34 &0\\
8 &27 &13 &0 &24 &75 &38 &2\\
9 &30 &16 &2 &25 &78 &40 &2\\
10 &33 &17 &2 &26 &81 &40 &0\\
11 &36 &16 &0 &27 &84 &43 &2\\
12 &39 &20 &2 &28 &87 &44 &2\\
13 &42 &22 &2 &29 &90 &43 &0\\
14 &45 &22 &0 &30 &93 &47 &2\\
15 &48 &25 &2 &31 &96 &49 &2 \\
16 &51 &26 &2 &32 &99 &49 &0\\
\hline
\end{longtable}
\end{document}