Add a VHDL typing style (and some other fixes).
[matthijs/master-project/report.git] / Utils / Lambda.tex
index da38e3a20bbf9eaf11c78e15ad5776f524e708e7..23b17d1c01688369f18d7780e5029dc0a24e8804 100644 (file)
@@ -79,6 +79,9 @@ draw b;
 % Define \hs
 \definetype[hs][option=HASKELL,style=mono]
 
+% Define \startvhdl \stopvhdl
+\definetyping[vhdl][numbering=line,before={\startboxed},after={\stopboxed}]
+
 % Type the given buffer with the lambda typing style.
 % e.g., \typebufferlam{buffname}
 \define[1]\typebufferlam{
@@ -105,6 +108,19 @@ draw b;
   \setuptyping[option=none,style=\tttf,strip=auto]
 }
 
+% Type the given buffer with the vhdl typing style.
+% e.g., \typebuffervhdl{buffname}
+\define[1]\typebuffervhdl{
+  % We can't use \startvhdl here defined by definetyping[vhdl] above when
+  % typing buffers, so instead we'll redefine the options here.
+  \setuptyping[style=mono,strip=auto,numbering=line]
+  \startboxed
+  \typebuffer[#1]
+  \stopboxed
+  % Reset the typing options
+  \setuptyping[option=none,style=\tttf,strip=auto]
+}
+
 % Display a useMPgraphic in a pretty box
 \define[1]\boxedgraphic{
   \startboxed