This package implements partial support for formatting CRBasic source code
following the conventions of the CRBasic Editor using the listings
LaTeX
package.
- Copy both files (
lstlang0.sty
andlstlocal.cfg
) into the same directory as the source LaTex (or Lyx) file. - Enable the
listings
package and specify in your code listing options: "language={[CR]Basic}"
The author frequently sets the following settings in the document preamble (well, the Document Settings > Listings pane in Lyx):
breakatwhitespace=true
breaklines=true
frame=single
numbers=left
numberstyle={\footnotesize}
showlines=true
At present, the syntax highlighting provided only approximates that provided by CRBasic Editor. Some known differences (non-exhaustive):
- Variable & constant names are not italicized or colorized
- Not all keywords are recognized
- Some odd highlighting may occur inside comments
This project may be submitted as a contribution to the LaTeX listings
package
in the future. To ensure a seamless transition, this software is licensed under
the LaTeX Project Public License 1.3c or later.
This project is not affiliated with, supported by, or endorsed by Campbell Scientific, Inc., the makers of CRBasic.