写博客的一些技巧和工具.
- \require{
- color
- }
- \colorbox : box with a background color
- \colorbox{
- <color>
- }{
- <text>
- }
- \colorbox{
- yellow
- }{
- test
- } $\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\$
- }
- \require{
- enclose
- }
- \enclose{
- roundedbox
- }{
- a^2+b^2 = c^2
- } $\enclose{
- roundedbox
- }{
- a^2+b^2 = c^2
- }$
- References
- https://chemistry.meta.stackexchange.com/q/3540
来源: http://www.bubuko.com/infodetail-3287063.html