[HN Gopher] TeXmacs and the Art of Mathematical Writing
___________________________________________________________________
TeXmacs and the Art of Mathematical Writing
Author : amichail
Score : 56 points
Date : 2021-05-03 12:37 UTC (10 hours ago)
(HTM) web link (texmacs.github.io)
(TXT) w3m dump (texmacs.github.io)
| ykonstant wrote:
| Both texmacs and lyx are excellent products, _especially_ in the
| seamless integration of images and diagrams. More traditionally,
| Vim and Emacs can be used with snippets and vimtex /auctex quite
| efficiently, both for interactive note-taking and to prepare
| large documents. Gilles Castel has an excellent guide on the Vim
| side [0], and I cannot help mentioning my system [1] which I
| think produces pretty clear latex code.
|
| [0] https://castel.dev/post/lecture-notes-1/
|
| [1]
| https://www.reddit.com/r/unixporn/comments/jtjol5/cinnamon_l...
| kleiba wrote:
| Not to be confused with writing (La)TeX in Emacs, which is also
| fun.
| forgotpwd16 wrote:
| It should be noted that TeXmacs isn't just for authoring
| documents in the traditional sense. It also allows running shell-
| like programming sessions, for example a computer algebra system,
| right inside the document itself. The idea is similar to
| Mathematica and Jupyter but rather using cells for specific
| purpose (text, code, ...), in TeXmacs everything is part of the
| same document.
| noobermin wrote:
| TeXmacs is awesome, I used it in grad school to take notes during
| QFT lectures and I could follow along because the shortcuts are
| just so intuitive if you already know latex: for example in math
| mode, ^ enters superscript, _ enters subscript, you can access
| greek letters by tab completion from the roman alphabet
| characters like \alpha is a+tab, \delta is d+tab, \Delta is D+tab
| (capital D tab). It's awesome, although a little buggy in the
| less used bits like the graphics maker.
|
| Still, it has a load of potential, it just needs a little more
| love (developers and money I suppose).
|
| EDIT: little tidbit, much like the online org-mode manual,
| judging by the typeface and the color of the hyperlinks, I bet
| this article itself was written in texmacs and exported to html.
| omaranto wrote:
| > EDIT: little tidbit, much like the online org-mode manual,
| judging by the typeface and the color of the hyperlinks, I bet
| this article itself was written in texmacs and exported to
| html.
|
| Even more than the typeface and the hyperlink color, I found
| this to be a give away :P
|
| "Figure 1. This article has been written in TeXmacs. The image
| shows the article being drafted and the management of the
| figures within the program."
| dash2 wrote:
| I used it in 2006-7 while at grad school. The tab-completion
| was indeed awesome, it's just so intuitive. Find the key that's
| close to what you want, then hit tab until it gets what you
| want. I ended up using LyX because it was a bit faster and
| better supported, but I wish they would learn from this
| interface.
| diarrhea wrote:
| I just ignore the entire TeX-Editor landscape and use VSCode with
| LaTeX Workshop. The latter falls apart for what I use it for
| often (*.cls files etc.), but VSCode is simply so much more
| powerful than any niche, language-specific editor can ever hope
| to be.
|
| LaTeX-specific support like tab completion mentioned in this
| thread ("hit a+tab for alpha") also doesn't work in my use cases.
| I use `glossaries-extra` for everything it's suitable for, so all
| symbols are glossary macros and not literal letters
| (`\alpha`...). It makes the source beautifully readable and is
| more in LaTeX's spirit: what you mean is what you get (`\section`
| vs. `\large\bfseries\sffamily`...). So instead of `\alpha` it
| might say `\sym{absorbtion_coefficient}`. If you ignore the
| necessary `\sym` macro bit, equations in source code will read
| like you'd say them out loud. There's no ambiguity left, what the
| author meant is right there, no guessing needed.
|
| Want to change the symbol? There's only one place you'll have to
| change it at. Often, you cannot change e.g. `\alpha` globally
| (sed and friends) because such a popular symbol is probably used
| in multiple contexts.
|
| Generate a nomenclature? It's one command once everything is set
| up, no manual `nomencl` (which is an awful, hacky, old thing)
| sorcery anymore. You can even print a list of all the pages a
| symbol, acronym, ... has been used.
|
| And that's just `glossaries-extra`. There's `unicode-
| math`/`fontspec`, `tcolorbox`, `polyglossia`, `csquotes` (latex
| editors might helpfully auto-complete quotes (``''), but that is
| entirely misguided in the first place; use `csquotes`),
| `cleveref`, `biblatex`, `floatrow`, `caption`, ... modern LaTeX
| is pretty wonderful and has a lot to offer, but I found LaTeX-
| specific editors lag behind and their LaTeX-specific support is
| not useful in a lot of those cases. Plus, LaTeX Workshop is very
| good in its own right.
| forgotpwd16 wrote:
| Besides that TeXmacs _isn 't_ a TeX editor, how exactly is VS
| Code more powerful than TeXmaker for example for the purpose of
| authoring TeX documents?
| GiovanniP wrote:
| > I just ignore the entire TeX-Editor landscape
|
| TeXmacs is not a TeX-editor, it is an independent program. The
| word "TeX" is in the name because one of the ambitions of the
| program is to inherit the typographic excellence of TeX (see
| the "parent article"). On this topic, the author of TeXmacs
| claims he has _surpassed_ it.
| taeric wrote:
| It is rather amusing how this product is neither TeX, nor
| emacs. Pretty sure the vast majority of folks assume it is
| related to at least one, if not both.
| GiovanniP wrote:
| According to Joris van der Hoeven "... it has become clear
| over time that this choice of name was one of the biggest
| mistakes of the project. Indeed, the name incorrectly
| suggests that TeXmacs is some kind of interface to
| (La)TeX."
| [deleted]
| clircle wrote:
| I'm learning for the first time that TeXmacs can interface with R
| for reproducible research and computational notebook type
| writing. I might give this a shot! I like writing Rmarkdown, but
| I sure hate writing prose in fixed width fonts, and I miss a lot
| of WYSIWYG features when I'm in Rstudio/Emacs.
| mgubi wrote:
| TeXmacs has interfaces for many systems
| (https://twitter.com/gnu_texmacs/status/1382216780702175232)
| including R. Seems that currently R does not run, however I
| think a medium R user can understand and fix the problem. The
| interface code for R is written in R.
| dash2 wrote:
| The latest Rstudio has visual mode, which lets you write prose
| in a normal font and code in fixed-width. It's an early
| iteration, but fairly usable.
| GiovanniP wrote:
| I have tried it now on Xubuntu 20.10 and there is a bug. I have
| asked here if anyone knows how to fix it:
| http://forum.texmacs.cn/t/does-the-r-plugin-work/434
| GiovanniP wrote:
| Please see http://forum.texmacs.cn/t/does-the-r-plugin-
| work/434/2 (you maybe have figured it out on your own). I
| tried the solution with R_LIBS_USER=~/.local/lib/R, and
| despite still an error being present it is possible to enter
| commands and see the output. Plots are displayed in own
| windows, but it may be that with simple programming they may
| be embedded in the document too.
|
| Edit: in the same thread one can read how to embed plots
| generated with R in the TeXmacs document. So my impression is
| that there is sufficient functionality for working.
| Myrmornis wrote:
| [Plug] If you're an emacs user, here's a project which renders
| all math in LaTeX documents to SVG preview images automatically
| as you type:
|
| https://github.com/dandavison/xenops
|
| I've used it a lot and I believe the experience is better than
| preview-latex in auctex (that's the only thing from auctex that
| it replaces). The main drawback at the moment is that you can't
| use the full range of math delimiters, but it does support the
| standard/recommended AMSMath ones.
| cbmuser wrote:
| How is that different from the preview mode of AucTeX?
| b215826 wrote:
| The main issue I have with TeXmacs (and similar software like
| LyX) is that it's hard to collaborate with others who don't use
| it. TeXmacs and LyX both support exporting to LaTeX, but YMMV
| with the readability of the LaTeX source produced, which makes it
| near impossible to share it with your coauthors. Also, it's hard
| to use them to typeset articles for journals that often require
| the authors use a specific style file. None of this is criticism
| of TeXmacs per se, and I have nothing but respect for the
| developers, but I believe these are the main reasons why TeXmacs
| isn't popular among people who write math.
| GiovanniP wrote:
| Perhaps a support software to guide the writing of both the
| TeXmacs and the LaTeX versions of a document so that conversion
| is straightforward, and therefore easier to make it readable
| for the converter, might be useful (see discussion at
| http://forum.texmacs.cn/t/an-idea-for-collaborative-work-
| wit...). For what regards the journal style files, as far as I
| know they are being refined in TeXmacs---my feeling is that a
| comprehensive set will be reached only through user
| contributions.
| noobermin wrote:
| I generally use TeXmacs for notes and derivations for myself.
| For journal articles that obviously will be collaborations I
| use just plain latex of course. I think the most I did was in
| grad school is that I wrote my candidacy report in TeXmacs, but
| that was obviously just something I wrote myself and it didn't
| require a specific style.
|
| I think a happy medium would be if you could export snippets of
| latex from a larger texmacs doc but I haven't actually tried
| it.
| mgubi wrote:
| I generally use TeXmacs for notes, derivations, lectures,
| articles, all, of course. Most of my papers in the last 7
| years, around 15 and all my lectures in the same period,
| circa 2 courses a year.
|
| More in detail, all these papers are been written completely
| in TeXmacs and then converted to LaTeX to be put in arXiv:
| https://arxiv.org/abs/2004.09637
| https://arxiv.org/abs/2004.01513
| https://arxiv.org/abs/2004.00872
| https://arxiv.org/abs/2003.14264
| https://arxiv.org/abs/1912.06881
| https://arxiv.org/abs/1912.04830
| https://arxiv.org/abs/1906.11187
| https://arxiv.org/abs/1812.04422
| https://arxiv.org/abs/1810.12014
| https://arxiv.org/abs/1805.10814
| https://arxiv.org/abs/1708.03118
| https://arxiv.org/abs/1702.03195
| https://arxiv.org/abs/1701.07373
| https://arxiv.org/abs/1610.07886
| https://arxiv.org/abs/1508.03877
| https://arxiv.org/abs/1502.00157
|
| Similarly all the lecture notes in this page:
| https://www.iam.uni-bonn.de/abteilung-gubinelli/teaching
|
| I think most of the discussion in this thread does not report
| any real current experience using it.
| noobermin wrote:
| Interesting. How do you collaborate with others who just
| use latex?
|
| Just as a note, I do use it today, just not to publish
| anything as I mostly have to adhere to journal article
| styles (can't just get by on preprints in my field) and I
| collaborate with others.
| mgubi wrote:
| I convince them to use TeXmacs :). At least I do not want
| to use LaTeX anymore (note that I've been hardcore LaTeX
| users for long time and also developed software to
| support LaTeX, e.g. TeXniscope, a previewer for DVI/PDF
| files in the early times of MacOS). Conversion to LaTeX
| format happens in the last stage of the submission (to
| arXiv or to a journal). It takes usually from 1 to maybe
| 10 min to have the file ready, maybe small tweaks for
| some bugs which I report and then get corrected. Three of
| my students wrote their PhD thesis with TeXmacs, and at
| least two/three other people I know. If I need to
| collaborate on a file which is being written in LaTeX I
| write my parts in TeXmacs and then I paste them in the
| file.
|
| Most of my presentations are also written in TeXmacs and
| in these days I use it to teach via Zoom, or to discuss
| with colleagues/students, make computations, etc... Not
| really using paper anymore. If you need to do algebraic
| manipulations, then it is more convenient to copy/paste
| on the screen that to rewrite the same equation several
| times with small variations on the paper.
|
| Using the submission requirements as an argument seems so
| wrong to me, it is like saying: since the final format is
| PDF we need to write our ideas directly in PDF... if one
| day editors will decide to use XML as submission format,
| then what? I do not want to think about mathematics with
| a screen divided in two parts, and the quality of the
| process is also very important to me. I spend maybe
| months to work on a paper in TeXmacs and at most only 1h
| in LaTeX when I really need to because editors are become
| used to require from the authors the work a professional
| typesetter would have done in the past.
| JustFinishedBSG wrote:
| Just wanted to say I loved your course on martingales
| approx 7 years ago at Dauphine, maybe it was already in
| TeXmacs :)
| mgubi wrote:
| Thanks. Glad you liked it enough to remember :) Indeed,
| I've just checked and I still have the TeXmacs files for
| the "polycopie du cours de Processus Discrets". The main
| developer was in Orsay at the same time I was there 2006,
| for mixed circumstances I've started to interest me to
| that software at the same time. I should say at the
| beginning I was attracted to TeXmacs not as a user but
| because it is a very complex piece of software which is
| very fun to hack on (choose your language: Scheme or
| C++).
| GiovanniP wrote:
| > I think a happy medium would be if you could export
| snippets of latex from a larger texmacs doc but I haven't
| actually tried it.
|
| In the TeXmacs editor Edit->Copy to->LaTeX (one might have to
| add some macro definitions in the preamble of the LaTeX
| document)
___________________________________________________________________
(page generated 2021-05-03 23:02 UTC)