如何实现图片里的效果 财富值3

2020-01-10 23:59发布

我想在这个模板里实现以下的效果 ![我想实现的效果](https://pics.latexstudio.net/data/images/202001/edd451a4b2f74fb.png 我想实现的...

我想在这个模板里实现以下的效果 ![我想实现的效果](https://pics.latexstudio.net/data/images/202001/edd451a4b2f74fb.png "我想实现的效果") 即左右侧的上下标与中心的`I`离的不太近, 且左右的上标和下标是垂直对齐的, 按照我模板里的书写方式只能实现到如下效果![我实现的效果](https://pics.latexstudio.net/data/images/202001/81a4fe05fe9c78c.png "我实现的效果") 模板的代码如下 https://paste.ubuntu.com/p/4bQGbxm8Sg/
1条回答
论坛 github.com/C
2020-01-11 00:02
`mathtools` 宏包的 `\prescript` 命令。 如果不想或不能加载 `mathtools` 宏包,可以把相关定义多带带抽取 ```tex \documentclass{article} \usepackage{amsmath} \makeatletter \DeclareRobustCommand{\prescript}[3]{ \mathchoice {\@prescript{#1}{#2}{#3}{\scriptstyle}} {\@prescript{#1}{#2}{#3}{\scriptstyle}} {\@prescript{#1}{#2}{#3}{\scriptscriptstyle}} {\@prescript{#1}{#2}{#3}{\scriptscriptstyle}} } \newcommand{\@prescript}[4]{ \@mathmeasure\z@#4{\prescript@sup{#1}} \@mathmeasure\tw@#4{\prescript@sub{#2}} \ifdim \wd\tw@>\wd\z@ \setbox\z@\hbox to\wd\tw@{\hfil\unhbox\z@} \else \setbox\tw@\hbox to\wd\z@{\hfil\unhbox\tw@} \fi \mathop{} \mathopen{\vphantom{\prescript@arg{#3}}}^{\box\z@}\sb{\box\tw@} \prescript@arg{#3} } \def\prescript@sup{} \def\prescript@sub{} \def\prescript@arg{} \makeatother \begin{document} \[ {}^{4}_{12}\mathbf{C}^{5+}_{2} \quad \prescript{14}{2}{\mathbf{C}}^{5+}_{2} \quad \prescript{4}{12}{\mathbf{C}}^{5+}_{2} \quad \prescript{14}{}{\mathbf{C}}^{5+}_{2} \quad \prescript{}{2}{\mathbf{C}}^{5+}_{2} \] \end{document} ``` ![](https://pics.latexstudio.net/data/images/202001/0aa7119fecbf73e.png)

一周热门 更多>