
乳膠朋友們,
我使用 tcolorbox 並需要標題中的“空白欄位”,我將手寫到該欄位中。
\documentclass[11pt]{report}
\usepackage{caption}
\usepackage{tikz}
\usepackage[many]{tcolorbox}
\tikzset{fancytitle/.style ={fill=red, text=white}}
\newtcolorbox
{mybox}[1]{tikznode boxed title,enhanced,attach boxed title to top center={yshift=-3mm,yshifttext=-1mm},boxed title style={size=small,colback=red},title={#1}}
\begin{document}
\begin{mybox}{Name} 1/ This is a \textbf{tcolorbox}.
\end{mybox}\
\begin{mybox}{} 2/ Need display field "Title box" to write
\end{mybox}
\begin{mybox}{\tiny .....} 3/ tiny point...\end{mybox}
\end{document}
如何在2.mybox中顯示“標題框”,如果有的話可以創建易於編寫的“大框”。
我將使用不同的漂亮盒子來填寫表格。
謝謝
答案1
我不確定我是否正確理解了你的問題。
那是你要的嗎?
\documentclass[11pt]{report}
\usepackage{caption}
\usepackage{tikz}
\usepackage[many]{tcolorbox}
%\tikzset{fancytitle/.style ={fill=red, text=white}}
\tcbset{whitetitle/.style={boxed title style={size=small,colback=white}}}
\tcbset{redtitle/.style={boxed title style={size=small,colback=red}}}
\newtcolorbox
{mybox}[2][]{%tikznode boxed title,
#1,enhanced,attach boxed title to top center={yshift=-3mm,yshifttext=-1mm},title={#2}}
\begin{document}
\begin{mybox}[redtitle]{Name} 1/ This is a \textbf{tcolorbox}.
\end{mybox}\
\begin{mybox}[whitetitle]{\phantom{Title box}} 2/ Need display field "Title box" to write
\end{mybox}
\begin{mybox}[redtitle]{\tiny .....} 3/ tiny point...\end{mybox}
\end{document}