私は約 200 ページ以上の A5 サイズの本を制作中です。pdflatex から xelatex に移行する過程で、レイアウトに重大な違いがあることに気付きました。問題を突き止めるために、pdflatex 用の MWE にたどり着きました。
\documentclass[paper=a5,pagesize,fontsize=13pt]{scrbook}
\usepackage{showframe}
\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}
\begin{document}
Hello, here is some text without a meaning. This text
should show what a printed text will look like at this place.
\end{document}
もし
\usepackage[T1]{fontenc}
が有効な場合、最初のテキスト行は「This text」で終わります。コメントアウトされている場合は、「This text should」で終わり、オーバーフルボックスも生成されます。
答え1
その違いは
OT1:
.\OT1/LinuxLibertineT-TOsF/m/n/13 i
.\OT1/LinuxLibertineT-TOsF/m/n/13 n
.\OT1/LinuxLibertineT-TOsF/m/n/13 g
.\OT1/LinuxLibertineT-TOsF/m/n/13 .
.\glue 3.7921 plus 4.875 minus 0.36096
.\OT1/LinuxLibertineT-TOsF/m/n/13 (ligature Th)
.\OT1/LinuxLibertineT-TOsF/m/n/13 i
.\OT1/LinuxLibertineT-TOsF/m/n/13 s
.\glue 3.25 plus 1.625 minus 1.08289
.\OT1/LinuxLibertineT-TOsF/m/n/13 t
.\OT1/LinuxLibertineT-TOsF/m/n/13 e
.\kern-0.091
.\OT1/LinuxLibertineT-TOsF/m/n/13 x
.\OT1/LinuxLibertineT-TOsF/m/n/13 t
T1:
....\T1/LinuxLibertineT-TOsF/m/n/13 i
....\T1/LinuxLibertineT-TOsF/m/n/13 n
....\T1/LinuxLibertineT-TOsF/m/n/13 g
....\T1/LinuxLibertineT-TOsF/m/n/13 .
....\glue 3.7921 plus 4.875 minus 0.36096
....\T1/LinuxLibertineT-TOsF/m/n/13 T
....\T1/LinuxLibertineT-TOsF/m/n/13 h
....\T1/LinuxLibertineT-TOsF/m/n/13 i
....\T1/LinuxLibertineT-TOsF/m/n/13 s
....\glue 3.25 plus 1.625 minus 1.08289
....\T1/LinuxLibertineT-TOsF/m/n/13 t
....\T1/LinuxLibertineT-TOsF/m/n/13 e
....\kern-0.091
....\T1/LinuxLibertineT-TOsF/m/n/13 x
....\T1/LinuxLibertineT-TOsF/m/n/13 t
つまり、OT1 フォントには、T1 フォントにはない Th 合字があります。これは少し意外ですが、必ずしもバグではありません。その後、単語の長さがわずかに異なり、段落の改行が異なるパスを取るのに十分です。
次のような合字を避けることもできます
\documentclass[paper=a5,pagesize,fontsize=13pt]{scrbook}
\usepackage{showframe}
%\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}
%\showoutput
\begin{document}
Hello, here is some text without a meaning. T{}his text
should show what a printed text will look like at this place.
\end{document}
答え2
OT1フォントのTh合字を無効にするには、以下をロードしてmicrotype
実行します。
\DisableLigatures[T]{encoding=OT1}
ただし、次の例に示すように、T に対するカーニングも無効になるという欠点があります。
\documentclass[paper=a5,pagesize,fontsize=13pt]{scrbook}
\usepackage{showframe}
\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}
\usepackage{microtype}
\DisableLigatures[T]{encoding=OT1}
\begin{document}
\fontencoding{OT1}\selectfont
Hello, here is some text without a meaning. This text
should show what a printed text will look like at this place.
To
\fontencoding{T1}\selectfont
Hello, here is some text without a meaning. This text
should show what a printed text will look like at this place.
To
\end{document}
したがって、あなたの問題に対する本当の解決策はありません。パッケージのメンテナーに、libertine
OT1エンコードでTh合字を無効にするオプションを追加するよう依頼することができます(新しい仮想フォントセットが必要です)。私の意見では、これはとても良い機能です。リガチャが本当にひどいと思います。