我找到了这个我喜欢的备注框,我想填写“备注”而不是!这是带有 pdf 的 .tex 代码
\documentclass{article}
\usepackage[most]{tcolorbox}
\newtcolorbox{marker}[1][]{enhanced,
before skip=2mm,after skip=3mm,
boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,
colback=yellow!50,
colframe=yellow!20!black,
sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
underlay={%
\path[fill=tcbcolback!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
\path[draw=tcbcolframe,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
\path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white,rotate=0]{\Huge\bfseries ! } ([xshift=4mm]interior.north west);
},
drop fuzzy shadow,#1}
\begin{document}
\begin{marker}
Foo
\end{marker}
\end{document}
答案1
请参阅代码中作出更改的注释。
\documentclass{article}
\usepackage[most]{tcolorbox}
\newtcolorbox{marker}[1][]{enhanced,
before skip=2mm,after skip=3mm,
boxrule=0.4pt,
left=15mm, % changed from left=5mm
right=2mm,top=1mm,bottom=1mm,
colback=yellow!50,
colframe=yellow!20!black,
sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
underlay={%
\path[fill=tcbcolback!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
\path[draw=tcbcolframe,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
\path[fill=yellow!50!black,draw=none] (interior.south west) rectangle
node[white,rotate=0]{Remark} % changed node text from ! to Remark
([xshift=14mm]interior.north west); % changed xshift-value from 4mm to 14mm
},
drop fuzzy shadow,#1}
\begin{document}
\begin{marker}
Foo
\end{marker}
\end{document}