diff options
| author | adelon <22380201+adelon@users.noreply.github.com> | 2025-08-12 00:37:28 +0200 |
|---|---|---|
| committer | adelon <22380201+adelon@users.noreply.github.com> | 2025-08-12 00:37:28 +0200 |
| commit | 39ef87d3ce39152febc130aa95e25dc0722c3525 (patch) | |
| tree | 018ce21f85bc132306ac5130db405527a313c1a7 /source/Syntax/Lexicon.hs | |
| parent | afce89ead823b6e9eec4a0b115bbe57a89a8e912 (diff) | |
Allow relation symbols with parameters
Parameters must follow the relation symbol and be surrounded by braces, like so: `\rel{x}{y}{z}`.
This attempt is still brittle/broken in a few ways:
- It makes using braces in creative ways in mixfix notation ambiguous.
- It does not verify that the parameters are used in a consistent manner for each symbol. It essentially allows users to define `a\MyRel b` and `a\MyRel{x} b` (and ones with even more parameters).
- It allows parameters for all relation symbols, even for those where it makes no sense in ordinary TeX markup, e.g. `a <{x} b`.
Diffstat (limited to 'source/Syntax/Lexicon.hs')
| -rw-r--r-- | source/Syntax/Lexicon.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/Syntax/Lexicon.hs b/source/Syntax/Lexicon.hs index 4fe8730..7f79294 100644 --- a/source/Syntax/Lexicon.hs +++ b/source/Syntax/Lexicon.hs @@ -112,7 +112,7 @@ prefixOps = , ([Just (Command "pow"), Just InvisibleBraceL, Nothing, Just InvisibleBraceR], (NonAssoc, "pow")) , ([Just (Command "neg"), Just InvisibleBraceL, Nothing, Just InvisibleBraceR], (NonAssoc, "neg")) , ([Just (Command "inv"), Just InvisibleBraceL, Nothing, Just InvisibleBraceR], (NonAssoc, "inv")) - , ([Just (Command "abs"), Just InvisibleBraceL, Nothing, Just InvisibleBraceR], (NonAssoc, "abs")) + , ([Just (Command "abs"), Just InvisibleBraceL, Nothing, Just InvisibleBraceR], (NonAssoc, "abs")) , (ConsSymbol, (NonAssoc, "cons")) , (PairSymbol, (NonAssoc, "pair")) -- NOTE Is now defined and hence no longer necessary , (ApplySymbol, (NonAssoc, "apply")) |
