A modified version of the Pygments library with custom lexer and styling for the STG (Spineless Tagless G-machine) language.
Used to render code listings with the minted LaTeX package in magistrsko_delo.
To install, make sure git is installed and run the following commands
git clone https://github.com/drobilc/pygments.git
cd pygments
pip install .
To install the package in editable mode, run pip install -e .
command.
- To modify the lexer, edit the
`pygments/lexers/stg.py
</syntax_highlighting/pygments/lexers/stg.py>`__ file. - After making the changes, run
tox -e mapfiles
to rebuild the lexer mapping. - Delete the
magistrsko_delo/_minted-magistrsko_delo
directory to remove cached files and rerun the LaTeX compiler to see the changes.
For more information, check out the Pygments lexer development documentation.
- To modify the styling, edit the
`pygments/styles/stgyle.py
</syntax_highlighting/pygments/styles/stgyle.py>`__ file. - After making the changes, run
tox -e mapfiles
to rebuild the mappings file. - Delete the
magistrsko_delo/_minted-magistrsko_delo
directory to remove cached files and rerun the LaTeX compiler to see the changes.
For more information, check out the Pygments style development documentation.