I need to type Backus-Naur form in LaTeX document. I found several packages on CTAN:
- ebnf seems to not work with TeXLive 2009
- latex-bnf does not align the declaration, etc.
- There is a module for ConTeXt, context-bnf
Is there a package for modern LaTeX, or should I just use hand-formatting via verbatim?
verbatim
, for goodness sake. If everything else fails, use anitemize
or something like that. I hope someone comes up with a better solution.verbatim
as last resort. Probablytabular
would be closer to what I have in mind but neither of those solution is IMHO LaTeX-like (i.e. type the document and let computer to figure out how to format it).syntax
package very easy to use, thanks to this detailed answer.