# HG changeset patch # User Franz Glasner # Date 1778503139 -7200 # Node ID 4b87a9ecffddb9fa373fa409f85b3a936b378539 # Parent f761694373e0c52a7f22294e6bfce3382580d10b The first somewhat useable version of documentation in PDF. Using lualatex and the IBM Plex fonts. BUGS: - line-breaks - missing symbols diff -r f761694373e0 -r 4b87a9ecffdd Makefile --- a/Makefile Mon May 11 10:52:43 2026 +0200 +++ b/Makefile Mon May 11 14:38:59 2026 +0200 @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # :- -.PHONY: help all clean distclean dist export build tests flake8 docs clean-docs clean-docs-html install-dev install-docs +.PHONY: help all clean distclean dist export build tests flake8 docs clean-docs clean-docs-html pdf clean-pdf install-dev install-docs help: @echo Targets: help, clean, distclean, export, dist, build, tests docs clean-docs @@ -43,6 +43,13 @@ clean-docs-html: rm -rf docs/_build/html +pdf: + (cd docs && make latex) + (cd docs/_build/latex && gmake) + +clean-pdf: + rm -rf docs/_build/latex + install-dev: python -m pip install -r requirements-dev.txt diff -r f761694373e0 -r 4b87a9ecffdd docs/conf.py --- a/docs/conf.py Mon May 11 10:52:43 2026 +0200 +++ b/docs/conf.py Mon May 11 14:38:59 2026 +0200 @@ -23,6 +23,8 @@ today = datetime.date.today().isoformat() +master_doc = "index" + # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -126,6 +128,23 @@ #pygments_style = "sphinx" pygments_style = "default" +# --- Options for LaTeX output ----------------------------------------------- +# https://www.sphinx-doc.org/en/master/latex.html +latex_engine = 'lualatex' +latex_elements = { + "papersize": "a4paper", + "babel": r"\usepackage{babel}", + "fontpkg": r"\usepackage{plex-otf}", + "releasename": "Version", +} +latex_theme = "manual" +latex_show_urls = "footnote" +latex_show_pagerefs = True +latex_domain_indices = False +latex_documents = [ + ("index-latex", "PygmentsPseudocodeLexer.tex", "The Pygments Pseudocode Lexer", "Franz Glasner", "manual", True), +] + def setup(app): # diff -r f761694373e0 -r 4b87a9ecffdd docs/index-latex.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/index-latex.rst Mon May 11 14:38:59 2026 +0200 @@ -0,0 +1,21 @@ +.. -*- coding: utf-8; indent-tabs-mode: nil; -*- + +:orphan: + +******************************* + The Pygments Pseudocode Lexer +******************************* + +Introduction +============ + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + intro-latex + lexers-latex + filters + +.. * :ref:`genindex` +.. * :ref:`modindex` diff -r f761694373e0 -r 4b87a9ecffdd docs/intro-latex.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/intro-latex.rst Mon May 11 14:38:59 2026 +0200 @@ -0,0 +1,8 @@ +.. -*- coding: utf-8; indent-tabs-mode: nil; -*- + +************** + Introduction +************** + +.. include:: ../README.rst + :start-line: 5 diff -r f761694373e0 -r 4b87a9ecffdd docs/lexer-intro-latex.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/lexer-intro-latex.rst Mon May 11 14:38:59 2026 +0200 @@ -0,0 +1,9 @@ +.. -*- coding: utf-8; indent-tabs-mode: nil; -*- + +********** + Overview +********** + +The package contains the following lexers: + +.. include:: lexerlist.rst diff -r f761694373e0 -r 4b87a9ecffdd docs/lexers-latex.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/lexers-latex.rst Mon May 11 14:38:59 2026 +0200 @@ -0,0 +1,11 @@ +.. -*- coding: utf-8; indent-tabs-mode: nil; -*- + +******** + Lexers +******** + +.. toctree:: + + lexer-intro-latex + lexer-algpseudocode + lexer-frpseudocode