Skip to content

[FEATURE] Change default snippet for “mod” and add “abs” snippet #427

@Jeon-Hajun

Description

@Jeon-Hajun

Description of the Problem

When I try to use the modular operation with "\bmod", it is converted into "\b||" instead. It seems that the absolute value snippet was mistakenly assigned to the "mod" trigger.

Description of the Solution

I suggest correcting the trigger for absolute value to "abs" and adding a proper snippet for "mod".

The relevant code is located at
obsidian-latex-suite/src/default_snippets.js, line 257:

    {trigger: "mod", replacement: "|$0|$1", options: "mA"},

I propose changing it to:

    {trigger: "mod", replacement: "$0 \\bmod  $1", options: "mA"},
    {trigger: "abs", replacement: "|$0|$1", options: "mA"},

This would clarify the triggers and make the snippets more intuitive for both modular arithmetic and absolute value.

Additional

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions