obsidian-latex-suite icon indicating copy to clipboard operation
obsidian-latex-suite copied to clipboard

[BUG] The default setting cannot treat "\bar" and similar commands properly

Open KyleYoung-ymj opened this issue 7 months ago • 0 comments

First of all, many thanks for developing this plugin. It really helps a lot.

I encounter the bug when I try to type something like x_{1} \cdot \bar{x_{2}}. I cannot type this easily with the default snippet settings, and I am not aware of any elegant workaround.

Specifically, these are the default snippets for the \bar command: {trigger: "([a-zA-Z])bar", replacement: "\\bar{[[0]]}", options: "rmA"}, {trigger: "bar", replacement: "\\bar{$0}$1", options: "mA"},

As a result, if I type bar after x_{1} \cdot it unexpectedly becomes x_{1}\bar{\cdot}. On the other hand, it is not possible to type something like x_{2}bar to yield \bar{x_{2}}.

Ideally, typing bar after a command like \cdot should not trigger the suffix operation for \bar, but I do not know how to change the settings to this end.

Thank you very much for your attention and help.

KyleYoung-ymj avatar Jun 30 '24 09:06 KyleYoung-ymj