
我正在嘗試(使用 TeXLive 2013)讓我的標點符號完全延伸到左右頁邊距。我不知道如何包含圖像,所以我會盡力在這裡格式化它以展示我的意思:
Text with normal space
"Quotation mark hanging"
text with normal space
如果我使用 pdfTeX 和 microtype 以及以下程式碼,它可以工作:
\documentclass{article}
\usepackage{microtype}
\LoadMicrotypeFile{cmr}
\SetProtrusion
{encoding=OT1,family=cmr}
{\textquotedblleft = {1000, },\textquotedblright = { ,1000}}
\begin{document}
Text\\
text\\
"text"\\
text.
\end{document}
(你看不到右邊距,但它也有效)。當然,我想使用 LuaLaTeX,這樣我就可以獲得所有精美的字體,但為了簡單起見:
\documentclass{article}
\usepackage{fontspec}
\usepackage{microtype}
\LoadMicrotypeFile{cmr}
\SetProtrusion
{encoding=OT1,family=cmr}
{\textquotedblleft = {1000, },\textquotedblright = { ,1000}}
\begin{document}
Text\\
text\\
"text"\\
text.
\end{document}
使用 LuaLaTeX 進行編譯,我得到了正常的突出(即使我使用 0 或 3000 進行修改,大約半個引號),但它與我沒有包含所有“\SetProtrusion”業務完全相同。由於我使用的是 LuaLaTeX,我希望能夠使用我自己的字體,所以如果我這樣做:
\documentclass{article}
\usepackage{fontspec}
\usepackage{microtype}
\setmainfont[Ligatures=TeX]{Garamond Premier Pro}
% \LoadMicrotypeFile{cmr}
\SetProtrusion
{encoding=OT1,family=Garamond Premier Pro}
{\textquotedblleft = {1000, },\textquotedblright = { ,1000}}
\begin{document}
Text\\
text\\
"text"\\
text.
\end{document}
這產生的東西看起來與我剛剛使用沒有“\SetProtrusion”業務的微型沒有什麼不同,即正常的突出量。
該hanging
軟體包存在並且做得不錯,但不包括任何控制突出量的方法,加上使用它的手冊警告,因為它將標點符號視為命令而不是字形(我不明白其中的區別),然後當然我不確定它是如何工作/衝突的microtype
(儘管我猜想可以關閉突出部分microtype
並讓其hanging
處理這個問題?)
還有:
\usepackage[factor=3000]{microtype}
這得到了我想要的左側懸掛標點符號,但確實搞砸了右側。
還有其他涉及類似想法的問題,但其中一些是舊的,另一些則提到了有關使用的內容,Renderer=Basic
但這不僅沒有幫助,而且看起來它完全關閉了突出,或者至少使引號看起來奇怪地間隔開。然後其他問題似乎不涉及系統字體。
所以歸根結底,我不知道如何在使用 LuaLaTeX 時指定突出設置,或者microtype
是否可能這樣做。
答案1
好的,這有效,顯然我沒有選擇正確的編碼並使用星號解決了它:
\documentclass{article}
\usepackage{fontspec}
\usepackage{microtype}
\setmainfont[Ligatures=TeX]{Garamond Premier Pro}
\SetProtrusion
{encoding= *}
{\textquotedblleft = {1000, },\textquotedblright = { ,1000}}
\begin{document}
Text\\
text\\
"text"\\
text.
\end{document}
我不確定為什麼 OT1 不起作用,或者使用星號是否有任何問題,但它適用於幾種不同的字體,所以我想我的問題得到了解答。