fabiocolacio / Marker

🖊 A gtk3 markdown editor
GNU General Public License v3.0
836 stars 75 forks source link

Support for macros or autocompletion for brackets, LaTeX #291

Open Esokrates opened 4 years ago

Esokrates commented 4 years ago

Especially when writing mathematical texts it would be really great if certain things like \mathbb{N} one needs really often could be shortened.

Autocompletion of LaTeX commands would be one way to boost efficiency of writing, but macros would definitely help even more.

How macros could be done ideally I am not sure yet. Maybe one could for example define \N as \mathbb{N} in the macro settings and Marker would inject that before rendering and there would be a toggle to expand all macros, effectively replacing all the strings with the respective definition. Or maybe Marker could automatically expand \N to \mathbb{N} as soon as a certain selection of charcters follow, like space, brackets, backslashes or dollars.

sven-frotscher commented 4 years ago

KaTeX has macros: https://katex.org/docs/supported.html#macros MathJax probably has them too.