文章预览
在网上看到了一个这样的盒子形状,不知是tikz画的还是tcolorbox宏包定制的,搜 了网上好久,没有发现类似的解决方法. tcolorbox宏包说明书也找了,只找到了boxed-矩形的,其它类形的没有找到.例如说菱形的,椭圆的. 【答案一】 tcolorbox 代码: \documentclass{article} \usepackage{amsmath, amssymb} \usepackage[most]{tcolorbox} \usepackage{tikz} \usetikzlibrary{calc} \makeatletter \ def \ pgfgetnodeheight ( #1)#2{ \path ($( #1.south) - (#1.north)$); \pgfmathsetmacro #2{veclen(\pgf @x , \pgf @y )} \edef #2{#2pt} } \ def \ pgfgetnodewidth ( #1)#2{ \path ($( #1.east) - (#1.west)$); \pgfmathsetmacro #2{veclen(\pgf @x , \pgf @y )} \edef #2{#2pt} } \makeatother \definecolor{tcbline}{RGB}{ 23 , 139 , 23 } \NewDocumentEnvironment{mybox}{O{}+b}{% \ begin {tcolorbox}[ breakable, enhanced, colbacktitle = white, coltitle = black, colback = white, colframe = tcbline,
………………………………