Cantor 19.12

Recently, the KDE community announced the release 19.12 of KDE applications, inlcuding Cantor. Many highlights of this release are mentioned in the release announcement. Today we’d like to highlight the development done in Cantor for the 19.12 release

In the previos release 19.08 we mostly concentrated on improving the usability of Cantor and spent quite some effort to stabilize the already available feature set. This release comes with a big new feature, namely the support for Jupyter notebook format.

Jupyter is a a very popular open-source web-based application that provides an interactive environment for different programming languages. The interactive documents are organized in “notebooks”. This application is widely used in different scientific and educational areas and there is a lot of shared notebooks publically available on the internet. As an example for a collection of such notebooks see this collection.

For Cantor, which is very similar in spirit to Jupyter, we decided to add the ability to read and save Jupyter’s notebook format in order to benefit from the big amount of available content for Jupyter. The implementation required for this was mainly done by Nikita Sirgienko as part of the Google Summer of Code 2019 project. His series of blog posts contains many examples as well as implementational details that will be omitted here.

In addition to Cantor’s native project format, starting with Cantor 19.12 it is possible now to open and save .ipynb files (Jupyter’s notebooks). The internal structures of this JSON based file format are mapped onto Cantor’s own entities. Below are two examples of how such notebooks look like when openned in Cantor:

It is also possible to convert Cantor’s native worksheet format to Jupyter notebook format and back.

Besides this somewhat bigger development, couple of smaller features were also added in this release which we’d like to mention.

When working with different types of worksheet entries it is sometimes required to convert between the different types, for example from a text entry to a command entry or the other way around. This kind of conversion between the different entry types is now possible via the context menu in the worksheet:

For LaTeX and Markdown entries Cantor differentiates between the edit and result mode. In the edit mode the user sees and enters the actual “source code” and after the user has asked to “process” the entry, the rendered result is shown. In the past, when occasionaly entered such an entry by an error, the user had to evaluate the entry again to get back to the rendered result. Now it is possible to leave the edit mode by hitting the escape button - the already available rendered result is shown immediately without the need to go through the render path again.

Several bug fixes were also done for this release. The most important that are also mentioned in the ChangeLog file are: