If the TeXmacs UI was different... (discussion)

Hey Everyone,

First up, I really like TeXmacs and I think that its interface is quite smart.
This is not a development thread, as revamping it would be a large task. I was just asking myself it it could be better and would love to know your opinion.

There are some things that I find a bit annoying about the user interface of TeXmacs and I would love to know if I’m the only one who thinks that way and if (maybe some day in the future) some work on this could be done:

  • The user interface takes up a lot of vertical screen space, which is not ideal especially when working on a document, on a laptop
  • This is not really a problem with TeXmacs, rather with Qt: Qt tries to look native on all platforms, but it is not really good at it, leading to illegible results sometimes
  • I found that navigating larger documents can be a bit of a hassle, when jumping to different sections. Something like what Overleaf does could be nice
  • this is very subjective, but when working with multiple documents and figures, I like to have an (optional) overview on the side to keep track of everything
  • some actions that are rarely used are sometimes difficult to find. Having something similar to Word where you can type the action that you want to perform could be handy sometimes.

That said, I made a first mock ui (that isn’t functional yet) and I would love to know what you think.
Is it too overwhealming, does this make sense? Would this be an improvement or worse?

The placeholder icons are taken from Papyrus.

Please tell me what you think, how it would be improved, if you think that this is unnecessary, etc.

thanks :slight_smile:

1 Like

I actually quite agree, but IDK how much the authors would like to spend on this.

Maybe @darcy ?

Hi @schroedingers_possum and welcome to the forum.

I think—does it make sense providing this as an option through the extensibility of TeXmacs? One could make it then available in tm-forge

hey @pireddag, thanks :slight_smile:

I agree that rewriting would be too much work and it would be great to use the existant ui. I don’t have a lot of experience in working with Qt, so please correct me if I’m wrong:

  • The side bars can be implemented, however at the moment their layout seems to be hardcoded to be a horizontal box.
  • The theming issue will persist, unless more of it is hardcoded. I assume that some people will be very much against this as this limits the customizability a lot, but I think that it could be worth discussing
  • I assume that sections should be easy to implement as it would basically just reuse the code for the table of contents

If I have enough time, I’ll look into this to know more :+1:

1 Like

We are working on a commercial version of GNU TeXmacs, as it is licensed in GPLv3, the artworks the key part, and we will spend a lot on improving the User Interface.

My colleague (who major in Art and Design) will be the owner of the new interface. And our product is named as Liii STEM Suite.

1 Like

Although what I had in mind might be impossible, that is change the UI in the way you show using only the extension language of TeXmacs, that is Guile. Smaller changes are possible.

Also @mgubi might be interested in this. Is the mock UI that you made, made by rewriting some of the code that is based on Qt?

@darcy best of luck! I will definitely give it a try when it comes out :slight_smile:

@pireddag the image I made was just quickly pieced together with a toolkit that I’m already familiar with (not using the texmacs code). I just wanted to show what I had in mind.

About implementing the vertical toolbars in code, I found the following in /src/Plugins/Qt/qt_tm_widget.cpp:
mainToolBar->setFixedHeight (toolbarHeight + 8);
By default the QToolBar can be horizontal and vertical, however since its height is fixed, that could be why it doesn’t adjust well. I will see what happens when this is changed in the following days.

1 Like

This is more complicated. Joris is developing sidebars for TeXmacs, with the intention to go in the direction you also identified: move a lot of the UI on the sides, since vertical space is a precious resource in TeXmacs. If “Developer menu” is active (from the “Tools” menu), then you should see more options in the “View” menu, called “Left side tool” and “Right side tool”. Together with some programming support, however this is still quite experimental.

2 Likes

@mgubi thanks for pointing this out, I tried it out and the progress looks very impressive, already.

What I wanted, instead, was to move the toolbars to the side, since they take up a lot of space on my 1366×768px display, which is admittedly quite rare nowadays. The Toolbars of TeXmacs can be repositioned using the three dots at the left of each toolbar and dragging them around.

When one drags the menu bar to the left on the current version of TeXmacs, it is no longer usable:

I commented out the lines 255,256,257 as well as 292, 293, 294 in the file /src/Plugins/Qt/qt_tm_widget.cpp:

255:  mainToolBar->setFixedHeight (toolbarHeight + 8 * retina_icons);
256:  modeToolBar->setFixedHeight (toolbarHeight + 4 * retina_icons);
257:  focusToolBar->setFixedHeight (toolbarHeight);
...
292:  mainToolBar->setFixedHeight (h1);
293:  modeToolBar->setFixedHeight (h2);
294:  focusToolBar->setFixedHeight (h3);

On Linux, with Qt5, this made it possible to use the toolbars in any orientation and left their size at the default position unchanged, since that one is fixed by the icons already:


The result is quite nice in my opinion, and items that don’t fit can be shown by clicking on the two small downwards pointing arrows.

The lines for other operating systems are adjacent, however I wasn’t able to try this out since I only have linux.

This is also not a fix that I would recommend to upstream, since I don’t know yet if it breaks something if someone changes the icon pack, or what happens on hdpi screens.

note:
The document I used to test this in the screenshot is this one
I compiled TeXmacs with Guile 3 following these instructions

post:

  • I moved the entire folder onto a usb drive to use this on my daily driver. It works well after fixing the permissions: chmod +x ./TeXmacs/bin/texmacs and chmod +x ./TeXmacs/bin/texmacs.bin. By default, some QT themes hide the rearrange bars, unfortunately. In order to show them again, one needs to set the environment variable export QT_STYLE_OVERRIDE=Fusion.
    Maybe this can help someone if they are facing similar issues.
2 Likes