找回密码
 快速注册
搜索
查看: 39|回复: 3

\sqrt在\displaystyle与\textstyle的width/depth/height

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2023-7-25 22:45 |阅读模式
本帖最后由 hbghlyj 于 2023-7-25 22:58 编辑 测量$\sqrt{x^2+y^2}$的width/depth/height
  1. \documentclass{article}
  2. \begin{document}
  3. \newlength{\mywidth}
  4. \settowidth{\mywidth}{$\sqrt{x^2+y^2}$}
  5. \newlength{\mydepth}
  6. \settodepth{\mydepth}{$\sqrt{x^2+y^2}$}
  7. \newlength{\myheight}
  8. \settoheight{\myheight}{$\sqrt{x^2+y^2}$}
  9. \the\mywidth
  10. \the\mydepth
  11. \the\myheight
  12. \end{document}
复制代码

输出
42.17128pt
2.8223pt
9.57779pt


测量$\displaystyle\sqrt{x^2+y^2}$的width/depth/height
  1. \documentclass{article}
  2. \begin{document}
  3. \newlength{\mywidth}
  4. \settowidth{\mywidth}{$\displaystyle\sqrt{x^2+y^2}$}
  5. \newlength{\mydepth}
  6. \settodepth{\mydepth}{$\displaystyle\sqrt{x^2+y^2}$}
  7. \newlength{\myheight}
  8. \settoheight{\myheight}{$\displaystyle\sqrt{x^2+y^2}$}
  9. \the\mywidth
  10. \the\mydepth
  11. \the\myheight
  12. \end{document}
复制代码

输出
42.17128pt
2.3341pt
10.06598pt

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2023-7-25 22:46

MathML两种math-style对比

本帖最后由 hbghlyj 于 2023-7-25 22:59 编辑

当前浏览器

math-style: normal

x 2 + y 2

math-style: compact

x 2 + y 2
Firefox 截图(字体: STIX Two Math) Screenshot 2023-07-25 at 22-53-30 _sqrt在_displaystyle的width_depth_height - TeX.png
Chrome截图(字体: STIX Two Math) Screenshot 2023-07-25 225232.png

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2023-7-25 22:54
Firefox在math-style: normal时,根号左边下沉太高

730

主题

1万

回帖

9万

积分

积分
93593
QQ

显示全部楼层

kuing 发表于 2023-7-25 23:45

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 11:58

Powered by Discuz!

× 快速回复 返回顶部 返回列表