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

Can't input \supset

Open zzhixin opened this issue 5 months ago • 3 comments

obsvimissue

My snippet is default.

I can't input \supset. How can I modify the snippets to enable inputing it.

By the way, considering input subset bring about \subset, it seems there should be a snippet of subset in place of \\subset but I can't find it. It is confusing.

zzhixin avatar Jan 08 '24 15:01 zzhixin

This is not a bug, but go to your snippet file (for example through settings).

Here you can remove the line: {trigger: "set", replacement: "\\{ $0 \\}$1", options: "mA"},, which will prevent the string set from triggering anything.

By the way, considering input subset bring about \subset, it seems there should be a snippet of subset in place of \subset but I can't find it. It is confusing.

I'm not entirely sure about what you mean, and I'm not sure my tip will work, but I think you can do this: Go to Settings>LatexSuite>AdvancedSnippetSettings>SnippetVariables. Do you see |subset| somewhere in there? If you replace that |subset| with |subset|supset|, then I think it should work. The strings subset and supset behave differently because subset is part of a snippet variable, but supset is not. This change ensures they're both part of that snippet variable.

I hope it still helps.

PhysicsInformedNoodle avatar Jan 25 '24 12:01 PhysicsInformedNoodle

Thanks

This is not a bug, but go to your snippet file (for example through settings).

Here you can remove the line: {trigger: "set", replacement: "\\{ $0 \\}$1", options: "mA"},, which will prevent the string set from triggering anything.

By the way, considering input subset bring about \subset, it seems there should be a snippet of subset in place of \subset but I can't find it. It is confusing.

I'm not entirely sure about what you mean, and I'm not sure my tip will work, but I think you can do this: Go to Settings>LatexSuite>AdvancedSnippetSettings>SnippetVariables. Do you see |subset| somewhere in there? If you replace that |subset| with |subset|supset|, then I think it should work. The strings subset and supset behave differently because subset is part of a snippet variable, but supset is not. This change ensures they're both part of that snippet variable.

I hope it still helps.

Thanks, your advice works. Just replace that |subset| with |subset|supset|.

zzhixin avatar Jan 31 '24 05:01 zzhixin

The same problem is with \times, interfering with "im" snippet. Solution to this problem is detecting whether user has typed backslash and characters without space or not and then applying the snippet.

Levon99 avatar Mar 10 '24 12:03 Levon99