Spinx-Prolog for creating interactive Prolog books

[Forwarded mail from Peter Flach, the author or Simply Logical]

Kacper and I have recently developed a neat way to author online materials with interactive Prolog code boxes powered by SWISH. You can see our work-in-progress example at

https://too.simply-logical.space/

(Once we finalise it, the main book release hosted at book.simply-logical.space will be replaced with this build.) Here’s an example page with SWISH boxes:

https://too.simply-logical.space/src/text/2_part_ii/5.3.html

It is based on Jupyter Book (https://jupyterbook.org/) and our custom plugin called sphinx-prolog (GitHub - simply-logical/sphinx-prolog: Sphinx (and Jupyter Book) extensions for the Simply Logical content). The latter implements a convenient markdown syntax for building SWISH code boxes that can load Prolog code from files, use verbatim Prolog scripts, embed implicit Prolog queries as well as source prolog queries from specially formatted display and inline query boxes, among many other features. Our extension is accompanied by a book template hosted on GitHub (GitHub - simply-logical/prolog-book-template: A Jupyter Book template for interactive Prolog documents), which when built also serves as a user guide to sphinx-prolog. This page can be accessed at

https://book-template.simply-logical.space/

The SWISH guide will probably be of most interest; it is located at
https://book-template.simply-logical.space/src/text/sphinx_prolog_swish.html

If you see any value in our authoring environment feel free to spread the word in the SWI Prolog community. We also welcome any feedback, comments and contributions.

Best wishes,

–Peter

PS. As you might imagine, the technical wizardry here is all due to Kacper.

6 Likes