Meta Post

$\require{color} \require{enclose}$
写博客的一些技巧和工具。

MathJax 支持 \newcommand 但不支持 \newcommand*

To use the following three macros it is necessary to \require{color} first.

\colorbox : box with a background color
\colorbox{<color>}{<text>}
\colorbox{yellow}{text} \(\colorbox{yellow}{text}\)
\colorbox{yellow}{$a^2+b^2=c^2$} \(\colorbox{yellow}{\)a^2+b^2=c^2\(}\)
Notice that the box is a bit too high when the content is pure text.

\fbox : framed box
\fbox{text} \(\fbox{text}\)
\fbox{$a^2+b^2=c^2$} \(\fbox{\)a^2+b^2=c^2\(}\)
Again the box is a bit too high when the content is pure text.

\fcolorbox: a box with both a frame color and a background color.
\fcolorbox{<frame color>}{<background color>}{<text>}
\fcolorbox{red}{blue}{text} \(\fcolorbox{red}{blue}{text}\)
\fcolorbox{red}{blue}{$a^2+b^2=c^2$} \(\fcolorbox{red}{blue}{\)a^2+b^2=c^2\(}\)

To use the \enclose macro you have to \require{enclose} first.
\enclose{roundedbox}{a^2+b^2 = c^2} \(\enclose{roundedbox}{a\^2+b\^2 = c\^2}\)

References

https://chemistry.meta.stackexchange.com/q/3540

posted @ 2019-11-14 09:23  Pat  阅读(287)  评论(0编辑  收藏  举报