Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to type in latex styled variables for julia in vs code or jupyter notebook

As in Julia REPL, we can type in latex styled variables by using tab and \epsilon to get the greek letter and give it a value. Since I mainly wirte Julia codes in VS Code now, I was wondering if we could do that in vs code also? or can we do that in Jupyter notebook?

enter image description here

and in advance, can we have complicate latex styled computation formula in vs code when progrmming with the julia extension? or in Jupyter notebook

What I want to describe here is something very similar to what Mathematica can do, which makes the math equations much easier to read.

like image 218
BNHSX Avatar asked Sep 20 '25 04:09

BNHSX


1 Answers

There is a VS Code Julia extension, which does support LaTeX-like tab completion, just like in the REPL. It should also just work in Jupyter, if you have the correct Julia kernel installed. You can find out more about that here.

In terms of a Mathematica style notebook workflow, Jupyter is probably the closest. Julia code still has to be regular Unicode text, so you can't expect your code to look exactly like free-form LaTeX, but you might want to look at Latexify.jl, which can convert Julia expressions and data structure into nice-looking LaTeX code. If you output LaTeX code generated by Latexify.jl in a Jupyter cell, it should even render correctly using MathJax. Otherwise, you can also just write LaTeX formulas inside Markdown cells with Jupyter.

like image 130
Simeon Schaub Avatar answered Sep 23 '25 02:09

Simeon Schaub



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!