免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖
回复 2# kuing

这个链接中我那设计的格式太固定,无法灵活使用,重新设计如下:
  1. \documentclass{article}
  2. \newsavebox\jjbox
  3. \newcommand\ubrc[3][]{%
  4. \sbox\jjbox{\phantom{$\displaystyle#1$}}%
  5. \hspace{-\wd\jjbox}%
  6. {\underbrace{\usebox\jjbox#2}_{#3}}%
  7. }
  8. \newcommand\obrc[3][]{%
  9. \sbox\jjbox{\phantom{$\displaystyle#1$}}%
  10. \hspace{-\wd\jjbox}%
  11. {\overbrace{\usebox\jjbox#2}^{#3}}%
  12. }
  13. \begin{document}
  14. \[
  15. \obrc{1+9+4}{14}
  16. \ubrc[4]{+8+2}{14}
  17. \obrc[2]{+7+5}{14}
  18. \ubrc[5]{+6+3}{14}
  19. \obrc[3]{+10+1}{14}
  20. \]
  21. \[
  22. \ubrc{a+b+c+d}m
  23. \obrc[c+d]{+e+f}n
  24. \ubrc[e+f]{+g+h}p
  25. \]
  26. \[
  27. \ubrc{\frac12+\frac23+\cdots+\sum_{i=1}^nx_i}m
  28. \obrc[\sum_{i=1}^nx_i]{+e+f}n
  29. \]
  30. \end{document}
复制代码
效果:
TIM截图20190516233514.png
2019-5-16 23:35
这名字我喜欢

TOP

返回列表 回复 发帖