// Copyright (c) 2020-2022 MathJax Consortium
// SPDX-License-Identifier: Apache-2.0
// Source: ts/input/tex/mathtools/{MathtoolsMethods,MathtoolsUtil}.ts.

package tex

import (
	

	
)

// Mathtools reads a literal optional style name, without expanding it. Its
// accepted keys differ from the numeric styles used by the fraction handlers.
func setMathtoolsDisplayLevel( *mml.Node,  string) {
	,  := false, 0
	switch strings.TrimFunc(, internalTextSpace) {
	case "\\displaystyle":
		 = true
	case "\\textstyle":
	case "\\scriptstyle":
		 = 1
	case "\\scriptscriptstyle":
		 = 2
	default:
		return
	}
	.Attributes.Set("displaystyle", )
	.Attributes.Set("scriptlevel", )
}