Forgot password
 Register account
View 5137|Reply 2

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

[Copy link]

414

Threads

1641

Posts

15

Reputation

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那种吗?

3200

Threads

7827

Posts

52

Reputation

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 同样高度且看不见的盒子。

414

Threads

1641

Posts

15

Reputation

Show all posts

original poster 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{ ...
这么麻烦,我只是想写一个大的括号

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-15 15:01 GMT+8

Powered by Discuz!

Processed in 0.016142 seconds, 26 queries