From: Matthijs Kooijman Date: Thu, 1 Oct 2009 13:59:58 +0000 (+0200) Subject: Add \typebufferlam helper macro. X-Git-Tag: final-thesis~230 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=bdb7127d5c2577ef2d68d1efff9256f46917b87d;p=matthijs%2Fmaster-project%2Freport.git Add \typebufferlam helper macro. This macro formats the contents of a buffer with lambda code, with a nice box around it. This makes up for the fact that Context doesn't have such a macro. --- diff --git a/Utils/Lambda.tex b/Utils/Lambda.tex index 8854cca..b300b35 100644 --- a/Utils/Lambda.tex +++ b/Utils/Lambda.tex @@ -57,3 +57,16 @@ draw b; \definetyping[haskell][option=HASKELL,before=\startboxed,after=\stopboxed] % Define \hs \definetype[hs][option=HASKELL,style=mono] + +% Type the given buffer with the lambda typing style. +% e.g., \typebufferlam{buffname} +\define[1]\typebufferlam{ + % We can't use \startlambda here defined by definetyping[lambda] above when + % typing buffers, so instead we'll redfine the options here. + \setuptyping[option=LAM,style=sans,before=,after=] + \startboxed + \typebuffer[#1] + \stopboxed + % Reset the typing options + \setuptyping[option=none,style=\tttf] +}