如何在文本中制作一个长方程跨越一行以上?

发布于 2024-09-18 16:38:24 字数 604 浏览 6 评论 0原文

我想在文本中输入一些数学方程。然而,由于方程太长,它延伸到页面右侧的页边距中。请看下图: alt text

我的 Latex 代码是:

The minimal cost is 1358.3333 calories, which is achieved by the
vector $[x_1, x_2, x_3, x_4, x_5, x_6]=[4.1667, 0.0000, 0.0000,
0.0000, 8.3333, 29.1667]$, where the total fat is $4.17\%$,
saturated fat and cholesterol both $0$, sodium $37.5\%$, total
carbohydrate, calcium and iron all $100\%$ meaning their constraints
active, dietary fiber $341.67\%$, vitamin A $5154.17\%$, vitamin C
$1600\%$.

任何人都知道如何使方程的扩展部分从下一个开始线?

谢谢和问候!

I would like to type some math equation within texts. However, because the equation is too long, it extends into the margin on the right side of the page. Please see the image below:
alt text

My Latex code is:

The minimal cost is 1358.3333 calories, which is achieved by the
vector $[x_1, x_2, x_3, x_4, x_5, x_6]=[4.1667, 0.0000, 0.0000,
0.0000, 8.3333, 29.1667]$, where the total fat is $4.17\%$,
saturated fat and cholesterol both $0$, sodium $37.5\%$, total
carbohydrate, calcium and iron all $100\%$ meaning their constraints
active, dietary fiber $341.67\%$, vitamin A $5154.17\%$, vitamin C
$1600\%$.

Anyone has some idea about how to make the extending part of the equation to start at the next line?

Thanks and regards!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

睡美人的小仙女 2024-09-25 16:38:24

Latex 不够聪明,无法在方程中找到合适的位置来换行,因此不会尝试这样做。你需要手动断线,或者自己拆分。一种明显的可能性是

$[x_1, x_2, x_3, x_4, x_5, x_6]$ 
$=[4.1667,   0.0000,  0.0000,  0.0000,    8.3333,   29.1667]$

(为了清楚起见插入换行符,不需要)

将方程放在自己的行中可能看起来更好,即换行 \begin{equation}

latex isn't clever enough to find suitable places in equations to break lines, and so does not attempt this. you need to break the line manually, or split it yourself. one obvious possibility is

$[x_1, x_2, x_3, x_4, x_5, x_6]$ 
$=[4.1667,   0.0000,  0.0000,  0.0000,    8.3333,   29.1667]$

(line break inserted for clarity, not needed)

it might look better to give the equation it's own line, ie wrap in \begin{equation}

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文