![表内のLaTeX翻字システムを操作するにはどうすればいいですか](https://rvso.com/image/348612/%E8%A1%A8%E5%86%85%E3%81%AELaTeX%E7%BF%BB%E5%AD%97%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0%E3%82%92%E6%93%8D%E4%BD%9C%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%81%84%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B.png)
表にアラビア文字を記入しており、適切に表示されるように翻字システムを操作したいと考えています。
コードは以下の通りです。
\begin{table}[ht]
\centering
\caption{Description of AWN.}
\label{tab2}
\begin{tabular}{ l | p{3cm} | l | l | l }
\hline\noalign{\smallskip}
& \textbf{Antonym seed}\hspace*{6mm} & \textbf{Translation}\hspace*{4mm} & \textbf{Frequency}\hspace*{4mm} & \textbf{LogDice}\hspace*{4mm} \\
\noalign{\smallskip}
\hline
\noalign{\smallskip}
\textbf{1} & \<قريب, بعيد> & far near & 47,044 & \\
\noalign{\smallskip}
\textbf{2} & \<قليل, كثير> & d & 21,107 & \\
\noalign{\smallskip}
\textbf{3} & \<حيَ, ميت> & d & 4,505 & \\
\noalign{\smallskip}
\textbf{4} & \<أكبر, أصغر> & d & 5,358 & \\
\noalign{\smallskip}
\textbf{5} & \<غني, فقير> & d & 2,564 & \\
\noalign{\smallskip}
\textbf{6} & \<جديد, قديم> & d & 3,453 & \\
\noalign{\smallskip}
\textbf{7} & \<حر, عبد> & d & 4,390 & \\
\noalign{\smallskip}
\textbf{8} & \<قصير, طويل> & dd & 2,106 & \\
\noalign{\smallskip}
\textbf{9} & \<شرقي, غربي> & k & 2,757 & \\
\noalign{\smallskip}
\textbf{10} & \<صالح, طالح> & d & 1,566 & \\
\noalign{\smallskip}
\hline
\end{tabular}
\end{table}
翻字は下アラビア語の単語は次それに。
どうすればいいですか?
答え1
完全な例ではなくスニペットだけなので、あなたの懸念を理解して対処するのは困難です。不足している要素を追加しようとしましたが、最初に現れた問題は、列を区切る縦線の隙間でした。しかし、表の縦線はほとんどの場合望ましくないため、太字、置換booktabs
、スモールキャップとともに削除しました。これらの美的問題がなくなると、あなたの困難と思われる部分が明らかになりました。あなたはアラビア語の下に翻字を置きたいと思っており、列幅を 3cm に制限することでそれを実現しようとしていますが、その結果、翻字はアラビア語の下に、またはアラビア語と同じ行に現れることがあります。
arabtex
エンジンを使用しているようですpdftex
。arabtex
パッケージは非常に複雑で、専門家が大手術を行わない限り、希望する場所に翻字を配置できるとは思えません。列幅を小さくすることで問題を強制的に解決できますが、オーバーフル ボックスとアンダーフル ボックスに関する警告が表示され、アラビア語が右揃えになる必要があるため、出力が雑に見えます。
\documentclass[12pt]{article}
\usepackage{booktabs,lmodern,arabtex,utf8}
\setlength{\abovetopsep}{1ex}
\begin{document}
\setcode{utf8}
\transtrue
\begin{table}[ht]
\centering
\linespread{1.1035}
\caption{Description of AWN.}
\label{tab2}
\begin{tabular}{@{}rp{2cm}crl@{}}
\toprule
& \scshape Antonym seed & \scshape Translation & \scshape Frequency & \scshape LogDice\\
\midrule
1. & \<قريب, بعيد> & far near & 47,044 & \\
2. & \<قليل, كثير> & d & 21,107 & \\
3. & \<حيَ, ميت> & d & 4,505 & \\
4. & \<أكبر, أصغر> & d & 5,358 & \\
5. & \<غني, فقير> & d & 2,564 & \\
6. & \<جديد, قديم> & d & 3,453 & \\
7. & \<حر, عبد> & d & 4,390 & \\
8. & \<قصير, طويل> & dd & 2,106 & \\
9. & \<شرقي, غربي> & k & 2,757 & \\
10. & \<صالح, طالح> & d & 1,566 & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
arabtex
翻字を本来の配置場所に置いた場合の見た目を比較してみましょう。
\documentclass[12pt]{article}
\usepackage{booktabs,lmodern,arabtex,utf8}
\setlength{\abovetopsep}{1ex}
\begin{document}
\setcode{utf8}
\transtrue
\begin{table}[ht]
\centering
\linespread{1.1035}
\caption{Description of AWN.}
\label{tab2}
\begin{tabular}{@{}rrcrl@{}}
\toprule
& \scshape Antonym seed & \scshape Translation & \scshape Frequency & \scshape LogDice\\
\midrule
1. & \<قريب, بعيد> & far near & 47,044 & \\
2. & \<قليل, كثير> & d & 21,107 & \\
3. & \<حيَ, ميت> & d & 4,505 & \\
4. & \<أكبر, أصغر> & d & 5,358 & \\
5. & \<غني, فقير> & d & 2,564 & \\
6. & \<جديد, قديم> & d & 3,453 & \\
7. & \<حر, عبد> & d & 4,390 & \\
8. & \<قصير, طويل> & dd & 2,106 & \\
9. & \<شرقي, غربي> & k & 2,757 & \\
10. & \<صالح, طالح> & d & 1,566 & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
これで良くなりましたが、まだ理想的ではありません。改善するには、自動翻字をオフにして、「翻字」という見出しが付いた左揃えの列を追加し、翻字を手動で入力します。面倒ですが、不可能ではありません。
arabxetex
より柔軟性があるかもしれません。