编写乳胶文档时,可能会将数学文本放入两行不同的行,但这显然令人不快,因此我想使用以下解决方案来解决这个问题。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\noindent
This is an example of unbroken line.
%\vspace{0.1cm}
\noindent
By the equation above we argue that the following equation (by Euler) $e^{i\pi}+1=0$ which is useful.
\vspace{1cm}
\noindent
This is an example of \textbf{manually} broken line
%\vspace{0.1cm}
\noindent
By the equation above we argue that the following equation (by Euler)
\linebreak
$e^{i\pi}+1=0$ which is useful.
\end{document}
但是我不喜欢它,因为它不是自动的,所以如果我修改文本,我必须记住我插入了命令 \linebreak,该命令将在编辑后删除:因此,这可能会导致长文档中出现许多“错误”,因此我想在这里提出一个具体的问题,询问是否有一些命令可以放入序言中,以自动执行此操作。所以有人能帮帮我吗?
答案1
你可能正在寻找这样的东西,它{}
可以防止数学中的断线
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{parskip}
\begin{document}
This is an example of unbreaked line.
By the equation above we aruge that the following equiation (by Euler) $e^{i\pi}+1=0$ which is usefull.
This is an example of \textbf{manually} breaked line
By the equation above we argue that the following equation (by Euler)
$e^{i\pi}+1=0$ which is useful.
By the equation above we argue that the following equation (by Euler)
${e^{i\pi}+1=0}$ which is useful.
\end{document}
但另请参阅