Changes

Jump to navigation Jump to search
2,006 bytes added ,  20:24, 27 June 2021
m
effect of struct added
\Picture{sample/cow.pdf}{All your base are belong to us}{SampleRef}
\stoptext
</context>
 
 
== Colorored horizontal stripe of full paper width ==
 
<context mode="mkiv" source="yes">
\definepapersize[sheet][width=120mm,height=60mm]
\setuppapersize[sheet]
\setuppagenumbering[location=]
\setuplayout
[width=110mm,
backspace=5mm,
topspace=5mm,
header=5mm,
headerdistance=5mm,
footer=5mm,
footerdistance=5mm]
 
\showframe
 
\setupbackgrounds[page] [background=color, backgroundcolor=lightgray]
 
\startuniqueMPgraphic{whatever}
fill OverlayBox
leftenlarged BackSpace rightenlarged CutSpace
withcolor OverlayColor;
setbounds currentpicture to OverlayBox enlarged max(BackSpace,CutSpace);
\stopuniqueMPgraphic
 
\defineoverlay[whatever][\uniqueMPgraphic{whatever}]
\starttext
 
Here some text first.
 
\framed[background=whatever,backgroundcolor=green,frame=off,width=\textwidth]{test}
 
After, again some text.
 
\stoptext
 
</context>
\framed[width=2cm,align=middle,location=middle] {location\\equals\\middle}
B}
</context>
 
and to compare with basic height and depth of the line, and looking at the end on the effect of the struct parameter:
 
<context source="yes">
\defineframed[MonCadre][width=1.75cm,align=middle]
\define[1]\DemoLoc{\ruledhbox{%
{\getbuffer \MonCadre[location=#1]
{location\\ \color[darkmagenta]{\bf #1}\\location}}}}
\setupbodyfont[10pt]
%\showboxes
\startbuffer
\blackrule[height=max,depth=0pt,width=3mm]%
\blackrule[height=0pt,depth=max,width=3mm]
\stopbuffer
 
\strut
\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[big]
\strut
\DemoLoc{top} \dontleavehmode
\DemoLoc{height} \dontleavehmode
\DemoLoc{high} \dontleavehmode
\DemoLoc{formula} \dontleavehmode
\DemoLoc{hanging}
 
\setupframed[MonCadre][strut=yes]
\strut
{\tt strut=yes}
\DemoLoc{bottom} \dontleavehmode \DemoLoc{top}
 
{\tt strut=no}
\setupframed[MonCadre][strut=no]
\DemoLoc{bottom} \dontleavehmode \DemoLoc{top}
</context>
= See also =
* [[:Category:Command/Frames]]
 
[[Category:Basics]]

Navigation menu