// Generated by tools/gen_maps.py
// This file contains static symbol mappings from tex2typst project
// Do not edit manually - regenerate using: python tools/gen_maps.py

use fxhash::FxHashMap;
use lazy_static::lazy_static;
use mitex_spec::{ArgPattern, ArgShape, CmdShape, CommandSpec, CommandSpecItem, GlobStr};
use phf::phf_map;

// =============================================================================
// TEX_COMMAND_SPEC: Runtime-constructed CommandSpec for mitex parser
// Uses lazy_static because CommandSpec requires runtime construction
// =============================================================================

lazy_static! {
    /// LaTeX command specification for Mitex
    pub static ref TEX_COMMAND_SPEC: CommandSpec = {
        let mut m = FxHashMap::default();
        m.insert(" ".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("med".to_string()),
        }));
        m.insert(",".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("thin".to_string()),
        }));
        m.insert(":".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("med".to_string()),
        }));
        m.insert(";".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("thick".to_string()),
        }));
        m.insert(">".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("med".to_string()),
        }));
        m.insert("Delta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Delta".to_string()),
        }));
        m.insert("Downarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.b.double".to_string()),
        }));
        m.insert("bibitem".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("multicolumn".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 3 } },
            alias: None,
        }));
        m.insert("multirow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 3 } },
            alias: None,
        }));
        // Note: Do NOT define zero-argument commands like \today, \LaTeX, \TeX here!
        // MiTeX's parser extracts commands from argument blocks, causing them to be
        // lost. Instead, they are left as raw text and converted in convert_caption_text()
        // and the metadata extraction functions.
        m.insert("Gamma".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Gamma".to_string()),
        }));
        m.insert("Im".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Im".to_string()),
        }));
        m.insert("Lambda".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Lambda".to_string()),
        }));
        m.insert("Leftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.double".to_string()),
        }));
        m.insert("Leftrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.r.double".to_string()),
        }));
        m.insert("Longleftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.double.long".to_string()),
        }));
        m.insert("Longleftrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.r.double.long".to_string()),
        }));
        m.insert("Longrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r.double.long".to_string()),
        }));
        m.insert("Omega".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Omega".to_string()),
        }));
        m.insert("Phi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Phi".to_string()),
        }));
        m.insert("Pi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Pi".to_string()),
        }));
        m.insert("Pr".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Pr".to_string()),
        }));
        m.insert("Psi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Psi".to_string()),
        }));
        m.insert("Re".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Re".to_string()),
        }));
        m.insert("Rightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r.double".to_string()),
        }));
        m.insert("Sigma".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Sigma".to_string()),
        }));
        m.insert("Theta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Theta".to_string()),
        }));
        m.insert("Uparrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.t.double".to_string()),
        }));
        m.insert("Updownarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.t.b.double".to_string()),
        }));
        m.insert("Upsilon".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Upsilon".to_string()),
        }));
        m.insert("Xi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("Xi".to_string()),
        }));
        m.insert("aleph".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("aleph".to_string()),
        }));
        m.insert("alpha".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("alpha".to_string()),
        }));
        m.insert("amalg".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("product.co".to_string()),
        }));
        m.insert("angle".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("angle".to_string()),
        }));
        m.insert("approx".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("approx".to_string()),
        }));
        m.insert("arccos".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arccos".to_string()),
        }));
        m.insert("arcsin".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arcsin".to_string()),
        }));
        m.insert("arctan".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arctan".to_string()),
        }));
        m.insert("arg".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arg".to_string()),
        }));
        m.insert("ast".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("ast".to_string()),
        }));
        m.insert("asymp".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("asymp".to_string()),
        }));
        m.insert("backslash".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("backslash".to_string()),
        }));
        m.insert("beta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("beta".to_string()),
        }));
        m.insert("beth".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("beth".to_string()),
        }));
        m.insert("bigcap".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sect.big".to_string()),
        }));
        m.insert("bigcup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("union.big".to_string()),
        }));
        m.insert("bigodot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dot.circle.big".to_string()),
        }));
        m.insert("bigoplus".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("plus.circle.big".to_string()),
        }));
        m.insert("bigotimes".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("times.circle.big".to_string()),
        }));
        m.insert("bigsqcup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("union.sq.big".to_string()),
        }));
        m.insert("bigtriangledown".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.b".to_string()),
        }));
        m.insert("bigtriangleup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.t".to_string()),
        }));
        m.insert("bigvee".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("or.big".to_string()),
        }));
        m.insert("bigwedge".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("and.big".to_string()),
        }));
        m.insert("blacklozenge".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lozenge.filled".to_string()),
        }));
        m.insert("blacksquare".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("square.filled".to_string()),
        }));
        m.insert("blacktriangleleft".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.filled.l".to_string()),
        }));
        m.insert("blacktriangleright".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.filled.r".to_string()),
        }));
        m.insert("bot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("bot".to_string()),
        }));
        m.insert("bullet".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("bullet".to_string()),
        }));
        m.insert("cap".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sect".to_string()),
        }));
        m.insert("cdot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dot.op".to_string()),
        }));
        m.insert("cdots".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots.c".to_string()),
        }));
        m.insert("chi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("chi".to_string()),
        }));
        m.insert("circ".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("circle.small".to_string()),
        }));
        m.insert("clubsuit".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("suit.club".to_string()),
        }));
        m.insert("cong".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tilde.equiv".to_string()),
        }));
        m.insert("coprod".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("product.co".to_string()),
        }));
        m.insert("cos".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("cos".to_string()),
        }));
        m.insert("cosh".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("cosh".to_string()),
        }));
        m.insert("cot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("cot".to_string()),
        }));
        m.insert("coth".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("coth".to_string()),
        }));
        m.insert("csc".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("csc".to_string()),
        }));
        m.insert("cup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("union".to_string()),
        }));
        m.insert("dagger".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dagger".to_string()),
        }));
        m.insert("dashv".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tack.l".to_string()),
        }));
        m.insert("ddagger".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dagger.double".to_string()),
        }));
        m.insert("dddot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dot.triple".to_string()),
        }));
        m.insert("ddots".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots.down".to_string()),
        }));
        m.insert("deg".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("deg".to_string()),
        }));
        m.insert("delta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("delta".to_string()),
        }));
        m.insert("det".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("det".to_string()),
        }));
        m.insert("diamond".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("diamond".to_string()),
        }));
        m.insert("diamondsuit".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("suit.diamond".to_string()),
        }));
        m.insert("dim".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dim".to_string()),
        }));
        m.insert("displaystyle".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("display".to_string()),
        }));
        m.insert("div".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("div".to_string()),
        }));
        m.insert("doteq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("eq.dot".to_string()),
        }));
        m.insert("dots".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots".to_string()),
        }));
        m.insert("dotsb".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots.c".to_string()),
        }));
        m.insert("dotsc".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots.c".to_string()),
        }));
        m.insert("dotsm".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots.c".to_string()),
        }));
        m.insert("downarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.b".to_string()),
        }));
        m.insert("ell".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("ell".to_string()),
        }));
        m.insert("emptyset".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("emptyset".to_string()),
        }));
        m.insert("epsilon".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("epsilon".to_string()),
        }));
        m.insert("equiv".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("equiv".to_string()),
        }));
        m.insert("eta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("eta".to_string()),
        }));
        m.insert("exists".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("exists".to_string()),
        }));
        m.insert("exp".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("exp".to_string()),
        }));
        m.insert("flat".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("flat".to_string()),
        }));
        m.insert("forall".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("forall".to_string()),
        }));
        m.insert("frown".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("frown".to_string()),
        }));
        m.insert("gamma".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("gamma".to_string()),
        }));
        m.insert("gcd".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("gcd".to_string()),
        }));
        m.insert("ge".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("gt.eq".to_string()),
        }));
        m.insert("geq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("gt.eq".to_string()),
        }));
        m.insert("gg".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("gt.double".to_string()),
        }));
        m.insert("gimel".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("gimel".to_string()),
        }));
        m.insert("hbar".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("planck.reduce".to_string()),
        }));
        m.insert("heartsuit".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("suit.heart".to_string()),
        }));
        m.insert("hom".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("hom".to_string()),
        }));
        m.insert("hookleftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.hook".to_string()),
        }));
        m.insert("hookrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r.hook".to_string()),
        }));
        m.insert("hspace".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("#h".to_string()),
        }));
        m.insert("iff".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.r.double.long".to_string()),
        }));
        m.insert("iiint".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("integral.triple".to_string()),
        }));
        m.insert("iiiint".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("integral.quad".to_string()),
        }));
        m.insert("iint".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("integral.double".to_string()),
        }));
        m.insert("imath".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dotless.i".to_string()),
        }));
        m.insert("in".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("in".to_string()),
        }));
        m.insert("inf".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("inf".to_string()),
        }));
        m.insert("infty".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("infinity".to_string()),
        }));
        m.insert("int".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("integral".to_string()),
        }));
        m.insert("iota".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("iota".to_string()),
        }));
        m.insert("jmath".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dotless.j".to_string()),
        }));
        m.insert("kappa".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("kappa".to_string()),
        }));
        m.insert("ker".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("ker".to_string()),
        }));
        m.insert("lVert".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("bar.v.double".to_string()),
        }));
        m.insert("lambda".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lambda".to_string()),
        }));
        m.insert("langle".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("chevron.l".to_string()),
        }));
        m.insert("lbrace".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("brace.l".to_string()),
        }));
        m.insert("lceil".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("ceil.l".to_string()),
        }));
        m.insert("ldots".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots.h".to_string()),
        }));
        m.insert("le".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lt.eq".to_string()),
        }));
        m.insert("leadsto".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r.squiggly".to_string()),
        }));
        m.insert("leftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l".to_string()),
        }));
        m.insert("leftharpoondown".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("harpoon.lb".to_string()),
        }));
        m.insert("leftharpoonup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("harpoon.lt".to_string()),
        }));
        m.insert("leftrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.r".to_string()),
        }));
        m.insert("leq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lt.eq".to_string()),
        }));
        m.insert("lfloor".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("floor.l".to_string()),
        }));
        m.insert("lg".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lg".to_string()),
        }));
        m.insert("lhd".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.l".to_string()),
        }));
        m.insert("lim".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lim".to_string()),
        }));
        m.insert("liminf".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("liminf".to_string()),
        }));
        m.insert("limsup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("limsup".to_string()),
        }));
        m.insert("injlim".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: None,  // Handled specially in converter
        }));
        m.insert("projlim".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: None,  // Handled specially in converter
        }));
        m.insert("varinjlim".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: None,  // Handled specially in converter
        }));
        m.insert("varprojlim".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: None,  // Handled specially in converter
        }));
        m.insert("ll".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lt.double".to_string()),
        }));
        m.insert("ln".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("ln".to_string()),
        }));
        m.insert("lnot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("not".to_string()),
        }));
        m.insert("log".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("log".to_string()),
        }));
        m.insert("longleftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.long".to_string()),
        }));
        m.insert("longleftrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.l.r.long".to_string()),
        }));
        m.insert("longmapsto".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r.long.bar".to_string()),
        }));
        m.insert("longrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r.long".to_string()),
        }));
        m.insert("lozenge".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("lozenge".to_string()),
        }));
        m.insert("lvert".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("bar.v".to_string()),
        }));
        m.insert("mapsto".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r.bar".to_string()),
        }));
        m.insert("max".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("max".to_string()),
        }));
        m.insert("mid".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("divides".to_string()),
        }));
        m.insert("min".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("min".to_string()),
        }));
        m.insert("models".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("models".to_string()),
        }));
        m.insert("mp".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("minus.plus".to_string()),
        }));
        m.insert("mu".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("mu".to_string()),
        }));
        m.insert("nabla".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("nabla".to_string()),
        }));
        m.insert("natural".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("natural".to_string()),
        }));
        m.insert("ne".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("eq.not".to_string()),
        }));
        m.insert("nearrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.tr".to_string()),
        }));
        m.insert("neg".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("not".to_string()),
        }));
        m.insert("neq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("eq.not".to_string()),
        }));
        m.insert("nexists".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("exists.not".to_string()),
        }));
        m.insert("ni".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("in.rev".to_string()),
        }));
        m.insert("notin".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("in.not".to_string()),
        }));
        m.insert("nu".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("nu".to_string()),
        }));
        m.insert("nwarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.tl".to_string()),
        }));
        m.insert("odot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dot.circle".to_string()),
        }));
        m.insert("oint".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("integral.cont".to_string()),
        }));
        m.insert("oiint".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("integral.surf".to_string()),
        }));
        m.insert("oiiint".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("integral.vol".to_string()),
        }));
        m.insert("omega".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("omega".to_string()),
        }));
        m.insert("ominus".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("minus.circle".to_string()),
        }));
        m.insert("oplus".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("plus.circle".to_string()),
        }));
        m.insert("oslash".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("divides.circle".to_string()),
        }));
        m.insert("otimes".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("times.circle".to_string()),
        }));
        m.insert("parallel".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("parallel".to_string()),
        }));
        m.insert("partial".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("diff".to_string()),
        }));
        m.insert("perp".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("perp".to_string()),
        }));
        m.insert("phi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("phi.alt".to_string()),
        }));
        m.insert("pi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("pi".to_string()),
        }));
        m.insert("pm".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("plus.minus".to_string()),
        }));
        m.insert("prec".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("prec".to_string()),
        }));
        m.insert("preceq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("prec.eq".to_string()),
        }));
        m.insert("prime".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("prime".to_string()),
        }));
        m.insert("prod".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("product".to_string()),
        }));
        m.insert("propto".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("prop".to_string()),
        }));
        m.insert("psi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("psi".to_string()),
        }));
        m.insert("rVert".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("bar.v.double".to_string()),
        }));
        m.insert("rangle".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("chevron.r".to_string()),
        }));
        m.insert("rbrace".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("brace.r".to_string()),
        }));
        m.insert("rceil".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("ceil.r".to_string()),
        }));
        m.insert("rfloor".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("floor.r".to_string()),
        }));
        m.insert("rhd".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.r".to_string()),
        }));
        m.insert("rho".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("rho".to_string()),
        }));
        m.insert("rightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r".to_string()),
        }));
        m.insert("rightharpoondown".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("harpoon.rb".to_string()),
        }));
        m.insert("rightharpoonup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("harpoon.rt".to_string()),
        }));
        m.insert("rvert".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("bar.v".to_string()),
        }));
        m.insert("searrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.br".to_string()),
        }));
        m.insert("sec".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sec".to_string()),
        }));
        m.insert("setminus".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("without".to_string()),
        }));
        m.insert("sharp".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sharp".to_string()),
        }));
        m.insert("sigma".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sigma".to_string()),
        }));
        m.insert("sim".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tilde.op".to_string()),
        }));
        m.insert("simeq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tilde.eq".to_string()),
        }));
        m.insert("sin".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sin".to_string()),
        }));
        m.insert("sinh".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sinh".to_string()),
        }));
        m.insert("smile".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("smile".to_string()),
        }));
        m.insert("spadesuit".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("suit.spade".to_string()),
        }));
        m.insert("sqcap".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sect.sq".to_string()),
        }));
        m.insert("sqcup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("union.sq".to_string()),
        }));
        m.insert("sqsubset".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("subset.sq".to_string()),
        }));
        m.insert("sqsubseteq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("subset.sq.eq".to_string()),
        }));
        m.insert("sqsupset".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("supset.sq".to_string()),
        }));
        m.insert("sqsupseteq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("supset.sq.eq".to_string()),
        }));
        m.insert("square".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("square".to_string()),
        }));
        m.insert("star".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("star".to_string()),
        }));
        m.insert("subset".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("subset".to_string()),
        }));
        m.insert("subseteq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("subset.eq".to_string()),
        }));
        m.insert("succ".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("succ".to_string()),
        }));
        m.insert("succeq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("succ.eq".to_string()),
        }));
        m.insert("sum".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sum".to_string()),
        }));
        m.insert("sup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sup".to_string()),
        }));
        m.insert("supset".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("supset".to_string()),
        }));
        m.insert("supseteq".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("supset.eq".to_string()),
        }));
        m.insert("surd".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sqrt".to_string()),
        }));
        m.insert("swarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.bl".to_string()),
        }));
        m.insert("tan".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tan".to_string()),
        }));
        m.insert("tanh".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tanh".to_string()),
        }));
        m.insert("tau".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tau".to_string()),
        }));
        m.insert("textstyle".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("inline".to_string()),
        }));
        m.insert("theta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("theta".to_string()),
        }));
        m.insert("times".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("times".to_string()),
        }));
        m.insert("to".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.r".to_string()),
        }));
        m.insert("top".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("top".to_string()),
        }));
        m.insert("triangle".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.t".to_string()),
        }));
        m.insert("triangleleft".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.l".to_string()),
        }));
        m.insert("triangleright".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.r".to_string()),
        }));
        m.insert("unlhd".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.l.eq".to_string()),
        }));
        m.insert("unrhd".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("triangle.r.eq".to_string()),
        }));
        m.insert("uparrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.t".to_string()),
        }));
        m.insert("updownarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("arrow.t.b".to_string()),
        }));
        m.insert("upsilon".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("upsilon".to_string()),
        }));
        m.insert("varepsilon".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("epsilon.alt".to_string()),
        }));
        m.insert("varnothing".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("nothing".to_string()),
        }));
        m.insert("varphi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("phi".to_string()),
        }));
        m.insert("varpi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("pi.alt".to_string()),
        }));
        m.insert("varrho".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("rho.alt".to_string()),
        }));
        m.insert("varsigma".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("sigma.alt".to_string()),
        }));
        m.insert("vartheta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("theta.alt".to_string()),
        }));
        m.insert("vdash".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("tack.r".to_string()),
        }));
        m.insert("vdots".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("dots.v".to_string()),
        }));
        m.insert("vee".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("or".to_string()),
        }));
        m.insert("wedge".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("and".to_string()),
        }));
        m.insert("wp".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("weierstrass".to_string()),
        }));
        m.insert("wr".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("wreath".to_string()),
        }));
        m.insert("xi".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("xi".to_string()),
        }));
        m.insert("zeta".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("zeta".to_string()),
        }));
        m.insert("|".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("bar.v.double".to_string()),
        }));
        m.insert("~".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: Some("space.nobreak".to_string()),
        }));
        m.insert("typstcite".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: Some("__typstcite__".to_string()),
        }));
        m.insert("aligned".to_string(), CommandSpecItem::Env(mitex_spec::EnvShape {
            args: ArgPattern::None,
            ctx_feature: mitex_spec::ContextFeature::None,
            alias: None,
        }));

        // Commands with required arguments
        m.insert("Acf".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("Acl".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("Acs".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("Cref".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("DeclareMathOperator".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("Gls".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("Set".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("ac".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("acrfull".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("acrlong".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("acrshort".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("acute".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("author".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("autocite".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("autoref".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("bar".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("bcancel".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("binom".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("bm".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("boldsymbol".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("boxed".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("breve".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("cancel".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("caption".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("cfrac".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("chapter".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("check".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("cite".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("citep".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("citet".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("color".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("colorbox".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("fcolorbox".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 3 } },
            alias: None,
        }));
        m.insert("hl".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("highlight".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("cref".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("date".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("ddot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("dfrac".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("displaylines".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("dot".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("emph".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("eqref".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("fbox".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("footcite".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("footnote".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("frac".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("gls".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("grave".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("hat".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("href".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("label".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathbb".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathbf".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathbin".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathcal".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathclose".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathfrak".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathinner".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathit".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathop".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathopen".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathord".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathpunct".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathrel".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathrm".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathsf".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("mathtt".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("newacronym".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 3 } },
            alias: None,
        }));
        m.insert("newcommand".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("newglossaryentry".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("not".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("overbrace".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("overline".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("overset".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("pageref".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("paragraph".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("parencite".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("part".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("phantom".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("pmod".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("pod".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("providecommand".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("ref".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("renewcommand".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("section".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("set".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("sqrt".to_string(), CommandSpecItem::Cmd(CmdShape {
            // {,b}t = optional bracket argument, then one term argument
            // This allows \sqrt{x} and \sqrt[n]{x}
            args: ArgShape::Right { pattern: ArgPattern::Glob { pattern: GlobStr::from("{,b}t") } },
            alias: None,
        }));
        m.insert("stackrel".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("subsection".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("subsubsection".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("text".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("textbf".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("textcite".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("textcolor".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("textit".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("textrm".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("textsc".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("texttt".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("tfrac".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("tilde".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("title".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("underbrace".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("underline".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("underset".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        }));
        m.insert("url".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("vec".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("widehat".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("widetilde".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xleftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xleftrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xmapsto".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        // Extended arrow commands from mitex/tex2typst
        m.insert("xLeftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xRightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xLeftrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xhookleftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xhookrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xtwoheadleftarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xtwoheadrightarrow".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xleftharpoonup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xrightharpoonup".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xleftharpoondown".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xrightharpoondown".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xleftrightharpoons".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xrightleftharpoons".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xtofrom".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));
        m.insert("xlongequal".to_string(), CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        }));

        // =====================================================================
        // physics package commands
        // =====================================================================

        // Helper closures for conciseness
        let cmd0 = |alias: Option<&str>| CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::None },
            alias: alias.map(|s| s.to_string()),
        });
        let cmd1 = || CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 1 } },
            alias: None,
        });
        let cmd2 = || CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 2 } },
            alias: None,
        });
        let cmd3 = || CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right { pattern: ArgPattern::FixedLenTerm { len: 3 } },
            alias: None,
        });
        let cmd1_opt = || CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right {
                pattern: ArgPattern::Glob {
                    pattern: GlobStr::from("{,b}t"),
                },
            },
            alias: None,
        });
        let cmd2_opt = || CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right {
                pattern: ArgPattern::Glob {
                    pattern: GlobStr::from("{,b}tt"),
                },
            },
            alias: None,
        });
        let cmd3_opt = || CommandSpecItem::Cmd(CmdShape {
            args: ArgShape::Right {
                pattern: ArgPattern::Glob {
                    pattern: GlobStr::from("{,b}ttt"),
                },
            },
            alias: None,
        });

        // -- Automatic bracing (1 arg) + star variants --
        m.insert("pqty".to_string(), cmd1());
        m.insert("bqty".to_string(), cmd1());
        m.insert("Bqty".to_string(), cmd1());
        m.insert("vqty".to_string(), cmd1());
        m.insert("abs".to_string(), cmd1());
        m.insert("abs*".to_string(), cmd1());
        m.insert("absolutevalue".to_string(), cmd1());
        m.insert("norm".to_string(), cmd1());
        m.insert("norm*".to_string(), cmd1());
        m.insert("eval".to_string(), cmd1());
        m.insert("eval*".to_string(), cmd1());
        m.insert("evaluated".to_string(), cmd1());
        m.insert("order".to_string(), cmd1());
        m.insert("order*".to_string(), cmd1());

        // -- Commutators (2 args) + star variants --
        m.insert("comm".to_string(), cmd2());
        m.insert("comm*".to_string(), cmd2());
        m.insert("commutator".to_string(), cmd2());
        m.insert("acomm".to_string(), cmd2());
        m.insert("acomm*".to_string(), cmd2());
        m.insert("acommutator".to_string(), cmd2());
        m.insert("anticommutator".to_string(), cmd2());
        m.insert("pb".to_string(), cmd2());
        m.insert("pb*".to_string(), cmd2());
        m.insert("poissonbracket".to_string(), cmd2());

        // -- Vector notation (1 arg) --
        m.insert("vb".to_string(), cmd1());
        m.insert("vectorbold".to_string(), cmd1());
        m.insert("va".to_string(), cmd1());
        m.insert("vectorarrow".to_string(), cmd1());
        m.insert("vu".to_string(), cmd1());
        m.insert("vectorunit".to_string(), cmd1());

        // -- Derivatives + star variants --
        m.insert("dd".to_string(), cmd1_opt());
        m.insert("differential".to_string(), cmd1_opt());
        m.insert("dv".to_string(), cmd2_opt());
        m.insert("dv*".to_string(), cmd2_opt());
        m.insert("derivative".to_string(), cmd2_opt());
        m.insert("pdv".to_string(), cmd3_opt());
        m.insert("pdv*".to_string(), cmd3_opt());
        m.insert("pderivative".to_string(), cmd3_opt());
        m.insert("partialderivative".to_string(), cmd3_opt());
        m.insert("fdv".to_string(), cmd2_opt());
        m.insert("fdv*".to_string(), cmd2_opt());
        m.insert("fderivative".to_string(), cmd2_opt());
        m.insert("functionalderivative".to_string(), cmd2_opt());
        m.insert("var".to_string(), cmd1());
        m.insert("variation".to_string(), cmd1());

        // -- Dirac notation + star variants --
        m.insert("ket".to_string(), cmd1());
        m.insert("ket*".to_string(), cmd1());
        m.insert("bra".to_string(), cmd1());
        m.insert("bra*".to_string(), cmd1());
        m.insert("braket".to_string(), cmd2());
        m.insert("braket*".to_string(), cmd2());
        m.insert("innerproduct".to_string(), cmd2());
        m.insert("ip".to_string(), cmd2());
        m.insert("dyad".to_string(), cmd2());
        m.insert("dyad*".to_string(), cmd2());
        m.insert("outerproduct".to_string(), cmd2());
        m.insert("ketbra".to_string(), cmd2());
        m.insert("op".to_string(), cmd2());
        m.insert("expval".to_string(), cmd2());
        m.insert("expval*".to_string(), cmd2());
        m.insert("expectationvalue".to_string(), cmd2());
        m.insert("ev".to_string(), cmd2());
        m.insert("ev*".to_string(), cmd2());
        m.insert("vev".to_string(), cmd1());
        m.insert("mel".to_string(), cmd3());
        m.insert("mel*".to_string(), cmd3());
        m.insert("matrixelement".to_string(), cmd3());
        m.insert("matrixel".to_string(), cmd3());

        // -- Quick quad text --
        m.insert("qq".to_string(), cmd1());
        m.insert("qqtext".to_string(), cmd1());
        // Zero-arg qq variants
        m.insert("qc".to_string(), cmd0(None));
        m.insert("qcomma".to_string(), cmd0(None));
        m.insert("qcc".to_string(), cmd0(None));
        m.insert("qif".to_string(), cmd0(None));
        m.insert("qthen".to_string(), cmd0(None));
        m.insert("qelse".to_string(), cmd0(None));
        m.insert("qotherwise".to_string(), cmd0(None));
        m.insert("qunless".to_string(), cmd0(None));
        m.insert("qgiven".to_string(), cmd0(None));
        m.insert("qusing".to_string(), cmd0(None));
        m.insert("qassume".to_string(), cmd0(None));
        m.insert("qsince".to_string(), cmd0(None));
        m.insert("qlet".to_string(), cmd0(None));
        m.insert("qfor".to_string(), cmd0(None));
        m.insert("qall".to_string(), cmd0(None));
        m.insert("qeven".to_string(), cmd0(None));
        m.insert("qodd".to_string(), cmd0(None));
        m.insert("qinteger".to_string(), cmd0(None));
        m.insert("qand".to_string(), cmd0(None));
        m.insert("qor".to_string(), cmd0(None));
        m.insert("qas".to_string(), cmd0(None));
        m.insert("qin".to_string(), cmd0(None));

        // -- Matrix macros (1 arg) --
        m.insert("mqty".to_string(), cmd1());
        m.insert("matrixquantity".to_string(), cmd1());
        m.insert("pmqty".to_string(), cmd1());
        m.insert("bmqty".to_string(), cmd1());
        m.insert("vmqty".to_string(), cmd1());
        m.insert("Pmqty".to_string(), cmd1());
        m.insert("smqty".to_string(), cmd1());
        m.insert("smallmatrixquantity".to_string(), cmd1());
        m.insert("spmqty".to_string(), cmd1());
        m.insert("sPmqty".to_string(), cmd1());
        m.insert("sbmqty".to_string(), cmd1());
        m.insert("svmqty".to_string(), cmd1());
        m.insert("mdet".to_string(), cmd1());
        m.insert("matrixdeterminant".to_string(), cmd1());
        m.insert("smdet".to_string(), cmd1());
        m.insert("smallmatrixdeterminant".to_string(), cmd1());

        // -- Matrix generators --
        m.insert("imat".to_string(), cmd1());          // \imat{n} → n×n identity
        m.insert("identitymatrix".to_string(), cmd1());
        m.insert("xmat".to_string(), cmd3());          // \xmat{x}{n}{m}
        m.insert("xmatrix".to_string(), cmd3());
        m.insert("zmat".to_string(), cmd2());          // \zmat{n}{m}
        m.insert("zeromatrix".to_string(), cmd2());
        m.insert("pmat".to_string(), cmd1());          // \pmat{n} → Pauli matrix
        m.insert("paulimatrix".to_string(), cmd1());
        m.insert("dmat".to_string(), cmd1());          // \dmat{a,b,c} → diagonal
        m.insert("diagonalmatrix".to_string(), cmd1());
        m.insert("admat".to_string(), cmd1());         // \admat{a,b,c} → anti-diagonal
        m.insert("antidiagonalmatrix".to_string(), cmd1());

        // -- Operators with optional bracing (1 arg) --
        m.insert("Res".to_string(), cmd1());
        m.insert("Residue".to_string(), cmd1());
        m.insert("pv".to_string(), cmd1());
        m.insert("principalvalue".to_string(), cmd1());
        m.insert("PV".to_string(), cmd1());

        // -- Vector calculus operators (0 or 1 arg, handled in markup.rs) --
        m.insert("grad".to_string(), cmd1());
        m.insert("gradient".to_string(), cmd1());
        m.insert("divergence".to_string(), cmd1());
        m.insert("curl".to_string(), cmd1());
        m.insert("laplacian".to_string(), cmd1());

        // -- Zero-arg symbols (handled via extended_symbols.rs) --
        m.insert("dotproduct".to_string(), cmd0(None));
        m.insert("vdot".to_string(), cmd0(None));
        m.insert("crossproduct".to_string(), cmd0(None));
        m.insert("cross".to_string(), cmd0(None));
        m.insert("cp".to_string(), cmd0(None));
        m.insert("divisionsymbol".to_string(), cmd0(None));

        // -- flatfrac (2 args) --
        m.insert("flatfrac".to_string(), cmd2());

        CommandSpec::new(m)
    };
}

// =============================================================================
// TYPST_TO_TEX: Compile-time perfect hash map for Typst -> LaTeX conversion
// Uses phf for O(1) lookup with zero runtime initialization cost
// =============================================================================

/// Typst to LaTeX symbol mapping (compile-time perfect hash)
/// Extended mapping for comprehensive bidirectional conversion
pub static TYPST_TO_TEX: phf::Map<&'static str, &'static str> = phf_map! {
    // =========================================================================
    // Greek Letters (uppercase)
    // =========================================================================
    "Delta" => "Delta",
    "Gamma" => "Gamma",
    "Lambda" => "Lambda",
    "Omega" => "Omega",
    "Phi" => "Phi",
    "Pi" => "Pi",
    "Psi" => "Psi",
    "Sigma" => "Sigma",
    "Theta" => "Theta",
    "Upsilon" => "Upsilon",
    "Xi" => "Xi",

    // =========================================================================
    // Greek Letters (lowercase)
    // =========================================================================
    "alpha" => "alpha",
    "beta" => "beta",
    "gamma" => "gamma",
    "delta" => "delta",
    "epsilon" => "epsilon",
    "epsilon.alt" => "varepsilon",
    "zeta" => "zeta",
    "eta" => "eta",
    "theta" => "theta",
    "theta.alt" => "vartheta",
    "iota" => "iota",
    "kappa" => "kappa",
    "kappa.alt" => "varkappa",
    "lambda" => "lambda",
    "mu" => "mu",
    "nu" => "nu",
    "xi" => "xi",
    "pi" => "pi",
    "pi.alt" => "varpi",
    "rho" => "rho",
    "rho.alt" => "varrho",
    "sigma" => "sigma",
    "sigma.alt" => "varsigma",
    "tau" => "tau",
    "upsilon" => "upsilon",
    "phi" => "varphi",
    "phi.alt" => "phi",
    "chi" => "chi",
    "psi" => "psi",
    "omega" => "omega",

    // =========================================================================
    // Arrows
    // =========================================================================
    "arrow.r" => "rightarrow",
    "arrow.l" => "leftarrow",
    "arrow.t" => "uparrow",
    "arrow.b" => "downarrow",
    "arrow.l.r" => "leftrightarrow",
    "arrow.t.b" => "updownarrow",
    "arrow.r.double" => "Rightarrow",
    "arrow.l.double" => "Leftarrow",
    "arrow.t.double" => "Uparrow",
    "arrow.b.double" => "Downarrow",
    "arrow.l.r.double" => "Leftrightarrow",
    "arrow.t.b.double" => "Updownarrow",
    "arrow.r.long" => "longrightarrow",
    "arrow.l.long" => "longleftarrow",
    "arrow.l.r.long" => "longleftrightarrow",
    "arrow.r.double.long" => "Longrightarrow",
    "arrow.l.double.long" => "Longleftarrow",
    "arrow.l.r.double.long" => "Longleftrightarrow",
    "arrow.r.tail" => "rightarrowtail",
    "arrow.l.tail" => "leftarrowtail",
    "arrow.r.hook" => "hookrightarrow",
    "arrow.l.hook" => "hookleftarrow",
    "arrow.r.squiggly" => "rightsquigarrow",
    "arrow.l.squiggly" => "leftsquigarrow",
    "arrow.r.twohead" => "twoheadrightarrow",
    "arrow.l.twohead" => "twoheadleftarrow",
    "arrow.r.bar" => "mapsto",
    "arrow.l.bar" => "mapsfrom",
    "arrow.r.long.bar" => "longmapsto",
    "harpoon.rt" => "rightharpoonup",
    "harpoon.rb" => "rightharpoondown",
    "harpoon.lt" => "leftharpoonup",
    "harpoon.lb" => "leftharpoondown",
    "harpoons.ltrb" => "leftrightharpoons",
    "harpoons.rtlb" => "rightleftharpoons",
    "arrows.rr" => "rightrightarrows",
    "arrows.ll" => "leftleftarrows",
    "arrows.lr" => "leftrightarrows",
    "arrows.rl" => "rightleftarrows",
    "arrow.ne" => "nearrow",
    "arrow.se" => "searrow",
    "arrow.sw" => "swarrow",
    "arrow.nw" => "nwarrow",

    // =========================================================================
    // Binary Operations
    // =========================================================================
    "plus.minus" => "pm",
    "minus.plus" => "mp",
    "times" => "times",
    "div" => "div",
    "ast" => "ast",
    "star" => "star",
    "circle.small" => "circ",
    "bullet" => "bullet",
    "dot.op" => "cdot",
    "dot.c" => "cdot",
    "circle.plus" => "oplus",
    "circle.minus" => "ominus",
    "circle.times" => "otimes",
    "circle.div" => "oslash",
    "circle.dot" => "odot",
    "square.plus" => "boxplus",
    "square.minus" => "boxminus",
    "square.times" => "boxtimes",
    "square.dot" => "boxdot",
    "wreath" => "wr",
    "diamond.op" => "diamond",
    "triangle.t" => "bigtriangleup",
    "triangle.b" => "bigtriangledown",
    "triangle.l" => "triangleleft",
    "triangle.r" => "triangleright",
    "dagger" => "dagger",
    "dagger.double" => "ddagger",
    "amalg" => "amalg",
    "sect" => "cap",
    "union" => "cup",
    "sect.sq" => "sqcap",
    "union.sq" => "sqcup",
    "sect.big" => "bigcap",
    "union.big" => "bigcup",
    "union.sq.big" => "bigsqcup",
    "sect.sq.big" => "bigsqcap",
    "and" => "wedge",
    "or" => "vee",
    "and.big" => "bigwedge",
    "or.big" => "bigvee",
    "plus.circle" => "oplus",
    "plus.circle.big" => "bigoplus",
    "times.circle" => "otimes",
    "times.circle.big" => "bigotimes",
    "dot.circle.big" => "bigodot",

    // =========================================================================
    // Relations
    // =========================================================================
    "lt" => "lt",
    "gt" => "gt",
    "lt.eq" => "leq",
    "gt.eq" => "geq",
    "lt.eq.slant" => "leqslant",
    "gt.eq.slant" => "geqslant",
    "lt.double" => "ll",
    "gt.double" => "gg",
    "lt.triple" => "lll",
    "gt.triple" => "ggg",
    "lt.not" => "nless",
    "gt.not" => "ngtr",
    "lt.eq.not" => "nleq",
    "gt.eq.not" => "ngeq",
    "eq" => "eq",
    "eq.not" => "neq",
    "equiv" => "equiv",
    "equiv.not" => "nequiv",
    "approx" => "approx",
    "approx.not" => "napprox",
    "tilde.op" => "sim",
    "tilde.eq" => "simeq",
    "tilde.eq.not" => "nsimeq",
    "tilde.equiv" => "cong",
    "tilde.equiv.not" => "ncong",
    "prop" => "propto",
    "prec" => "prec",
    "succ" => "succ",
    "prec.eq" => "preceq",
    "succ.eq" => "succeq",
    "prec.not" => "nprec",
    "succ.not" => "nsucc",
    "subset" => "subset",
    "supset" => "supset",
    "subset.eq" => "subseteq",
    "supset.eq" => "supseteq",
    "subset.not" => "nsubset",
    "supset.not" => "nsupset",
    "subset.eq.not" => "nsubseteq",
    "supset.eq.not" => "nsupseteq",
    "subset.sq" => "sqsubset",
    "supset.sq" => "sqsupset",
    "subset.eq.sq" => "sqsubseteq",
    "supset.eq.sq" => "sqsupseteq",
    "in" => "in",
    "in.not" => "notin",
    "in.rev" => "ni",
    "in.rev.not" => "notni",
    "divides" => "mid",
    "divides.not" => "nmid",
    "parallel" => "parallel",
    "parallel.not" => "nparallel",
    "perp" => "perp",
    "models" => "models",
    "forces" => "Vdash",
    "tack.r" => "vdash",
    "tack.l" => "dashv",
    "tack.t" => "top",
    "tack.b" => "bot",
    "tack.r.double" => "vDash",
    "tack.l.double" => "Dashv",
    "tack.r.not" => "nvdash",
    "tack.r.double.not" => "nvDash",
    "colon" => "colon",
    "coloneq" => "coloneqq",
    "eqcolon" => "eqqcolon",
    "doteq" => "doteq",
    "asymp" => "asymp",
    "bowtie" => "bowtie",
    "smile" => "smile",
    "frown" => "frown",

    // =========================================================================
    // Big Operators
    // =========================================================================
    "sum" => "sum",
    "product" => "prod",
    "coproduct" => "coprod",
    "integral" => "int",
    "integral.double" => "iint",
    "integral.triple" => "iiint",
    "integral.quad" => "iiiint",
    "integral.cont" => "oint",
    "integral.surf" => "oiint",
    "integral.vol" => "oiiint",

    // =========================================================================
    // Functions
    // =========================================================================
    "sin" => "sin",
    "cos" => "cos",
    "tan" => "tan",
    "cot" => "cot",
    "sec" => "sec",
    "csc" => "csc",
    "arcsin" => "arcsin",
    "arccos" => "arccos",
    "arctan" => "arctan",
    "sinh" => "sinh",
    "cosh" => "cosh",
    "tanh" => "tanh",
    "coth" => "coth",
    "exp" => "exp",
    "log" => "log",
    "ln" => "ln",
    "lg" => "lg",
    "lim" => "lim",
    "limsup" => "limsup",
    "liminf" => "liminf",
    "max" => "max",
    "min" => "min",
    "sup" => "sup",
    "inf" => "inf",
    "arg" => "arg",
    "det" => "det",
    "dim" => "dim",
    "gcd" => "gcd",
    "lcm" => "operatorname{lcm}",
    "deg" => "deg",
    "hom" => "hom",
    "ker" => "ker",
    "Pr" => "Pr",
    "Im" => "Im",
    "Re" => "Re",
    "argmin" => "argmin",
    "argmax" => "argmax",

    // =========================================================================
    // Delimiters
    // =========================================================================
    "paren.l" => "(",
    "paren.r" => ")",
    "bracket.l" => "[",
    "bracket.r" => "]",
    "brace.l" => "\\{",
    "brace.r" => "\\}",
    "chevron.l" => "langle",
    "chevron.r" => "rangle",
    "angle.l" => "langle",
    "angle.r" => "rangle",
    "floor.l" => "lfloor",
    "floor.r" => "rfloor",
    "ceil.l" => "lceil",
    "ceil.r" => "rceil",
    "vert" => "vert",
    "vert.double" => "Vert",
    "bar.v" => "|",
    "bar.v.double" => "\\|",

    // =========================================================================
    // Miscellaneous Symbols
    // =========================================================================
    "infinity" => "infty",
    "oo" => "infty",
    "diff" => "partial",
    "partial" => "partial",
    "nabla" => "nabla",
    "gradient" => "nabla",
    "laplace" => "Delta",
    "emptyset" => "emptyset",
    "nothing" => "varnothing",
    "aleph" => "aleph",
    "beth" => "beth",
    "gimel" => "gimel",
    "daleth" => "daleth",
    "ell" => "ell",
    "planck" => "hbar",
    "planck.reduce" => "hbar",
    "hbar" => "hbar",
    "imath" => "imath",
    "jmath" => "jmath",
    "wp" => "wp",
    "prime" => "prime",
    "forall" => "forall",
    "exists" => "exists",
    "exists.not" => "nexists",
    "not" => "neg",
    "complement" => "complement",
    "circle" => "circ",
    "degree" => "degree",
    "angle" => "angle",
    "angle.arc" => "measuredangle",
    "angle.spheric" => "sphericalangle",
    "diameter" => "diameter",
    "therefore" => "therefore",
    "because" => "because",
    "qed" => "square",
    "square" => "square",
    "square.stroked" => "square",
    "square.filled" => "blacksquare",
    "checkmark" => "checkmark",
    "ballot" => "times",

    // =========================================================================
    // Dots
    // =========================================================================
    "dots" => "ldots",
    "dots.h" => "ldots",
    "dots.c" => "cdots",
    "dots.v" => "vdots",
    "dots.down" => "ddots",
    "dots.up" => "iddots",

    // =========================================================================
    // Spaces
    // =========================================================================
    "space" => "\\ ",
    "space.thin" => "\\,",
    "space.med" => "\\:",
    "space.thick" => "\\;",
    "space.quad" => "\\quad",
    "space.wide" => "\\qquad",
    "space.neg" => "\\!",

    // =========================================================================
    // Accents (for use in math mode)
    // =========================================================================
    "hat" => "hat",
    "grave" => "grave",
    "acute" => "acute",
    "tilde" => "tilde",
    "macron" => "bar",
    "breve" => "breve",
    "dot" => "cdot",  // As symbol, dot is \cdot (middle dot); as function dot(x), handled separately
    "diaer" => "ddot",
    "caron" => "check",
    "circle.stroked.tiny" => "mathring",
    "vec" => "vec",

    // =========================================================================
    // Card Symbols
    // =========================================================================
    "suit.club" => "clubsuit",
    "suit.diamond" => "diamondsuit",
    "suit.heart" => "heartsuit",
    "suit.spade" => "spadesuit",

    // =========================================================================
    // Music
    // =========================================================================
    "sharp" => "sharp",
    "flat" => "flat",
    "natural" => "natural",

    // =========================================================================
    // Currency and other
    // =========================================================================
    "dollar" => "\\$",
    "euro" => "euro",
    "pound" => "pounds",
    "yen" => "textyen",
    "percent" => "\\%",
    "copyright" => "copyright",
    "trademark" => "texttrademark",
    "registered" => "textregistered",
    "section" => "S",
    "paragraph" => "P",
    "star.filled" => "bigstar",

    // =========================================================================
    // Special Typst Symbols (from tex2typst shorthands and extras)
    // =========================================================================
    "dif" => "mathrm{d}",       // Typst's differential
    "RR" => "mathbb{R}",
    "NN" => "mathbb{N}",
    "ZZ" => "mathbb{Z}",
    "QQ" => "mathbb{Q}",
    "CC" => "mathbb{C}",
    "AA" => "forall",
    "EE" => "exists",

    // Shorthand arrows
    "->" => "rightarrow",
    "<-" => "leftarrow",
    "=>" => "Rightarrow",
    "<=>" => "Leftrightarrow",
    "<->" => "leftrightarrow",
    "-->" => "longrightarrow",
    "<--" => "longleftarrow",
    "==>" => "Longrightarrow",
    "<==" => "Longleftarrow",
    "<==>" => "Longleftrightarrow",
    "<-->" => "longleftrightarrow",
    "|->" => "mapsto",
    "|=>" => "Mapsto",
    "~>" => "rightsquigarrow",
    "<~" => "leftsquigarrow",
    "~~>" => "leadsto",
    "->>" => "twoheadrightarrow",
    "<<-" => "twoheadleftarrow",
    ">->" => "rightarrowtail",
    "<-<" => "leftarrowtail",

    // Shorthand operators
    "!=" => "neq",
    ">=" => "geq",
    "<=" => "leq",
    ">>" => "gg",
    "<<" => "ll",
    ">>>" => "ggg",
    "<<<" => "lll",
    "||" => "|",
    ":=" => "coloneqq",
    "=:" => "eqqcolon",
    "::=" => "Coloneqq",
    "..." => "ldots",

    // Additional Typst symbols
    "hyph" => "-",
    "hyph.minus" => "-",
    "comma" => ",",
    "thin" => ",",      // thin space
    "med" => ":",       // medium space
    "thick" => ";",     // thick space
    "space.nobreak" => "~",
    "eq.def" => "overset{\\text{def}}{=}",
    "eq.delta" => "triangleq",
    "eq.star" => "stackrel{*}{=}",
    "eq.quest" => "stackrel{?}{=}",

    // Note: Most bracket variants already defined above
    // (floor.l, floor.r, ceil.l, ceil.r, angle.l, angle.r, brace.l, brace.r, paren.l, paren.r, bracket.l, bracket.r)

    // Additional unique symbols
    "star.op" => "*",

    // =========================================================================
    // Extended symbol mappings (from official Typst symbol table diff)
    // =========================================================================

    // Greek uppercase (trivial — rendered as Roman letters in LaTeX)
    "Alpha" => "A",
    "Beta" => "B",
    "Chi" => "X",
    "Digamma" => "\\Digamma",
    "Epsilon" => "E",
    "Eta" => "H",
    "Iota" => "I",
    "Kappa" => "K",
    "Mu" => "M",
    "Nu" => "N",
    "Omicron" => "O",
    "Rho" => "P",
    "Tau" => "T",
    "Zeta" => "Z",
    "digamma" => "\\digamma",

    // Blackboard bold (missing letters)
    "BB" => "\\mathbb{B}",
    "DD" => "\\mathbb{D}",
    "FF" => "\\mathbb{F}",
    "GG" => "\\mathbb{G}",
    "HH" => "\\mathbb{H}",
    "II" => "\\mathbb{I}",
    "JJ" => "\\mathbb{J}",
    "KK" => "\\mathbb{K}",
    "LL" => "\\mathbb{L}",
    "MM" => "\\mathbb{M}",
    "OO" => "\\mathbb{O}",
    "PP" => "\\mathbb{P}",
    "SS" => "\\mathbb{S}",
    "TT" => "\\mathbb{T}",
    "UU" => "\\mathbb{U}",
    "VV" => "\\mathbb{V}",
    "WW" => "\\mathbb{W}",
    "XX" => "\\mathbb{X}",
    "YY" => "\\mathbb{Y}",

    // Arrows (negated/curved variants)
    "arrow.r.not" => "\\nrightarrow",
    "arrow.l.not" => "\\nleftarrow",
    "arrow.r.double.not" => "\\nRightarrow",
    "arrow.l.double.not" => "\\nLeftarrow",
    "arrow.l.r.not" => "\\nleftrightarrow",
    "arrow.l.r.double.not" => "\\nLeftrightarrow",
    "arrow.l.r.wave" => "\\leftrightsquigarrow",
    "arrow.ccw" => "\\curvearrowleft",
    "arrow.cw" => "\\curvearrowright",

    // Comparison variants
    "lt.approx" => "\\lessapprox",
    "lt.equiv" => "\\leqq",
    "lt.gt" => "\\lessgtr",
    "lt.tilde" => "\\lesssim",
    "lt.tri" => "\\vartriangleleft",
    "lt.tri.eq" => "\\trianglelefteq",
    "lt.tri.not" => "\\ntriangleleft",
    "lt.tri.eq.not" => "\\ntrianglelefteq",
    "gt.approx" => "\\gtrapprox",
    "gt.equiv" => "\\geqq",
    "gt.lt" => "\\gtrless",
    "gt.tilde" => "\\gtrsim",
    "gt.tri" => "\\vartriangleright",
    "gt.tri.eq" => "\\trianglerighteq",
    "gt.tri.not" => "\\ntriangleright",
    "gt.tri.eq.not" => "\\ntrianglerighteq",

    // Precedence / Succession variants
    "prec.approx" => "\\precapprox",
    "prec.curly.eq" => "\\preccurlyeq",
    "prec.curly.eq.not" => "\\npreccurlyeq",
    "prec.tilde" => "\\precsim",
    "succ.approx" => "\\succapprox",
    "succ.curly.eq" => "\\succcurlyeq",
    "succ.curly.eq.not" => "\\nsucccurlyeq",
    "succ.tilde" => "\\succsim",

    // Tilde / Approx variants
    "tilde.not" => "\\nsim",
    "tilde.rev" => "\\backsim",
    "tilde.rev.equiv" => "\\backcong",
    "approx.eq" => "\\approxeq",
    "forces.not" => "\\nVdash",

    // Set operation variants
    "subset.double" => "\\Subset",
    "subset.neq" => "\\subsetneq",
    "supset.double" => "\\Supset",
    "supset.neq" => "\\supsetneq",
    "union.dot" => "\\cupdot",
    "union.double" => "\\Cup",
    "union.plus" => "\\uplus",
    "inter" => "\\cap",
    "inter.big" => "\\bigcap",
    "inter.double" => "\\Cap",
    "inter.sq" => "\\sqcap",
    "without" => "\\setminus",

    // Binary operator variants
    "plus" => "+",
    "plus.square" => "\\boxplus",
    "minus" => "-",
    "minus.circle" => "\\ominus",
    "minus.square" => "\\boxminus",
    "times.square" => "\\boxtimes",
    "dot.circle" => "\\odot",
    "ast.op" => "\\ast",
    "xor" => "\\oplus",
    "xor.big" => "\\bigoplus",
    "product.co" => "\\coprod",
    "dots.h.c" => "\\cdots",

    // Triangle variants
    "triangle.stroked.t" => "\\triangle",
    "triangle.stroked.b" => "\\triangledown",
    "triangle.stroked.r" => "\\triangleright",
    "triangle.stroked.l" => "\\triangleleft",
    "triangle.stroked.small.t" => "\\vartriangle",
    "triangle.filled.t" => "\\blacktriangle",
    "triangle.filled.b" => "\\blacktriangledown",
    "triangle.filled.r" => "\\blacktriangleright",
    "triangle.filled.l" => "\\blacktriangleleft",

    // Delimiter variants
    "angle.l.double" => "\\lAngle",
    "angle.r.double" => "\\rAngle",
    "shell.l" => "\\lgroup",
    "shell.r" => "\\rgroup",

    // Shapes
    "circle.stroked" => "\\circ",
    "circle.stroked.small" => "\\circ",
    "diamond.stroked" => "\\diamond",
    "diamond.stroked.small" => "\\diamond",

    // Dotless letters
    "dotless.i" => "\\imath",
    "dotless.j" => "\\jmath",

    // Suits
    "suit.club.filled" => "\\clubsuit",
    "suit.spade.filled" => "\\spadesuit",
    "suit.heart.stroked" => "\\heartsuit",
    "suit.diamond.stroked" => "\\diamondsuit",

    // Misc
    "join" => "\\bowtie",
    "maltese" => "\\maltese",
    "pilcrow" => "\\P",
    "prime.double" => "\\prime\\prime",
    "harpoons.rtlt" => "\\upharpoonright\\!\\upharpoonleft",
    "space.en" => "\\;",
};

// =============================================================================
// DELIMITER_MAP: Single source of truth for lr() delimiter conversion
// Maps Typst delimiter representations to LaTeX output
// =============================================================================

/// Map from Typst delimiter names/chars to LaTeX
/// Key: Typst representation (symbol name or Unicode char)
/// Value: LaTeX output string
pub static DELIMITER_MAP: phf::Map<&'static str, &'static str> = phf_map! {
    // Parentheses
    "(" => "(",
    ")" => ")",
    "paren.l" => "(",
    "paren.r" => ")",
    // Brackets
    "[" => "[",
    "]" => "]",
    "bracket.l" => "[",
    "bracket.r" => "]",
    // Braces
    "{" => "\\{",
    "}" => "\\}",
    "brace.l" => "\\{",
    "brace.r" => "\\}",
    // Single bars
    "|" => "|",
    "bar.v" => "|",
    "vert" => "|",
    // Double bars
    "||" => "\\|",
    "bar.v.double" => "\\|",
    "vert.double" => "\\|",
    // Angle brackets (Unicode)
    "⟨" => "\\langle",
    "⟩" => "\\rangle",
    "〈" => "\\langle",
    "〉" => "\\rangle",
    // Angle brackets (Typst names)
    "angle.l" => "\\langle",
    "angle.r" => "\\rangle",
    "chevron.l" => "\\langle",
    "chevron.r" => "\\rangle",
    // Floor (Unicode)
    "⌊" => "\\lfloor",
    "⌋" => "\\rfloor",
    // Floor (Typst names)
    "floor.l" => "\\lfloor",
    "floor.r" => "\\rfloor",
    // Ceiling (Unicode)
    "⌈" => "\\lceil",
    "⌉" => "\\rceil",
    // Ceiling (Typst names)
    "ceil.l" => "\\lceil",
    "ceil.r" => "\\rceil",
};
