![有什么办法可以强制文本行的方程式适合文本宽度?](https://linux22.com/image/319433/%E6%9C%89%E4%BB%80%E4%B9%88%E5%8A%9E%E6%B3%95%E5%8F%AF%E4%BB%A5%E5%BC%BA%E5%88%B6%E6%96%87%E6%9C%AC%E8%A1%8C%E7%9A%84%E6%96%B9%E7%A8%8B%E5%BC%8F%E9%80%82%E5%90%88%E6%96%87%E6%9C%AC%E5%AE%BD%E5%BA%A6%EF%BC%9F.png)
如何强制文本行方程适合\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}