文字超出頁邊距

文字超出頁邊距

我不知道為什麼,但我的文字中有一行超出了頁邊距。

影像

我怎樣才能避免這個問題?

我在 TeXworks 中使用classicthesis

編輯:使用命令

\overfullrule=5pt

我可以看到出現此問題的黑色方塊。

這裡有一個微量元素myclassicthesis-preamble

\documentclass{scrreprt}

\usepackage[english]{babel}

\usepackage{myclassicthesis-preamble}
\usepackage{classicthesis}
\usepackage{microtype}

\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\small\textsc{#1}}

\overfullrule=5pt

\begin{document}

\begin{description}
\item[Service Delivery Framework] The infrastructure to create, publish, manage and consume FI services across their life cycle, addressing all technical and business aspects.
\item[Interface to the Network and Devices] The open interfaces to networks and devices, harmonizing the connectivity needs of services built on top of the platform.
\end{description}

Lastly, on the \emph{political dimension}, legal and legislative barriers presently hinder the efficient cross-border establishment of new innovative solutions due to complex or incompatible ICT policies in Europe.

\end{document}

兩個可能的問題:這一行

\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\small\textsc{#1}}

myclassicthesis-preamble以及(第 63-70 行)中的修改

\PassOptionsToPackage{
            eulerchapternumbers,
            beramono,
            eulermath,          
            pdfspacing,         
            floatperchapter          
            }
{classicthesis}

特別是選項pdfspacing

答案1

TeX 不使用連字號是presently由於兩個同時存在的因素:

  1. 這個單字present不能自動連字符,因為當它是動詞或名詞時它會改變音節(就像record);

  2. 英語的右連字符最小值設定為 3,即 TeX 不允許在新行上留下少於 3 個連字符的單字。

如果我們設置\righthyphenmin=2,則按預期\showhyphens{presently}給出。present-ly載入ushyphenmax透過絲狀體不會連字符presently,原因與 相同\righthyphenmin=3\hyphenation{pres-ent-ly}在序言中說允許連字符為pres-ently(但不允許present-ly,因為兩個字母太少了。)。

在緊急情況下,可以透過鍵入來允許連字符present\-ly,這將覆蓋預設的最小值。

格式設定為經典論文非常嚴格,您的文字顯示了長描述標籤可能出現的問題。如果可能的話,除了修改文字之外,沒有什麼可做的。我會\sloppy盡可能避免,因為它允許產生間距很差的段落。

更好的策略是使用\emergencystretch: 並進行以下修改

\begingroup\emergencystretch=.3em
\begin{description}

\item[Service Delivery Framework] The infrastructure to create, publish, manage and consume
FI services across their life cycle, addressing all technical and business aspects.

\item[Interface to the Network and Devices] The open interfaces to networks and devices,
harmonizing the connectivity needs of services built on top of the platform.

\end{description}

\endgroup

Lastly, on the \emph{political dimension}, legal and legislative barriers present\-ly hinder
the efficient cross-border establishment of new innovative solutions due to complex or
incompatible ICT policies in Europe.

文字將被排版,沒有任何過滿的框,間距也不會太差。

還應該注意的是微型 自動載入經典論文(第 219 行classicthesis.sty\RequirePackage{microtype)。

答案2

編輯:您的文件中似乎有一些特別不幸的地方,只有 a\sloppy會有所幫助。儘管如此,這裡有一些資訊可能有助於更好地理解連字符並減少這些位置。請注意以下內容僅適用於美式連字符模式,這是由 (La)TeX 加載的預設值,由babel的選項加載englishamericanusenglish,它們是全部都一樣

正如已經提到的,TeX 不知道如何連字符目前。這可以透過編譯包含以下內容的文檔看出\showhyphens{presently}:隨後,連字符點目前將被放入 .log 文件中——事實證明,沒有。正如@percusse 指出的,添加\hyphenation{pre-sent-ly}到你的序言中將解決這個詞的問題,但你注意到還有更多。所以你還可以做以下事情:

載入最新的連字符模式

插入

\RequirePackage[english=usenglishmax]{hyphsubst}

甚至\documentclass{...}可以載入更新的連字符模式\usepackage[english]{babel}(美國模式)。

手動包含已知的連字符異常

連字符異常日誌(2010 年 11 月)是「定期更新 TeX 無法正確連接的單字清單」(同上,第 1001 頁)。在第 1005 頁,它確認 TeX 不知道如何連字符目前,並列出所需的連字符pres-ent-ly

以下是有關如何使用連字符例外清單的相關段落:

將此列表轉換為機器可用的連字例外

Werner Lemberg 創建了一個腳本,可以將本文轉換為真實的\hyphenation區塊,可以直接或透過輸入檔案將其合併到文件中。他的工作需要對用於格式化清單的巨集進行一些更改,但清單的外觀不會改變。許多變形形式將自動包含在內,其中一些在印刷版本中很明顯,但許多都默默包含在內。腳本hyphenex.sh是一個簡單的 shell 腳本,發佈在 CTAN 上,位於tex-archive/info/digests/tugboat/hyphenex/ 腳本的輸出發佈在與 相同的區域ushyphex.tex

(同上,第 1001 頁)

除此之外,我同意 Peter 使用該microtype軟體包的建議,它總體上改進了連字符,並為您的文件提供了更均勻的灰度係數。

答案3

沒有微量元素很難確定。

發生這種情況的常見原因是 TeX 無法滿足Overfull \hbox訊息中的所有間距規則。解決此問題的一種方法是新增\sloppy放寬字間距規則的內容。看以下問題的答案為什麼文字的放置超出了指定的線寬?以獲得更詳細的解釋。

或者您可以添加\usepackage{microtype}到序言中。請參閱微類型包文檔 更多細節。

答案4

也許 LaTeX 不知道如何連接“目前”?在這種情況下,您可以透過將其寫為 來告訴它如何執行此操作pres\-ent\-ly

相關內容