将方程式保留在页边距内

将方程式保留在页边距内

在使用优秀的希尼奇包中,我注意到内联表达式的一部分超出了页边距。恢复到传统的数字表示,我仍然观察到表达式的一部分超出了右边距。这是一个 MWE:

\documentclass[11pt]{article}

\usepackage[letterpaper]{geometry}
\usepackage{showframe}
\geometry{verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in}
\usepackage[nodisplayskipstretch,doublespacing]{setspace}
\setstretch{1.5}

\usepackage{siunitx} % All the SI unit nomenclature
  \sisetup{per=slash, load=abbr, output-complex-root = j, complex-root-position = before-number}

\newcommand{\E}{\varepsilon}  % epsilon

\begin{document}

Next, we consider the lossy case where the permittivity of metal layers is $\E_m = \num{-143.4967 - j 9.5173}$ and the compared results are shown in Figure 1 and listed in Table xyz.

Next, we consider the lossy case where the permittivity of metal layers is $\E_m = -143.4967 - j 9.5173$ and the compared results are shown in Figure 1 and listed in Table xyz.

\end{document}

编译结果为:

结果

我希望内联表达式尊重页边距。

答案1

只需添加microtype包即可自动纠正此问题:

\documentclass[11pt]{article}

\usepackage[letterpaper]{geometry}
\usepackage{showframe}
\geometry{verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in}
\usepackage[nodisplayskipstretch,doublespacing]{setspace}
\setstretch{1.5}

\usepackage{microtype}  % <======

\usepackage{siunitx} % All the SI unit nomenclature
  \sisetup{per=slash, load=abbr, output-complex-root = j, complex-root-position = before-number}

\newcommand{\E}{\varepsilon}  % epsilon

\begin{document}

Next, we consider the lossy case where the permittivity of metal layers is $\E_m = \num{-143.4967 - j 9.5173}$ and the compared results are shown in Figure 1 and listed in Table xyz.

Next, we consider the lossy case where the permittivity of metal layers is $\E_m = -143.4967 - j 9.5173$ and the compared results are shown in Figure 1 and listed in Table xyz.

\end{document}

在此处输入图片描述

答案2

“sloppypar”也解决了这个问题

\begin{sloppypar}Next, we consider the lossy case where the permittivity of metal layers is $\E_m = \num{-143.4967 - j 9.5173}$ and the compared results are shown in Figure 1 and listed in Table xyz.

\结束{sloppypar}

答案3

\allowbreak 对我来说很管用。例如:$a = x+y\allowbreak (z-1)$。

相关内容