From bdb7127d5c2577ef2d68d1efff9256f46917b87d Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 1 Oct 2009 15:59:58 +0200 Subject: [PATCH] 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. --- Utils/Lambda.tex | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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] +} -- 2.30.2