Forgot password
 Register account
View 1808|Reply 0

根号内的下括号

[Copy link]

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2016-11-25 16:38 |Read mode
以前可能扯过,不过这次的处理方法和以前肯定有所不同,不管了……

$\sqrt{\underbrace{a+a+ \cdots +a}_{n\text 个}}$(代码 \sqrt{\underbrace{a+a+ \cdots +a}_{n\text 个}})
这样的效果当然不能直视了,处理方法可以用 \smash 配合 \vphantom 把深度处理掉,像这样:

\newcommand\smub[2]{%
\global\def\smubbox{{\underbrace{#1}_{#2}}}%
\vphantom{#1}\smash{\smubbox}}
\newcommand\smubv{\vphantom{\smubbox}}

最后一行的命令是用来在外面补回原来应有的深度,否则可能会与下一行产生重叠,
所以用法通常为:\sqrt{... \smub{...}{...} ...} \smubv

例:
  1. \begin{align*}
  2. f(k)&=\sqrt{\smub{aa \cdots a}{n\text 个}} \smubv \\
  3. &=\sqrt{\smub{\frac12+ \cdots +\frac12}{n\text 个}} \smubv \\
  4. &=\sqrt[n]{\smub{a+ \cdots +a}{n-1\text 个}+\frac1a} \smubv\\
  5. &\ge\cdots
  6. \end{align*}
Copy the Code
效果:
QQ截图20161125163423.png

测试文档: $type underbrace_in_sqrt.tex (651 Bytes, Downloads: 1030)

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-23 19:38 GMT+8

Powered by Discuz!

Processed in 0.013148 seconds, 25 queries