X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=blobdiff_plain;f=Utils%2FLambda.tex;h=1128c465044e3bd0c5769bea891acb935e0a7689;hp=b300b3524a10921c845c35d27bc97283a04ffbb8;hb=21c8a86147c874c29156d1859a670c3f7c6df7ee;hpb=bdb7127d5c2577ef2d68d1efff9256f46917b87d diff --git a/Utils/Lambda.tex b/Utils/Lambda.tex index b300b35..1128c46 100644 --- a/Utils/Lambda.tex +++ b/Utils/Lambda.tex @@ -27,7 +27,7 @@ path a, b; % Create a rectangle of the full size a := unitsquare xyscaled(\overlaywidth,\overlayheight); % Randomize it a bit -b := a randomized (\overlaywidth / 25) ; +b := a randomized (min(\overlayheight, \overlaywidth) / 25) ; % And draw it drawoptions (withpen pencircle scaled .75mm withcolor black) ; draw b; @@ -70,3 +70,17 @@ draw b; % Reset the typing options \setuptyping[option=none,style=\tttf] } + +% Display a useMPgraphic in a pretty box +\define[1]\boxedgraphic{ + \startboxed + \useMPgraphic{#1} + \stopboxed +} + +% Define a "definition" float. We would like some more backgroundoffset, but +% this offset doesn't move the caption, causing the border to cross the +% caption... Also, centering the content didn't seem to work... +% TODO: Make more pretty. +\definefloat[definition][definitions] +\setupfloat[definition][background=box,backgroundoffset=1mm]