在数学模式中添加新行

在数学模式中添加新行

我尝试records with在数学模式后强制添加新行。在这种情况下我该怎么做?我试过,但\n没有成功。

\documentclass[
    english,
    german,
    11pt,
    twoside,
    a4paper,
    headsepline,
    footsepline
]{scrbook}

\usepackage{amsmath}

\begin{document}


 After counting 6 records with the same stop\_name whereby 
 $behaviour\_id_{~records~ with~ the~ same~  stop\_name} > 
 behaviour\_id_{~min ~distance~ record}$, the speed average 
 of all these records is calculated. So in the case that the 
 speed average was less than 

\end{document}

答案1

您要编写的公式只有一个可行的断点,位于符号后>。没有真正的方法可以将其内联打印,因为正如您所见,它大约只有一行长;我看到的唯一方法是显示它。如果您希望读者理解您正在写的内容,那么在下标中间断点绝对不是一个选择。

请注意,变量应始终以相同的方式排版,并且文本下标应直立。

\documentclass[
    11pt,
    twoside,
    a4paper,
    headsepline,
    footsepline
]{scrbook}
\usepackage[T1]{fontenc}
\usepackage{amsmath}

\newcommand{\var}[1]{\textit{#1}}

\begin{document}

After counting 6 records with the same \var{stop\_name} whereby
\[
\var{behaviour\_id}_{\,\textup{records with the same \var{stop\_name}}} >
\var{behaviour\_id}_{\,\textup{min distance record}},
\]
the speed average of all these records is calculated. So in the case
that the speed average was less than

\end{document}

在此处输入图片描述

答案2

尽管我不建议您这样做,但您可以尝试\substack(包含在amsmath包中):

$behaviour\_id_{\substack{records~ with\\ the~ same~  stop\_name}} > 
behaviour\_id_{~min ~distance~ record}$

相关内容