Skip to content

Read a chain of \setminus as one SetMinus call, so A \setminus B \setminus C is no longer A \setminus (B \setminus C) and SetMinus(A, B, C) reads back - #585

Open
enumeratio wants to merge 1 commit into
cortex-js:mainfrom
enumeratio:setminus-chain
Open

enumeratio wants to merge 1 commit into
cortex-js:mainfrom
enumeratio:setminus-chain

Conversation

@enumeratio

Copy link
Copy Markdown
Contributor

\setminus and \backslash use the chain mode of parseSetOperator, as \subset does, so A \setminus B \setminus C is SetMinus(A, B, C). Fixes #584

  • Parse: A\setminus B\setminus C and A\backslash B\backslash C give SetMinus(A, B, C); (A\setminus B)\setminus C and A\setminus(B\setminus C) stay nested. \{1,2,3,4\}\setminus\{2\}\setminus\{4\} evaluates to {1, 3}, it was {1, 3, 4}.
  • Serialize: unchanged, SetMinus(A, B, C) was already written as the chain; it now reads back.
  • Comment on parseSetOperator no longer lists \setminus among the modes that nest to the right.

Tests: latex-syntax/sets.test.ts — parse of each spelling, the round trip of the written form, the evaluated value. CHANGELOG entry under Unreleased.

No pinned test changed. The rest of the LaTeX suite and the set tests pass unchanged.

Overlap: none with #518 (Transpose axes, Derivative orders) or #549 (shared notation).

…minus C is no longer A \setminus (B \setminus C) and SetMinus(A, B, C) reads back. Fix cortex-js#584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

A \setminus B \setminus C is read as A \setminus (B \setminus C), a different set

1 participant