Taco Hoekwater wrote:
Hans Hagen wrote:
probably some interaction, best use
\definetextbackground[taco][location=paragraph,frame=off]
A\inleft{test1} b
\starttextbackground[taco] A\inleft{test2} b \stoptextbackground
No problem since \startbackground has a number of other problems as well (esp. regarding float placements) that I'd be happy to get away from, but (never having used textbackgrounds seriously before) is there a simple way to get the equivalent of
\setupbackground[frame=off,leftframe=on]
using textbackgrounds?
btw, your problem can be solved with: \defineinmargin [taco] [inner] [normal] [distance=\dimexpr\leftmargindistance+.5em\relax] \setupbackground[leftoffset=.5em,rightoffset=.5em] the problem is that llap is not working well inside a vbox (i changed the hsize adaption to left/rightskip but it's still not going well)
My previous set of definitions was:
%D how examples look
\defineenumeration [Example] [style={\switchtobodyfont[9pt]}, headstyle={\ss\bf}, before=, after=, inbetween=\noindent, text=Voorbeeld, indentnext=no, indenting=yes, chapternumber=yes]
\def\startexample% {\blank \start \setupbackground [frame=off, leftframe=on, offset=0pt, width=broad, background=, rulethickness=2pt, framecolor=examplecolor] \startbackground \startnarrower[left] \startExample }
\def\stopexample% {\stopExample \stopnarrower \stopbackground \stop \blank }
hey, some features thatyou don't know about ... here we go: \setupcolors [state=start] \defineenumeration [Example] [style={\switchtobodyfont[9pt]}, headstyle={\ss\bf}, before=, after=, inbetween=\noindent, text=Voorbeeld, indentnext=no, indenting=yes, chapternumber=yes] \definetextbackground [example] [location=paragraph, rulethickness=2pt, framecolor=red, before=\blank, after=\blank] \startuseMPgraphic{mpos:par:columnset} for i=1 upto nofmultipars : % draw leftboundary multipars[i] % shifted (-.25EmWidth,0) % withpen pencircle scaled 2pt % withcolor red ; draw leftboundary multipars[i] shifted (-.5EmWidth,0) withpen pencircle scaled \MPvar{linewidth} withcolor \MPvar{linecolor} ; endfor ; \stopuseMPgraphic \def\startexample {\startnarrower[left] \starttextbackground[example] \startExample} \def\stopexample {\stopExample \stoptextbackground \stopnarrower} \starttext \input tufte \startexample \input tufte \stopexample \input tufte \stoptext