This repository contains a LyX module to facilitate use of the
algpseudocode.sty style file, part of the
algorithmx LaTeX package. It is available under the GPLv2 open-source license.
The module provides the following paragraph styles:
- Algorithm to create an
- Function and EndFunction to enter functions;
- Procedure and EndProcedure to enter procedures;
- For and EndFor to enter for loops;
- Loop and EndLoop to enter indefinite loops;
- Repeat and Until to enter repeat loops;
- While and EndWhile to enter while loops;
- If, Else if, Else and EndIf to enter conditional statements;
- Call to enter procedure calls;
- Ensure and Require to make assertions about algorithms;
- Return to enter a return statement; and
- State to enter a typical line of code.
There is also a paragraph style (corresponding to the
\Statex command from the LaTeX package) to insert a blank, unnumbered line.
In-line comments are supported by a custom inset.
A LyX document (
pseudocode.lyx) with some minimal instructions and examples is also provided.
This module is written for file format 66, the current format for LyX 2.3.1. You may be able to use it with (somewhat) older versions of LyX by manually editing the
Format line in the module.
Bug reports and feature requests are welcome, using the issue tracker for the repository.