Have prettier arrows to write vectors?

Hello, I am a French mathematics teacher. My English is far from perfect but I love Texmacs and try to have the best typography for my high school classes.


I would like to improve the shape of the arrows on the vectors if possible. Thank you for your help and all the interesting things that can be found on this forum.

Did you make yourself the “arrow made with symbol and rightarrow-15”? If so, could you write here how you did it? It could be a satrting point for anyone that would like to help you.
By the way I tried the macro rightarrow-15 and I did not get a response from TeXmacs,

To draw the arrow, I proceed as follows:
I type on \symbol then rubber-rightarrow-9 (and not “15”) and with return I get the arrow.
The downside is that I make manual adjustments for the length of the arrow and to put it above the vector…
It’s a long time to do… and if I want write “vector{ u}”, the arrow is shorter and less high… so I have to change all my adjustments.

A temporary solution (works for more than one characters):

<math|<wide|A\<nocomma\>B|\<rightarrow\>>>

It looks like these functions are hard-coded in C++:


Hello,
thank you for your reply.
I would like to make a few remarks:

  1. I didn’t know the “nocomma” command and I can use it by going through \symbol then nocomma: it’s a bit long to type…
  2. I have already used your solution (without “nocomma)” which improves the writing a lot. Is it possible to slightly lower the arrow above AB?
  3. Depending on the chosen fonts, the arrow is more or less pretty and adapts more or less well.
    Cordially.

I answer part of the questions in place of @re4zuaFe

, tab tab

Also the manual, under “Semantics of mathematical symbols” is helpful there.

Also a temporary solution: you could try experimenting with this

Y<math|<superpose|A\<nocomma\>B|<move|\<rubber-rightarrow-5\>|1.2pt|6.7pt>>>

which though needs to be adapted to the fonts.

I thought of combining the two methods proposed above:
you can have an adjustable arrow and set the height.
It’s a shame that it doesn’t work for one character…

.
What do you think about this ?

Looks nice. Let me think about the one-character macro, there is the macro xmacro which works with a variable number of arguments.

This is a start for experimenting:

<assign|testxmacro2|<xmacro|var|<if|<equal|<get-arity|<quote-arg|var>>|2>|2 arguments|different from 2; value of first argument <arg|var|0>>>>

The get-arity macro counts arguments. The quote-arg macro is necessary to be able to use the argument, I do not know why, it was a suggestion by @mgubi when I got stuck with a macro of mine. Also I do not know how to type in <arg|var|0> (if you try to type it in in an xmacro context you will see what happens), so I copy-pasted it from the manual :slight_smile:

On-topic, when macros become complicated they are best written in Scheme. For this macro I did not do any Scheme experiment on the translation of the constructs which you need (move) but the translation from TeXmacs to TeXmacs Scheme is mechanical and I expect it to work nicely.

A caveat about this: when one wants to paste this codes between different documents (especially of different document styles), it would be a bit messy.

1 Like