smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

Pair brackets and parentheses and generally define classes of delimeters that can compliment each other

Open guraltsev opened this issue 8 years ago • 2 comments

I use LaTeX to write math. There is syntax to indicate semi-open intervals that often looks like this:

An interval can be denoted as $ J=[a,b) $ or $J=[a,b[$ to indicate that $a\in J$ but $b \notin J$

Is there any way to make this behavior acceptable?

guraltsev avatar Jan 04 '17 17:01 guraltsev

What we support now is shared closing delimiter, for example in ruby you can have pairs like begin..end or if..end or do..end and similar. But we can't do shared opening delimiter.

What we probably could do would be to construct the search predicate to include multiple opening and multiple closing delimiters... but then we would probably only want this to work in some contexts (like the math context in latex).

Well... I can see this would be handy, I'm not sure how much work it would be... but I'm definitely open to the idea.

Fuco1 avatar Jan 04 '17 20:01 Fuco1

@guraltsev slightly off-topic, but you can use \intco{...} and \intoc{...} for "mismatched" intervals with the commath package.

PythonNut avatar Jan 18 '17 15:01 PythonNut