GNU TeXmacs Forum

A package to properly render line numbers in pseudocode environment

#1

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:

algo2e-template
algo2e-template.png×ばつ898 16.8 KB

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
#2

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:

#3

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

AltStyle によって変換されたページ (->オリジナル) /