Add starred commands for theorem definitions

See #36
pull/511/head
Patrick Förster 2022-04-11 20:41:35 +07:00
parent b71e4928a6
commit 5afabaea0e
4 changed files with 413509 additions and 410273 deletions

@ -969,7 +969,15 @@ module.exports = grammar({
theorem_definition: $ =>
prec.right(
seq(
field('command', choice('\\newtheorem', '\\declaretheorem')),
field(
'command',
choice(
'\\newtheorem',
'\\newtheorem*',
'\\declaretheorem',
'\\declaretheorem*'
)
),
optional(field('options', $.brack_group_key_value)),
field('name', $.curly_group_text),
optional(

8
src/grammar.json vendored

@ -4444,9 +4444,17 @@
"type": "STRING",
"value": "\\newtheorem"
},
{
"type": "STRING",
"value": "\\newtheorem*"
},
{
"type": "STRING",
"value": "\\declaretheorem"
},
{
"type": "STRING",
"value": "\\declaretheorem*"
}
]
}

@ -6055,9 +6055,17 @@
"type": "\\declaretheorem",
"named": false
},
{
"type": "\\declaretheorem*",
"named": false
},
{
"type": "\\newtheorem",
"named": false
},
{
"type": "\\newtheorem*",
"named": false
}
]
},
@ -6982,6 +6990,10 @@
"type": "\\declaretheorem",
"named": false
},
{
"type": "\\declaretheorem*",
"named": false
},
{
"type": "\\def",
"named": false
@ -7242,6 +7254,10 @@
"type": "\\newtheorem",
"named": false
},
{
"type": "\\newtheorem*",
"named": false
},
{
"type": "\\nocite",
"named": false

823748
src/parser.c vendored

File diff suppressed because it is too large Load Diff