如何使用 tcolorbox 定义像下图这样的盒装环境?

如何使用 tcolorbox 定义像下图这样的盒装环境?

在此处输入图片描述

我尝试了以下代码,但左上角的引号不在正确的位置。

\documentclass{article}

\usepackage[many]{tcolorbox}
\newtcolorbox{note}[1][\linewidth]{
    enhanced,
    colback = white,
    boxrule = -1pt,
    sharp corners,
    frame code = {
      \draw [line width = 5pt, blue]
            ([xshift = 0.3cm]frame.north west) --
            (frame.north east) --
            (frame.south east) --
            (frame.south west) -- 
            ([yshift = -0.3cm]frame.north west);  
      \node [scale = 5] at (frame.north west) {``};
    },
    width = #1
}
\begin{document}

\begin{note}[4cm]
  This is a boxed frame.
\end{note}

\end{document}

感谢您的帮助!

答案1

姆韦

\documentclass{article}
\usepackage[many]{tcolorbox}
\newtcolorbox{note}[1][\linewidth]{
width = #1, 
sharp corners,
boxed title style={boxrule=0pt,colframe=white},
attach boxed title to top left={xshift=-3mm,yshift=-2mm},
colbacktitle=white,
colback=white,
colframe=blue,
coltitle=blue,
enhanced, 
fonttitle=\bfseries\Huge,
title=\vbox to 3mm{\kern.1em\hbox to 0pt{\kern-.2em``}}}
\begin{document}
\begin{note}[4cm] This is a boxed frame \end{note}
\end{document}

相关内容