如何才能让 LaTeX 在行末断词更加美观?

如何才能让 LaTeX 在行末断词更加美观?

出于某种原因,我想输出一个非常小的页面 pdf 文件,比如 2.7 英寸 * 4.5 英寸。但是,在如此小的页面布局下,某些行的最后一行总是会有一些文字超出文本区域。以下是一个例子:

\documentclass[12pt,oneside]{book}

\usepackage[
showframe,
paperwidth=2.75in,
paperheight=4.9in,
left=0.1in,
right=0.1in,
top=0.1in,
bottom=0.18in,
footskip=10pt
]{geometry}

\begin{document}
PMI® is the leader and the most widely recognized organization in terms of promoting project management best practices. PMI® strives to maintain and endorse standards and ethics in this field and offers publications, training, seminars, chapters, special interest groups, and colleges to further the project management discipline.
\end{document}

有什么办法可以让它更一致吗?提前谢谢您。 在此处输入图片描述

答案1

使用microtype包和/或修改 \emergencystretch:

在此处输入图片描述

\documentclass[12pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[
showframe,
paperwidth=2.75in,
paperheight=4.9in,
left=0.1in,
right=0.1in,
top=0.1in,
bottom=0.18in,
footskip=10pt
]{geometry}

\setlength\emergencystretch{3em}
\usepackage{microtype}
\begin{document}
PMI® is the leader and the most widely recognized organization in terms of promoting project management best practices. PMI® strives to maintain and endorse standards and ethics in this field and offers publications, training, seminars, chapters, special interest groups, and colleges to further the project management discipline.
\end{document}

答案2

将声明添加\sloppy到您的序言中。此外,您应该\usepackage[utf8]{inputenc}在序言中使用,因为注册商标符号不可见(您可能需要utf8用您的编码替换)。

\documentclass[12pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage
  [showframe,
   paperwidth=2.75in,
   paperheight=4.9in,
   left=0.1in,
   right=0.1in,
   top=0.1in,
   bottom=0.18in,
   footskip=10pt
  ]{geometry}
\sloppy
\begin{document}
PMI® is the leader and the most widely recognized organization in
terms of promoting project management best practices. PMI® strives to
maintain and endorse standards and ethics in this field and offers
publications, training, seminars, chapters, special interest groups,
and colleges to further the project management discipline.
\end{document}

在此处输入图片描述

相关内容