// Copyright 2017-2022 The MathJax Consortium// SPDX-License-Identifier: Apache-2.0// Source: PhysicsMethods.Expectation and outputBraket.
package teximportfunc ( *parser) ( string) ([]*mml.Node, error) { := .readStar() := && .readStar() , , := .readArgument(, false)if != nil {returnnil, }// Source GetNext commits whitespace even when no second argument follows.for .pos < len(.source) && internalTextSpace(.peekRune()) { .consumeRune() } := ""if .pos < len(.source) && .source[.pos] == '{' { , _, = .readArgument(, true)if != nil {returnnil, } }// Both raw arguments must be truthy. A consumed empty argument does not // select the three-operand expansion, and discarded source is not parsed.varstringif != "" && != "" {switch {case : = "\\left\\langle{" + + "}\\middle\\vert{" + + "}\\middle\\vert{" + + "}\\right\\rangle"case : = "\\langle{" + + "}\\vert{" + + "}\\vert{" + + "}\\rangle"default: = "\\left\\langle{" + + "}\\right\\vert{" + + "}\\left\\vert{" + + "}\\right\\rangle" } } elseif { = "\\langle {" + + "} \\rangle" } else { = "\\left\\langle {" + + "} \\right\\rangle" }// One fresh TexParser copies the complete lexical environment. Both // occurrences of arg2 share its budget, while registrations remain shared. , := .parseChild()if != nil {returnnil, }returnunwrapInferred(), nil}
The pages are generated with Goldsv0.8.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.