像普通文本一样换行

像普通文本一样换行

我正在尝试编写一个包含公式的 APA 样式段落,但是 LaTeX 似乎决定尝试将公式保留在整行上,而不是像文本那样自然地换行到下一行。以下是它现在的样子:

例子

它应该换行。有没有一种自动方法可以让它像标志中没有的任何其他文本一样换行$$

编辑:

这是我的文本(包括软件包):

\documentclass[letterpaper,man,natbib]{apa6}

\usepackage[english]{babel} \usepackage[utf8x]{inputenc}
\usepackage{amsmath} \usepackage{graphicx} \usepackage{breqn}

$F(3,36) = 14.017, p < 0.001, n^2_{partial} = 0.539$. Specifically,
participants who were in the no perfume group ($M = 6.4, SE = 0.34$)
gave significantly higher ratings than participants who were in the No
Name ($M=3.4, SE=0.37$), $q(3,36) = 8.30, p < 0.01, d = 2.67$,
PopStar($M=3.7, SE = 0.33$), $q(3,36) = 7.47, p < 0.01, d = 5.53$, or
MovieStar($M=4.3, SE = 0.40$), $q(3,36) = 5.81, p < 0.01, d = 1.81$
groups.

这是我的全文论文的样本,我希望这足够了。

答案1

您的文档似乎使用了\raggedright样式对齐而不是完全对齐请按照以下格式输入“方程式”:

NoName $(M=3.4, SE=0.37)$, $q(4,36)=7.47, p<0.01, d=2.67$;
PopStar $(M=3.7, SE=0.33)$, $q(4,36)=8.30, p<0.01, d=5.53$; or
MovieStar $(M=4.3, SE=0.40)$, $q(4,36)=5.81, p<0.01, d=1.81$ groups.

参见下面的面板 A,它几乎成功地复制了您的屏幕截图的“外观”。我将这种数学风格称为“长方程式”风格。

假设这个猜测是正确的,有两种补救措施需要考虑:

  • 使用\RaggedRight(包提供的宏ragged2e)代替\raggedright,并且

  • 使用“短”方程,即写

    NoName ($M=3.4$, $SE=0.37$), $q(4,36)=7.47$, $p<0.01$, $d=2.67$;
    PopStar ($M=3.7$, $SE=0.33$), $q(4,36)=8.30$, $p<0.01$, $d=5.53$; or
    MovieStar ($M=4.3$, $SE=0.40$), $q(4,36)=5.81$, $p<0.01$, $d=1.81$ groups.
    

    注意现在每行有 5 个方程,而不是 2 个。我当然推荐“短方程”样式。

\RaggedRight正如下面的 B、C 和 D 面板所示,如果您使用和“短”方程式样式的组合之一,您将获得更令人满意的输出。

面板 E 显示了 (a) 完全对齐有效且 (b) 使用简短方程式时产生的“外观”。

在此处输入图片描述

\documentclass{article}
\usepackage{amstext,ragged2e}
\usepackage[textwidth=5.6in]{geometry}
\usepackage{setspace} \onehalfspacing
\begin{document}

\begingroup
\noindent
\verb+A. \raggedright, "long" equations+

\noindent\raggedright
ratings $F(3.36)=14.017$, $p<0.001$, $n^2_{\text{partial}}=0.539$. Specifically, participants who were in the no perfume group ($M=6.4, SE=0.34$) gave significantly higher ratings than participants who were in the NoName $(M=3.4, SE=0.37)$, $q(4,36)=7.47, p<0.01, d=2.67$;
PopStar $(M=3.7, SE=0.33)$, $q(4,36)=8.30, p<0.01, d=5.53$; or
MovieStar $(M=4.3, SE=0.40)$, $q(4,36)=5.81, p<0.01, d=1.81$ groups.

\endgroup
\bigskip\bigskip
\begingroup
\noindent
\verb+B. \RaggedRight, "long" equations+

\noindent\RaggedRight
ratings $F(3.36)=14.017$, $p<0.001$, $n^2_{\text{partial}}=0.539$. Specifically, participants who were in the no perfume group ($M=6.4, SE=0.34$) gave significantly higher ratings than participants who were in the NoName $(M=3.4, SE=0.37)$, $q(4,36)=7.47, p<0.01, d=2.67$;
PopStar $(M=3.7, SE=0.33)$, $q(4,36)=8.30, p<0.01, d=5.53$; or
MovieStar $(M=4.3, SE=0.40)$, $q(4,36)=5.81, p<0.01, d=1.81$ groups.

\endgroup

\bigskip\bigskip
\begingroup

\noindent
\verb+C. \raggedright, "short" equations+

\raggedright
\noindent
ratings $F(3.36)=14.017$, $p<0.001$, $n^2_{\text{partial}}=0.539$. Specifically, participants who were in the no perfume group ($M=6.4$, $SE=0.34$) gave significantly higher ratings than participants who were in the NoName ($M=3.4$, $SE=0.37$), $q(4,36)=7.47$, $p<0.01$, $d=2.67$;
PopStar ($M=3.7$, $SE=0.33$), $q(4,36)=8.30$, $p<0.01$, $d=5.53$; or
MovieStar ($M=4.3$, $SE=0.40$), $q(4,36)=5.81$, $p<0.01$, $d=1.81$ groups.

\endgroup

\bigskip\bigskip
\begingroup
\noindent
\verb+D. \RaggedRight, "short" equations+

\noindent\RaggedRight
ratings $F(3.36)=14.017$, $p<0.001$, $n^2_{\text{partial}}=0.539$. Specifically, participants who were in the no perfume group ($M=6.4$, $SE=0.34$) gave significantly higher ratings than participants who were in the NoName ($M=3.4$, $SE=0.37$), $q(4,36)=7.47$, $p<0.01$, $d=2.67$;
PopStar ($M=3.7$, $SE=0.33$), $q(4,36)=8.30$, $p<0.01$, $d=5.53$; or
MovieStar ($M=4.3$, $SE=0.40$), $q(4,36)=5.81$, $p<0.01$, $d=1.81$ groups.

\endgroup
\bigskip\bigskip
\noindent
\verb+E. full justification, "short" equations+

\noindent
ratings $F(3.36)=14.017$, $p<0.001$, $n^2_{\text{partial}}=0.539$. Specifically, participants who were in the no perfume group ($M=6.4$, $SE=0.34$) gave significantly higher ratings than participants who were in the NoName ($M=3.4$, $SE=0.37$), $q(4,36)=7.47$, $p<0.01$, $d=2.67$;
PopStar ($M=3.7$, $SE=0.33$), $q(4,36)=8.30$, $p<0.01$, $d=5.53$; or 
MovieStar ($M=4.3$, $SE=0.40$), $q(4,36)=5.81$, $p<0.01$, $d=1.81$ groups.

\end{document} 

相关内容