I’ve added some of my papers to tm-forge, where there are already many examples in the folder https://github.com/texmacs/tm-forge/tree/main/examples . My papers are here: https://github.com/texmacs/tm-forge/tree/main/examples/papers-gubinelli usually they are around ~70 pages each. I will maybe also put some presentations as soon as I have some time. In general if you have nice examples please consider to put them in tm-forge, or ask me to do it. The idea is to collect a wide range of examples so that users can give a look to see how people use the software.
Slow editing of large papers
Would it be possible to create a benchmark as close as possible to how a user would input the document? I’ve done a quick experiment with the (key-press)
command and came up with the below code, which programmatically inserts an equation.
I needed to insert a lot of delays, though, otherwise keys are missed. If there is a way to have these queued up all at once, we could time how long composing an entire document from scratch takes.
Of course, creating such a benchmark by hand is very tedious, but there are Scheme commands to record key-presses as well, so typing a document could be recorded and then replayed.
This could be useful in automated testing for regressions as well.
(tm-define (test-key-press)
(begin
(delayed (:pause 500) (key-press "$"))
(delayed (:pause 1000) (key-press "A-f"))
(delayed (:pause 1500) (key-press "S-F5"))
(delayed (:pause 2000) (key-press "I"))
(delayed (:pause 2500) (key-press "_"))
(delayed (:pause 3000) (key-press "0"))
(delayed (:pause 3500) (key-press "left"))
(delayed (:pause 4000) (key-press "left"))
(delayed (:pause 4500) (key-press "^"))
(delayed (:pause 5000) (key-press "1"))
(delayed (:pause 5500) (key-press "right"))
(delayed (:pause 6000) (key-press "x"))
(delayed (:pause 6500) (key-press "*"))
(delayed (:pause 7000) (key-press "d"))
(delayed (:pause 7100) (key-press "tab"))
(delayed (:pause 7200) (key-press "tab"))
(delayed (:pause 7500) (key-press "x"))
(delayed (:pause 8000) (key-press "down"))
(delayed (:pause 8500) (key-press "2"))
)
By the way, it seems that the attention paid in your document on semantic correctness is not that much, where invisible multiplications seem to be usually omitted — of course, I found this since I enable semantic checking and many math boxes are red.
I couldn’t get myself into the habit of maintaining semantic correctness. I think remapping the space to first insert an implicit multiplication sign and then an on a second step a application would help. The times is just too far away for me when typing. Do you have any tricks on being efficient in writing semanticcally correct math?
I am not sure what keyboard you are using. I am using a variant of US105 keyboard, and the star is just shift+8 (two keys above k). I am not using any sort of key mapping.
you are right. I do not care much about it. what is important is that TeXmacs allows it. It is crucial to be able to interface with computer algebra systems, but for the kind of research I do this is less important. Even if I look forward to more formalised math, I doubt the current kind of proof in my domain can formalised in the way they are produced right now.
I am not talking about the interaction with CAS’s, but simply out of typesetting, since TeXmacs analyzes the semantic to compute more correct spacings.
I understand. I should say I don’t pay much attention to this. The spacing seems already ok, and for me using TeXmacs is really more about focusing on the math and being able to do computations and derivations directly on the document. It speeds up a lot my crafting a new paper. With luck all these papers will be published, so at the end the LaTeX conversion will reduce the math to a version without any particular semantic meaning (since TeX has none). This is why I see primarily semantic editing as a feature to interface correctly with programming languages and computer assised math. But I care about typography too, (to a certain extent if it does not get into my works). I’m working to extend the unicode math support of TeXmacs so that we can use more mathematical fonts. I like to use Libertinus but the math support for some constructions is not very nice (e.g. primes are too small and integrals too fat).
Seemingly you have spent an essential amount of time debugging this. Have you tried to compile TeXmacs with symbols or even source codes, so that you can load TeXmacs in gdb
and try to see what code/function it is running during this sloppiness?
I am able to produce it under Linux, but for me, it is not essential since I don’t type that fast when I write mathematics — my brain works much slower that typing.
I have not yet. I tried compiling from source the guile 1.9 version some time ago but failed (I am not very good ). I am going to try to do so as soon as I manage and report more details.
About speed of typing: I actually am a slow typer and the simulations above are at the speed of a very experienced typist. However, I find when I type my keypresses go in bursts and the effect observed above becomes noticeable.
You need to use guile 1.8.7 (or any other). On my machine 1.8.8 does not compile. I think 1.9 (if it exists) is not meant to be stable, only even versions are.
Did you try Mogan? It seems easier to compile. I also failed to compile Guile.
I think these are instructions for compiling TeXmacs: https://lists.texmacs.org/wws/arc/texmacs-users/2023-01/msg00002.html
N. R. gave them in place of instructions for compiling Mogan
Guile compiled with segfault, if I remember correctly.
I have tried compiling Guile according to the instructions of N.R. and the compilation stops on my computer. I have written back on the mailing list. Since N.R. posted the instructions, then it works on his computer.
Moreover, it is unclear how to build the whole thing with debug information and source codes. I mean, something like -g
for CC, which I used to debug very simple codes that I wrote with gdb
. Maybe optimizations should be disabled for that purpose.
Please try 1.8.7 as I said multiple times. Seems that 1.8.8 has problems. 1.8.7 compiles fine on MacOSX.
I wanted to check the statement https://lists.texmacs.org/wws/arc/texmacs-users/2023-01/msg00002.html that 1.8.8 works, since @re4zuaFe said the opposite.
For me both 1.8.7 and 1.8.8 give a segmentation fault. It might be the same as in https://forums.gentoo.org/viewtopic-p-7593806.html
G.
P.S. I am not going to install Guile 1.8 as long as it conflicts with the newer Guile that I have in my system: I just wanted to check the compilation
You do not need to install guile system-wise in order to compile TeXmacs, it is enough that ./configure
can find it, so in the shell you need to extend your $PATH
to include the guile
executable.
Any Guile 1.8 or even 1.6 should work. TeXmacs’ ./configure
has an option to link statically Guile 1.6 but I’m not sure how does it works.
Ok thanks.
I have compiled 1.8.8 applying the patch in https://lists.gnu.org/archive/html/bug-guile/2012-07/msg00011.html
Now I have to get to run it, it does not find ice-9/boot-9.scm