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

[BUG] auto enlarge brackets ignores existing explicit size control

Open isaec opened this issue 4 months ago • 2 comments

Description

When bracket enlargement is triggered, existing size control will be ignored, leading to confusing errors.

To Reproduce

Start with

$$
\big(  \big) 
$$

Then inside the parentheses, trigger bracket enlargement (I reproduced with starting a fraction, 1/).

This results in the following which won't render, because it is invalid.

$$
\big\left(  \frac{1}{} \big \right) 
$$

Expected Behavior

Expected result would be

$$
\big(  \frac{1}{} \big) 
$$

or maybe

$$
\left(  \frac{1}{} \right) 
$$

although I strongly disagree with this "expected" behavior. The user explicitly configured the parenthesis size, and if it worked in this way there would be no means to change parenthesis size, as auto enlarge brackets will run for the entire environment if you use one of the triggers later.

I ran into this case when putting underbrackets on fractions inside parentheses and feeling that the parentheses was too large.

Additional Info

Thank you so much for an incredible extension! You enable me to do math proofs and notes, as someone unable to handwrite. :heart:

isaec avatar Feb 28 '24 02:02 isaec