Files
Library/node_modules/@shikijs/langs/dist/tex.mjs

9 lines
10 KiB
JavaScript
Raw Normal View History

2026-01-09 23:05:52 -05:00
import r from './r.mjs'
const lang = Object.freeze(JSON.parse("{\"displayName\":\"TeX\",\"name\":\"tex\",\"patterns\":[{\"include\":\"#iffalse-block\"},{\"include\":\"#macro-control\"},{\"include\":\"#catcode\"},{\"include\":\"#comment\"},{\"match\":\"[]\\\\[]\",\"name\":\"punctuation.definition.brackets.tex\"},{\"include\":\"#dollar-math\"},{\"match\":\"\\\\\\\\\\\\\\\\\",\"name\":\"keyword.control.newline.tex\"},{\"include\":\"#ifnextchar\"},{\"include\":\"#macro-general\"}],\"repository\":{\"braces\":{\"begin\":\"(?<!\\\\\\\\)\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.group.begin.tex\"}},\"end\":\"(?<!\\\\\\\\)}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.group.end.tex\"}},\"name\":\"meta.group.braces.tex\",\"patterns\":[{\"include\":\"#braces\"}]},\"catcode\":{\"captures\":{\"1\":{\"name\":\"keyword.control.catcode.tex\"},\"2\":{\"name\":\"punctuation.definition.keyword.tex\"},\"3\":{\"name\":\"punctuation.separator.key-value.tex\"},\"4\":{\"name\":\"constant.numeric.category.tex\"}},\"match\":\"((\\\\\\\\)catcode)`\\\\\\\\?.(=)(\\\\d+)\",\"name\":\"meta.catcode.tex\"},\"comment\":{\"begin\":\"(^[\\\\t ]+)?(?=%)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.whitespace.comment.leading.tex\"}},\"end\":\"(?!\\\\G)\",\"patterns\":[{\"begin\":\"%:?\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.tex\"}},\"end\":\"$\\\\n?\",\"name\":\"comment.line.percentage.tex\"},{\"begin\":\"^(%!TEX) (\\\\S*) =\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.comment.tex\"}},\"end\":\"$\\\\n?\",\"name\":\"comment.line.percentage.directive.tex\"}]},\"conditionals\":{\"begin\":\"(?<=^\\\\s*)\\\\\\\\if[a-z]*\",\"end\":\"(?<=^\\\\s*)\\\\\\\\fi\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#conditionals\"}]},\"dollar-math\":{\"begin\":\"(\\\\$\\\\$?)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.string.begin.tex\"}},\"end\":\"(\\\\1)\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.definition.string.end.tex\"}},\"name\":\"meta.math.block.tex support.class.math.block.tex\",\"patterns\":[{\"match\":\"\\\\\\\\\\\\$\",\"name\":\"constant.character.escape.tex\"},{\"include\":\"#math-content\"},{\"include\":\"$self\"}]},\"iffalse-block\":{\"begin\":\"(?<=^\\\\s*)((\\\\\\\\)iffalse)(?!\\\\s*[{}]\\\\s*\\\\\\\\fi\\\\b)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.tex\"},\"2\":{\"name\":\"punctuation.definition.keyword.tex\"}},\"contentName\":\"comment.line.percentage.tex\",\"end\":\"((\\\\\\\\)(?:else|fi))\\\\b\",\"endCaptures\":{\"1\":{\"name\":\"keyword.control.tex\"},\"2\":{\"name\":\"punctuation.definition.keyword.tex\"}},\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#braces\"},{\"include\":\"#conditionals\"}]},\"ifnextchar\":{\"match\":\"\\\\\\\\@ifnextchar[(\\\\[{]\",\"name\":\"keyword.control.ifnextchar.tex\"},\"macro-control\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.keyword.tex\"}},\"match\":\"(\\\\\\\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![@-Za-z])\",\"name\":\"keyword.control.tex\"},\"macro-general\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"punctuation.definition.function.tex\"}},\"match\":\"(\\\\\\\\)_*[@\\\\p{Alphabetic}]+(?:_[@\\\\p{Alphabetic}]+)*:[DFNTVcefnopvwx]*\",\"name\":\"support.class.general.latex3.tex\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.function.tex\"}},\"match\":\"(\\\\.)[@\\\\p{Alphabetic}]+(?:_[@\\\\p{Alphabetic}]+)*:[DFNTVcefnopvwx]*\",\"name\":\"support.class.general.latex3.tex\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.function.tex\"}},\"match\":\"(\\\\\\\\)(?:[,;]|[@\\\\p{Alphabetic}]+)\",\"name\":\"support.function.general.tex\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.keyword.tex\"}},\"match\":\"(\\\\\\\\)[^@-Za-z]\",\"name\":\"constant.character.escape.tex\"}]},\"math-content\":{\"patterns\":[{\"begin\":\"((\\\\\\\\)(?:text|mbox))(\\\\{)\",\"beginCaptures\":{\"1\":{\"name\":\"constant.other.math.tex\"},\"2\":{\"name\":\"pu
export default [
...r,
lang
]