Changes

Jump to navigation Jump to search
</context>
and It can be helpful to to compare with basic height {{cmd|strutheight}} and depth {{cmd|strutdepth}} of the line, and looking at the end on the effect of the struct parameteroption which, with the location option, is key to control the position:
<context source="yes">
\setuppapersize[A5]\setuplayout[backspace=5mm,topspace=1cm,header=0cm,footer=0cm,width=14cm] \defineframed [MonCadre] [width=1.75cm, align=middle,strut% rulethickness=2pt, % <== you can test offset=-rulethickness% offset=-2pt, % <=yes= you can test offset=-rulethickness framecolor=darkred] \define[1]\DemoLoc{%\ruledhbox{% {\getbuffer blackrule[height=\strutheight,depth=0pt,width=3mm]%\blackrule[height=0pt,depth=\strutdepth,width=3mm]%\MonCadre [location=#1] {\strut location\\ \color[darkmagenta]{\bf #1}\\location\strut}}}~~
\setupbodyfont[10pt]
%\showboxes
\startbuffer
\blackrule[height=max,depth=0pt,width=3mm]%
\blackrule[height=0pt,depth=max,width=3mm]
\stopbuffer
 
\strut
demo\DemoLoc{height} \dontleavehmode\DemoLoc{high} \dontleavehmode\DemoLoc{line} \dontleavehmode\DemoLoc{low} \dontleavehmode
\DemoLoc{empty} \dontleavehmode\DemoLoc{keep} \dontleavehmode \DemoLoc{depth} \dontleavehmode\DemoLoc{bottom} \dontleavehmode\DemoLoc{low} \blank[big]\strut\DemoLoc{middle} \dontleavehmode\DemoLoc{lohi} \dontleavehmode \DemoLoc{line}\blank[big1cm]
\strut
\DemoLoc{top} \dontleavehmode
\DemoLoc{height} \dontleavehmode
\DemoLoc{high} \dontleavehmode
\DemoLoc{formula} \dontleavehmode
\DemoLoc{hanging}
\DemoLoc{top} \dontleavehmode
\DemoLoc{lohi} \dontleavehmode % idem middle
\DemoLoc{bottom} \dontleavehmode
\DemoLoc{depth}
\setupframedblank[MonCadre][strut=yes1cm]
\strut
\DemoLoc{empty} \tt strut=yes}dontleavehmode\DemoLoc{bottomkeep} \dontleavehmode \DemoLoc{topformula}\stopbuffer \starttext {\tt\bfb strut=yes}\blank[1cm]\defineframed [MonCadre] [strut=yes]\getbuffer \blank[2cm] {\tt\bfb strut=no}\blank[5mm]\defineframed [MonCadre] [strut=no]\getbuffer
{\tt strut=no}\setupframed[MonCadre][strut=no]\DemoLoc{bottom} \dontleavehmode \DemoLoc{top}stoptext
demo
</context>
1,031

edits

Navigation menu