zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4k stars 215 forks source link

FR: Quality of life improvements for Latex inside excalidraw #1090

Open Gaaruda opened 1 year ago

Gaaruda commented 1 year ago

I wanted a solution to insert maths more easily in excalidraw, also just recently you introduced excalidraw invert color script, which doesnot holds good with latex, as invert color changes background to black while latex output is also in black.

The color problem could be fixed by recognising whether invert colors is running or not and using latex for dark theme accordingly. Also I wanted a option to add default text already present in latex box like. for example \color{white} which should be customisable.

Also can you please integerate latex suite plugin in the latex entering modal of excalidraw, as it helps quickly write big equations.

An alternative solution I can think of is adding toggle down option in latex enterinng modal for things like changing color etc.

zsviczian commented 1 year ago

The biggest challenge with LaTeX support is that I don't use this feature at all... which drastically limits my enthusiasm for putting in the work to implement these features.

If you switch to markdown view mode you can edit the LaTeX equations using LaTeX suite. I know this might not be ideal, but it is a fast and simple solution to your need.

I added a new setting to set a LaTeX template for new formulas.

image

Gaaruda commented 1 year ago

If you switch to markdown view mode you can edit the LaTeX equations using LaTeX suite. I know this might not be ideal, but it is a fast and simple solution to your need.

@zsviczian Yes, I could use this but is it possible for you to implement a feature, like when I select a equation and press some hotkey it opens the file in markdown view in new side pane with cursor on the equation. Also, A feature , in which I press hotkey it opens the markdown file in new side pane and puts cursor for creating a new equation.