Type LaTeX in live mode!
logseq-live-math integrates MathLive into Logseq, providing a better experience using Logseq with a lot of math.
live-math-demo.mp4
Tip
The above video is accelerated. Some shortcuts in the video are customized. It also uses logseq-display-math to render inline math in display style. Check it out for math render style, KaTeX macros, and more!
- ⌨️ Easy and convenient ways to trigger the MathLive input
-
Using Control+Shift+M shortcut. Can rebind in Logseq settings
It's recommended because it can both
- create new math
- edit existing math (just by placing input caret inside the math expression)
-
Using the
/math
command -
Type
$$
. Can be disabled -
Select existing formula with the mouse (e.g.
$\frac12$
). Can be disabled
-
- 📝 Edit LaTeX formula with MathLive, rich, intuitive, and fast
- 🔄 Update the LaTeX formula in the block in real-time
- 🔙 Press Enter to confirm
- 🎨 Well-configured MathLive theme to match Logseq custom theme
- 🔧 Configurable MathLive keybindings and inline shortcuts
This plugin is available on the plugin marketplace. The simplest way to install it is from the marketplace.
You can also download the zip
file under the release page, unzip it somewhere and Click Load unpacked plugin
, and select the folder where the plugin code was unzipped. You may need to go to "Settings -> Advanced" to enable "Developer mode".
darwis-mathlive-plugin also integrated MathLive to Logseq, but it’s working in a different way which is not very convenient for me, as it’s not automatically converted to LaTeX and only supports display math.
Go to the settings page and disable them.
For select-and-edit, it's also possible to require a modifier key to be pressed. For example, if you configured the key to be Shift, then you need to hold the Shift key while selecting, so that the popup will show. If not holding the key, nothing will happen.
If you want to change the default style, go to the settings page and switch preferDisplay
.
If you need to switch temporarily, you can click on the title of the popup to switch between Inline Math
and Display Math
. There is also a keyboard shortcut Ctrl + $ (e.g. with US layout, it's Ctrl + Shift + 4) which does the same job.
Besides, there is smartFormat
option, which will choose prefered style according to the context. You can disable it if you don't like it.
If you clicked "Edit settings.json", you will notice this plugin comes with some examples. You can also read the MathLive documentation to learn more.
And don't forget to check out the GitHub Discussion thread! You are encouraged to share your configs there!
If you are using Control + Enter, you will find that MathLive doesn't handle this well (see #21).
As a workaround, you can create an inline shortcut:
"align": "\\begin{align*}\n#? &= #? \\\\\n #? &= #?\\end{align*}",
After typing "align", something like this will show