This article is from the FAQ, by with numerous contributions by others.
When the lgrind style is made available (as above), you can use it in the
Let us assume, that you have a BETA source file called prog.bet.
* If the lgrind style is saved among the standard lgrind styles, you
lgrind -lbeta -i prog.bet > prog.tex
* If the lgrind style is saved in your personal file system, you execute:
lgrind -lbeta -d $HOME/lgrind/lgrindefs -i prog.bet > prog.tex
You are now ready to include the BETA source into a LaTeX document. You do
this by inserting the following in the start of the LaTeX document:
Please note, that you only need to insert this once.
This implies, that the lgrind LaTeX style is available. At the position in
the document, where you wish the BETA source code, you just insert one of
which will simply include the file at that point of text, and will draw
horizontal lines before and after the listing.
which will put the listing also within a figure environment, using the
float options, caption and label you gave.
You insert one lgridfile or lagrind command for each piece of BETA source
code, you wish to include in the document.