A package to properly render line numbers in pseudocode environment

Dear all,

I just modified the algorithm environment in TeXmacs and Mogan to achieve an algorithm2e-like environment. The original algorithm environment cannot render the line number properly as discussed in Algorithm2e for Texmacs

To see this, the original algorithm environment with numbered lines looks like this:
the original algorithm environment

My modified version looks like this:

The .ts file together with the template are uploaded into Github: https://github.com/JackYansongLi/algorithm2e-texmacs. Feel free to pull it and raise some issues for me on GitHub.

4 Likes

Yesterday I looked at your post Algorithm2e for Texmacs, and I thought I would try and figure out how to answer, then it slipped out of my hands and now you have posted this nice style file.

I would say we put a link to this in the Readme of tm-forge :slight_smile:

Yeah, it took me a whole night to modify the style file. Instead of altering \texttt{numbered} and the .scm source code, I manually add \texttt{numbered-line} to all lines containing conditional commands. It is a stupid but worked way to solve my problem. Thanks again for your (mgubi, jeroen) help, without your help, I cannot finish this alone. Feel free to put a link to tm-forge, I am glad to give a very tiny contribution to the TeXmacs society.

2 Likes