Spaces between letters as well as operators

Hi, I am a new comer who have started to use Texmacs recently. When I used it to write mathematics, I found that there is a problem that the spaces between letters as well as that between letters and operators are too close compared to what we usually see in the Latex. By accident I found @mgubi’s lecture notes online as shown in the screenshot.

I think the space here looks very nice. How can I achieve this without manually typing more tabs everytime?

Hope you can give me some help:slightly_smiling_face:!

Hi @sidaomath and welcome to the forum.
You input a space between letters by entering the multiplication symbol *. * does not get printed: it generates the space; if you want a printed multiplication sign then it is * followed by the tab key, further presses of tab cycle through a few multiplication symbols. In the image you posted I see arrows that indicate the space between the equal symbol and the symbol next to it, which as far as I know TeXmacs generates automatically when there are both a left- and a right-hand side.

Hi, dear @pireddag. Sorry for the late reply! Thank you for your answer! Yes, I know what you siad before but what I want to ask is something different. As you can see in my screenshot below, the spaces between letters and “=” are too small which are not the case as what I see on the online samples for TeXmacs. Is there antthing wrong whith my way to input math in TeXmacs?

After some searching, I find that there is thing called the "semantic editing’’ in the p.34, TeXmacs User Manual. According the texts in the manual, does that mean I should always insert a tab between a letter and a binary symbol or a operator in TeXmacs? I am not very clear about this because in latex we do not do this. Hope you can give me some help!

In general, it’s unnecessary to adjust spacing manually, as TeXmacs handles it automatically. Unfortunately, I cannot reproduce your issue in a new document. Please see my screenshot below.

Does this issue occur in every document or just this single one? More concretely, have you tried copying any formula with bad spacing to a new document to see if the issue persists?

I’ve seen a similar problem reported previously, only affecting display in files opened from disk (not new documents being typed) on Windows, but could not find the origin of it. Can you confirm it’s the same problem (same OS, same symptoms)? Where did you get TeXmacs from? Could you check if it happens with Mogan too?

Please can you show us the TeXmacs source for one of these equations. For example you can select the equation, perform “Copy to TeXmacs” or “Copy to TeXmacs Scheme” and then “Paste to Verbatim”. For example I obtain:

(concat "a≡" (frac "dX" "dξ"))

and the equation is typesetted with the correct spacing:

This afternoon I looked at one of my files on Windows and I found the same wrong spacing as @sidaomath.

Both with TeXmacs 2.1.2 (got it from slowphil) and with 2.1.4

I get back the correct spacing after deleting the .TeXmacs/system/cache directory and reloading the file from disk. Then after closing and reloading the spacings are wrong again.

It may be that it is enough to delete validate_cache.scm, but I may be wrong.

ok, I see that my report is like the one of

Hi, dear @xuyiqi1. Thanks for your reply! Yes, i have tried many times before and I found the problem still exists even I create a complete new tm.file or reinstall the Texmacs editor. I don’t know what happens. By the way, how did you make the multiplication symbol appears in your screenshot?

Hi, dear @pjoyez. Yes, my problem is exactly the same as the that in the link posted by you. I am using Windows 11 and the Texmacs version is 2.1.4 from the offical website Installing TeXmacs for Windows (FSF GNU project). Although currently there is no Mogan editor in my computer, I met the same spacing problem in the Mogan previously. More precisely, I find all the tm.files that I have written so far have exactly the same problem!

It seems like a serious issue. We should file a bug report on Savannah.

Please enable Document → Informative flags → Detailed.

Hi, dear @mgubi. I am really sorry that I am still not familiar with some operations in Texmacs and don’t find the option ‘‘Paste to Verbatim’’ as you said. Could you tell me more about how do you find this? Nevertheless, I do insert a Verbatim code by clicking the content tag from the manual bar from which I get screen shot below:

Please let me know if this is not what you are asking.

Hi, dear @xuyiqi1. I have already enabled Document → Informative flags → Detailed in my file but I have never see that multiplication symbol so far. See the screen shot I attached below.

Maybe because you did not put a multiplication symbol. You have to press the * key, and TeXmacs will insert an “invisible multiplication sign”, that will look as a small space, the purpose of which is to let the program know that the two symbols “connected” by the * are multiplied times each other—and therefore the typography will be the “right one” for that.

If you press the space bar, TeXmacs inserts an “invisible application sign”, which again affects in a visible way the spacing only, but lets TeXmacs know that the symbol on the left is a function, applied to the symbol on the right—and TeXmacs applies then the “right typography” for that relation.

See also manual, section 3.8, “Semantic editing facilities”, and 3.9 “Semantics of mathematical symbols”.

Hi, dear @pireddag. Tank you for your explanation! Ok, I checked that I didn’t put the invisible multiplication symbol you mentioned. After inseting it, I can see things below:

So in this way we return my original question: should I always put an invisible * between a letter and a binary sign (or between an operator and a letter, or etc.) manually? This makes thing very complicated because everytime when I type I need to consider the correct semantics that Texmacs wants. For example, should I input a * between () and = in my equation?

No :slight_smile: : TeXmacs spaces those pairs automatically … when it is working well. The small spacings that you observed are the result of a bug. It may be that you have to wait for the bug to be resolved.

I am sorry that I do not have a suggestion to get your copy of TeXmacs to space symbols correctly while people correct the code.

The invisible multiplication sign distinguishes pairs of letter that are multiplied times each other (need a multiplication sign in between) from pairs of letters that form a symbol (should be written next to each other).

You might install 2.1.1, taking it from

* does not work as an invisible space. It is used when it is a multiplication semantically. On the other hand, if the semantic is an application of an operation, you should input a space instead. For example, we input x*y*z for the multiplication xyz, but F x for “the F of x”.