如何强制文本行方程适合\textwidth
?以下是演示代码:
\documentclass{article}
\begin{document}
\section{Width of equation in text line}
text text text text text text text text text text text text text text text text text text text text\,\,\,
This model $\sum\limits_{i=1}^N a_i^2$ looks not good. \,\,text text text text text text text text text texttext text text text text text text
\begin{enumerate}
\item text text text text text text text text text text text text
\item It's not good in enumerate environment like $\sum\limits_{i=1}^N a_i^2$. text text
\item text text text text text text text text text text text text
\end{enumerate}
\end{document}
答案1
作为Gonzalo Medina 评论,如果您关心的是内联数学的高度(而不是宽度),则可以使用\nolimits
而不是\limits
。这不会抑制您显然需要的限制,但它将它们放在求和符号的右侧,这样它们就不会占用额外的垂直空间。
作为Au101指出但是,\nolimits
在内联数学中是默认的,因此\limits
可以简单地省略:
\documentclass{article}
\begin{document}
\section{Width of equation in text line}
text text text text text text text text text text text text text text text text text text text text\,\,\,
This model $\sum_{i=1}^N a_i^2$ looks not good. \,\,text text text text text text text text text texttext text text text text text text
\begin{enumerate}
\item text text text text text text text text text text text text
\item It's not good in enumerate environment like $\sum_{i=1}^N a_i^2$. text text
\item text text text text text text text text text text text text
\end{enumerate}
\end{document}