Forgot password?
 Register account
View 5052|Reply 2

align里left和right需要换行时要怎么办?

[Copy link]

411

Threads

1623

Posts

110K

Credits

Credits
11833

Show all posts

abababa Posted 2025-5-18 10:35 |Read mode
如题,代码如下:
  1. \begin{align*}
  2. \left(\\
  3. &\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\\
  4. &\right)+x^2
  5. \end{align*}
Copy the Code

这个括上left和right之后,就编译不通过了,可能因为不在一行里?这要怎么办才行?用Big那种吗?

3159

Threads

7941

Posts

610K

Credits

Credits
63770
QQ

Show all posts

hbghlyj Posted 2025-5-18 21:38
用 \vphantom 在隐藏的公式上占位:
\def\formula{\frac{1}{a}+\frac{1}{b}+\frac{1}{c}}
\begin{align*}
\left(\vphantom\formula\right.\\
&\formula\\
&\left.\vphantom\formula\right)+x^2
\end{align*}
其中 \vphantom\formula 会生成一个和 \formula 同样高度且看不见的盒子。

411

Threads

1623

Posts

110K

Credits

Credits
11833

Show all posts

 Author| abababa Posted 2025-5-19 08:51
hbghlyj 发表于 2025-5-18 21:38
用 \vphantom 在隐藏的公式上占位:
[precode]\def\formula{\frac{1}{a}+\frac{1}{b}+\frac{1}{c}}
\begin{ ...
这么麻烦,我只是想写一个大的括号

Mobile version|Discuz Math Forum

2025-5-31 11:06 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit