9

1

Lately I've been learning more about the Wolfram Language, and I've become particularly enamored with the stated goals of the Mathematica notebook interface. I've used Mathematica exclusively as a "super calculator" since about 2011, but I think the idea of a living publication, that includes text, figures, AND computation in a single document, could be a total paradigm shift.

However, I find that this goal for the notebook interface is completely undercut by the inability to properly typeset mathematics in a Mathematica notebook. I am familiar with Mathematica's "math typesetting" achieved via the CTRL key, but this is woefully inadequate in comparison to LaTeX. In my search for how to typeset LaTeX *inside* Mathematica Text cells, the closest solution I've come across uses the wonderful Mathematica package MaTeX, as described in this StackExchange answer: How to use $\LaTeX$ in Mathematica text. However, I find this procedure (generating the TeX with a MaTeX command, and then dragging that into the Text cell) very awkward.

Is there a way to create a custom keyboard command (e.g. "CMD + m") that would activate MaTeX typesetting within a Text cell? I'm imagining something like LyX, where you press the keyboard command and are instantly typing TeX code that will be compiled and displayed after you press the command again or press the right-key. Here is a short gif showing what I mean in LyX: https://thumbs.gfycat.com/GiftedHatefulCaterpillar-small.gif

I've contacted via email the creator of MaTeX, Szabolcs Horvát, and he seems optimistic about this being possible, but lacks the time and Front End development experience to implement this. Does anyone here know if/how this may be achieved with Mathematica?

1This sounds interesting, but I'm not sure where to find the proper

`KeyEventsTranslation.tr`

and`init.m`

to modify (even after following the link and googling). I tried some things, didn't work. ¯\(ツ)/¯ Could you add a little extra detail for those of us who don't dig into`$UserBaseDirectory`

too often? – Chris K – 2020-11-22T15:37:01.700@ChrisK The tr file is created as

`$UserBaseDirectory\SystemFiles\FrontEnd\TextResources\Windows\KeyEventTranslations.tr`

for me (the path may not exist so you should create it). The path should be modified to match your OS. The`init.m`

file is in`$UserBaseDirectory\Kernel\init.m`

– asd1dsa – 2020-11-22T18:05:54.1001@ChrisK The required structure of

`$UserBaseDirectory\SystemFiles\FrontEnd`

is similar to`$InstallationDirectory\SystemFiles\FrontEnd`

. You can dig into the latter path and see how the .tr(TextResources) files are arranged. – asd1dsa – 2020-11-22T18:09:38.000