[Solved] Arrows of arbitrary lengths?

In a recent discussion on the mailing list, I noticed that Joris mentioned

Arrows of arbitrary lengths can be obtained by entering them
directly as symbols. Using the Emacs-look and feel,
this is done as follows:
C-q rubber-rightarrow-25 return

I am very interested, but couldn’t make the code above work on my laptop because of my lack of Emacs experience. I would be very grateful if anyone could explain how to obtain arrows of arbitrary lengths as Joris said, especially on macOS. Thanks in advance.

C-q is control-q, this should get you a pair of blue angle brackets, then inside the brackets you have to type out the rest (the number is the length), finally press return. Please let me know if it works for you. You have to first set the Emacs-look and feel through the preferences.

Thanks. It works great.

I wonder if we have the same function for double or even triple arrows.

Please take a look at https://github.com/texmacs/texmacs/blob/a312c218d4be1aef38555592eb54c5aee96c0acf/TeXmacs/fonts/virtual/emu-arrows.vfn

which you can find inside the folder where TeXmacs is installed as well, under fonts/virtual/.

I tested rightrightarrows (double arrows) and twoheadleftarrow with the same scheme as rightarrow and both worked.

I found out about this with a search for rightarrow in https://github.com/texmacs/texmacs---often searching for a keyword in the TeXmacs github account helped me to find out the files where expressions are defined; I know that @jeroen does the same using ack (https://beyondgrep.com/).

Thanks a lot for your helpful answers.

I also wonder why such sort of arrows is not designed intuitively for just typing in arbitrarily many hyphens - ending with a > (I am aware that arrows with arbitrary lengths might not be produced in this way, but I think it’s enough for daily usage.)

At very first sight an expression with an arbitrary number of hyphens cannot be put in a hash table so that it might slow TeXmacs down (it has to do calculations instead of matching); but I may be wrong. I had a look at \progs\kernel\kbd-define.scm and in the form kbd-map-one it checks for a string in a variable which I think is the key combination.

1 Like