27 March 2026
Interactive books with TeXmacs via Docker
I like TeXmacs. There are several difficulties when I use it,
but still, I like the concept: To have one big system that ensures high-quality typesetting and external sessions.
Now, I started writing the books I mentioned in the previous blog entry. For the theological work
I already created a
GitHub repo which also contains
a
Dockerfile and a script
runme.sh (currently only for Debian/Ubuntu systems) if someone
wants to read the book interactively. This means that all examples can be tried and eventually modified
if the reader decides to play with them.
I faced a couple of technical difficulties. First, I learned that the Python module I developed for bibref
requires an official repository. I chose PyPI (Python Package Index) to publish the package
bibref-python officially. Now, the package
can be installed via
pip install bibref-python, but I learned that it is much better to
run such package installation steps in a virtual environment. (For Python experts, this is should
be quite evident, but for me, it was not.)
Second, it turned out that communication between TeXmacs and my session plugin works differently in
some cases if I run them via Docker. I am still unsure what exactly the difference was, but finally
I
rewrote
the communication protocol to send everything in one chunk, instead of slice the output
in multiple packets. For some strange reason, sometimes only the first few packets arrived and
the rest disappeared.
Third, I had to create the locale definitions manually in Docker to ensure that TeXmacs finds the required
localizations (in my case, for the book, I currently need only Hungarian localization). Otherwise
TeXmacs crashed without using any fallback setting.
Fifth, I realized that TeXmacs will start with a welcome message, unless it has already been started.
Since I did not want that, I start TeXmacs for the first time with an automated exit (texmacs -q),
and then, for the second run, I load the interactive book.
Sixth, I improved some parts of the Dockerfile by muting some warning messages by enabling non-interactive
run of apt-get, and copied some frequently changing files (including the book itself) from the local
folder by using the COPY command in Docker.
Below are some screenshots about the on-going work. By having the success of setting up a full-featured
interactive book with the possibility of running arbitrary bibref code anytime, also with the option
to run Python code with imported bibref commands, I am managing to produce quite a high number of
pages surprisingly quickly. It is not really about the number of pages but the content, of course,
but anyway: it is a great joy for me to see my plans developing so nicely and in a good shape already.
Entries on topic technical developments
- Embedding realgeom in GeoGebra (9 July 2021)
- Web version of Tarski (1 October 2021)
- Developing Giac with Qt Creator on Windows (24 January 2022)
- Compiling Giac via MSYS2/CLANG32 (2 April 2022)
- Terminals on the web (28 June 2022)
- Torus puzzle (15 April 2023)
- Tube amoeba (16 April 2023)
- XaoS in WebAssembly (30 August 2023)
- Debut of GNU Aris in WebAssembly (11 November 2023)
- JGEX 0.81 (in Hungarian) (10 December 2023)
- xaos.app (2 January 2024)
- Compiling and running bibref-qt on Wine (22 August 2024)
- Treasure of Count Goldenwald (6 January 2025)
- Developing C++ code for desktop and web with cmake (7 March 2025)
- Statement analysis in bibref (8 March 2025)
- An online Qt GUI version of bibref (20 April 2025)
- JGEX via CheerpJ (5 July 2025)
- Connecting ISBTF's LXX-NT database with bibref (10 July 2025)
- GraphViz as a WebAssembly module (13 August 2025)
- bibref: Support for LXX 3.2 and StatResGNT 1.4, and some technical infos (23 December 2025)
- Towards reproducible builds via Docker (15 January 2026)
- TeXmacs plugins (9 March 2026)
- Interactive books with TeXmacs via Docker (27 March 2026)
|
Zoltán Kovács
Linz School of Education
Johannes Kepler University
Altenberger Strasse 69
A-4040 Linz
|