Summer for Code for XmacsLabs in 2023

Stage 2: Project Release and Review

Stage 1: Call for mentors

Open Source Promotion Plan (OSPP) is a summer program organized by the Institute of Software Chinese Academy of Sciences and long-term supported by the Open Source Software Supply Chain Promotion Plan. It aims to encourage college students to actively participate in the maintenance and development of open source software, promote the vigorous development of open source software communities, and build the open source software supply chain together.

You can find more information about the program here:

XmacsLabs has successfully submitted their community to OSPP:
We invite and encourage all individuals who have a passion for TeXmacs and an interest in contributing to join our projects.

Here are the projects of XmacsLabs:

Mogan is a fork of GNU TeXmacs. And Planet is for serving the contents via Github/Gitee/Codeberg and those contents can be accessed via Mogan directly without having to open the web browser. TMML Wiki is like Planet, but it’s a wiki system for Science and Technology.

@mgubi and @pjoyez, do you have time to become mentors?


@darcy, I can help, sure! It would be nice if we find contributors to finish the improvement of the unicode support. What are the priorities you have in mind?


Let me invite you as a mentor now. You should have received a email in your gmail.

The title of the email is Invitation for Program Mentor, the sender is

1 Like

Unicode support is a big project. For Summer of Code, I tend to submit easy-to-implement projects for students. Last time, it is a pity we had not finished the GSoC project.

Project 1: Re-implement TM -> PDF Typesetter in modern programming language (Hard)

@jingkaimori who is an active contributor of Mogan Editor is a student. He is interested in implementing a TM -> PDF converter in Scala:

  • Parsing the TM format into a syntax tree
  • Convert the syntax tree and expand the macro and finally get a new tree (made of typesetting primitives)
  • Convert the new Tree into Boxes
  • Convert the Boxes to PDF

It is a hard task. Because @jingkaimori has already known about the code. I think with my help (I’m familiar with Scala), he can complete this project. As least, he can complete the TM -> PDF converter on a subset of TM format (e.g. only the math part).


Project 2: Release Mogan Draw (Medium/Hard)

Improve the drawing tool of GNU TeXmacs/Mogan Editor.

  • Add new features
    • Draw a circle with its center and radius
    • Draw a ellipse, and more basic commonly used figures
    • Implement various kinds of arrows and decorations
    • Implement more features of quiver
  • Fix bugs
  • Publish Mogan Draw
  • Publish the wasm version of Mogan Draw and make it availble as

For this project, if the student successfully publish the Mogan Draw app, it is in medium level. If he/she successfully publish the Mogan Draw as wasm, it is in hard level.


The above two projects are priorities in my mind.

For this Summer of Code, it is 1 student with 1 mentor on 1 project. The projects should be proposed by the mentor from 2023/04/04~2023/04/26.

To clarify, I describe Project 2 in detail, it does not mean other mentors should submit project 2 as a project. The project should always be determined by the real mentor of the project.

For me, Project 1 is a good project. Because there is already a student (Mogan Contributor) interested in it. And I think project 1 is a good start of define the TMU format. And TMU format is the basis of unicode support.

Sorry I was meaning the unicode math font support, which just mean to be able to read and use in typesetting the MATH font table of OpenType fonts. This does not mean to convert TeXmacs to full support of unicode. It does not seem to me a big project, much smaller and feasible than rewrite the full typesetter in Scala, in my opinion.

As I’ve done in Vau, is already possible to extract a viewer from the codebase, this essentially also covers the TM->PDF conversion. What is the goal to rewrite completely something which already works quite well? You plan to extend/modify the core typesetter? Or it is just a translation of the C++ code in Scala?

1 Like

Great idea. We really need a more refined graphical editor. It would be nice also to have a small DSL for programmatic drawing (like metapost, allowing the use of equations to determine position of objects) and a diagram editor (for commutative diagrams).

I’ve accepted the invitation. Should I start adding projects?

1 Like

I suggest a converter towards the pandoc format. I think it might help a lot.

1 Like

Yes, indeed. Nice idea.

We can discuss first. Projects should be submitted before 2023/04/25. (The deadline is 2023/04/26 18:00:00 UTF+8)

The number of projects is 2, because there are two mentors registered.

Here is the related github issue:

What is the goal to rewrite completely something which already works quite well? You plan to extend/modify the core typesetter? Or it is just a translation of the C++ code in Scala?

You question will be answered here: Proposal: Re-impl `TM->PS/PDF` in modern programming language

I create two another thread to discuss the proposals submitted by me.

Yes, I was meaning this project. I think is not too difficult and will improve substantially out lives. :slight_smile:

Other projects I have in mind are:

  • [easy] write a converter to and from pandoc from within TeXmacs/Mogan and/or add a exporter to TeXmacs format to pandoc.

  • [medium/hard] help improve the collaborative features of TeXmacs/Mogan, in particular add user cursors to the live documents and improve performance or add server infrastructure to the live document handling.

  • [hard] help improve the wasm port of Mogan: the UI should behave a bit differently in the browser: single window app, dialogs which opens as subwindow of the main window. Possibly transform the whole UI to HTML so that it is rendered by the browser and we do not need anymore the Qt code. I’ve started a branch of TeXmacs which does not use Qt for this purpose. It renders the UI via SDL and the internal widget kit of TeXmacs. One could start from there and progressively mirror the UI in the browser via HTML (I have some ideas how to obtain this) until all the UI is migrated to HTML and we can remove Widkit.

1 Like