view README.rst @ 138:69283c05ba48

Make the table of lexers in the docs identical again. Minor wording changes.
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 07 May 2026 09:28:54 +0200
parents f713190c6c0b
children acd9073cbbe3
line wrap: on
line source

.. -*- coding: utf-8 -*-

*****************************************
 README -- Pseudocode Lexer for Pygments
*****************************************

This package contains Pygments lexers for some basic pseudocode.

Initially a fork of `pygments-lexer-pseudocode` it has been considerably
changed and expanded.

It now contains the following lexers:

.. list-table::
   :align: left
   :header-rows: 1

   * - Language Name
     - Description
     - Extension(s)
     - Aliases / Short Name(s)
     - Lexer Class

   * - AlgPseudocode
     - Pseudocode lexer heavily inspired by CTAN's "Algpseudocodex"
     - \*.algpseudocode, \*.algpseudo
     - algpseudocode, algpseudo
     - AlgPseudocodeLexer

   * - AlgPseudocodeFR
     - AlgPseudocode with french keyword expansion
     - \*.algpseudo-fr, \*.algpseudocode-fr
     - algpseudocode-fr, algpseudo-fr
     - AlgPseudocodeLexer_FR

   * - AlgPseudocodeDE
     - AlgPseudocode with german keyword expansion
     - \*.algpseudo-de, \*.algpseudocode-de
     - algpseudocode-de, algpseudo-de
     - AlgPseudocodeLexer_DE

   * - FrPseudocode
     - The original lexer (slightly changed) from `pygments-lexer-pseudocode`
     - \*.fr-algo, \*.fr-pseudocode
     - fr-pseudocode, fr-pseudo, fr-algorithm, fr-algo
     - FrPseudocodeLexer


Installation
============

The lexers are available as a Python wheel package::

    pip install pygments-lexer-pseudocode2

Alternatively, to build from the source code repository::

    python -m build


Usage
=====

After installation the Pseudocode lexers automatically register itself
within the plugin system of Pygments. All aliases and filename extensions
from above are made known to Pygments.

Usage is easy.

  Pygmentizing a file with a known file extension::

    pygmentize document.algpseudocode

  Or you can manally select the Pseudocode lexer you want to use by
  using a command line flag::

    pygmentize -l algpseudocode somefile

  Within Sphinx use a lexer like this::

    .. code-block:: algpseudocode


License
=======

The package is licensed under the terms of the MIT Licence.

Some code snippets are licensed under the terms of the
BSD 2-Clause "Simplified" License as they are taken from the Python
lexer that is included in Pygments.