这个问题类似于这个。我希望实现两个功能tcolorbox
:
- 盒子标题及其各自的列表
placelistofXXX
- 可以在圆形或直形盒子边缘之间进行选择。
我所想的基本上是将下面的两个框架连接起来,但我仍然无法弄清楚间距和覆盖。
\starttext
\startframedtext[background=color,backgroundcolor=orange,width=.8\textwidth,align=flushleft,frame=off,bottomframe=on,framecolor=blue,bottomframe=on,rulethickness=2pt,width=.8\textwidth,location=middle,loffset=-1ex,toffset=-1ex,boffset=-1ex]
\bf A grandiose and reverential title, praising the stones and trees
\stopframedtext
\startframedtext[frame=off,topframe=on,bottomframe=on,framecolor=darkgray,background=color,backgroundcolor=lightgray,corner=round,width=.8\textwidth,location=middle]
\input tufte
\stopframedtext
\stoptext
编辑:
基本上我想要的是一个简单的tcolorbox
标题,数字和内容放在单独的placecontent
:
答案1
我将简单地使用自然表来获得所需的输出:
\usemodule[annotation]
\usecolors[solarized]
\startsetups table:tcolorbox
\setupTABLE[row][1]
[
background=color,
backgroundcolor=red,
foregroundcolor=base3,
foregroundstyle=bold,
framecolor=red,
rulethickness=1.5bp,
corner=03,
loffset=0.25em,
roffset=0.25em,
]
\setupTABLE[row][2]
[
background=color,
backgroundcolor=base2,
foregroundcolor=base03,
framecolor=red,
rulethickness=1.5bp,
corner=01,
loffset=0.25em,
roffset=0.25em,
align={normal,hyphenated},
]
\stopsetups
\startsetups annotation:tcolorbox
\startTABLE[setups=table:tcolorbox]
\NC \placeannotationtext\space
\placeannotationnumber:\space
\placeannotationtitle \NC \NR
\NC \placeannotationcontent \NC \NR
\stopTABLE
\writetolist[tcolorbox]{\placeannotationnumber}{\placeannotationtitle}
\stopsetups
\defineannotationalternative
[tcolorbox]
[
alternative=vertical,
renderingsetup=annotation:tcolorbox,
]
\defineannotation[tcolorbox]
[
text=Example,
number=yes,
alternative=tcolorbox,
]
\starttext
\placelist[tcolorbox][alternative=b,criterium=all, headnumber=always]
\section{One}
\starttcolorbox[title={Title with a number}]
\input ward
\stoptcolorbox
\starttcolorbox[title={Title with a number}]
\input ward
\stoptcolorbox
\stoptext
这使