Skip to content

Commit 780d762

Browse files
nickkolokmarijnh
authored andcommitted
[stex mode] Added some tags whose arguments are atom
1 parent 07fdccf commit 780d762

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

mode/stex/stex.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@
7878
plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]);
7979
plugins["end"] = addPluginPattern("end", "tag", ["atom"]);
8080

81+
plugins["label" ] = addPluginPattern("label" , "tag", ["atom"]);
82+
plugins["ref" ] = addPluginPattern("ref" , "tag", ["atom"]);
83+
plugins["eqref" ] = addPluginPattern("eqref" , "tag", ["atom"]);
84+
plugins["cite" ] = addPluginPattern("cite" , "tag", ["atom"]);
85+
plugins["bibitem" ] = addPluginPattern("bibitem" , "tag", ["atom"]);
86+
plugins["Bibitem" ] = addPluginPattern("Bibitem" , "tag", ["atom"]);
87+
plugins["RBibitem" ] = addPluginPattern("RBibitem" , "tag", ["atom"]);
88+
8189
plugins["DEFAULT"] = function () {
8290
this.name = "DEFAULT";
8391
this.style = "tag";

mode/stex/test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@
117117
MT("displayMath",
118118
"More [keyword $$]\t[variable-2 S][tag ^][variable-2 n][tag \\sum] [variable-2 i][keyword $$] other text");
119119

120+
MT("displayMath environment",
121+
"[tag \\begin][bracket {][atom equation][bracket }] x [tag \\end][bracket {][atom equation][bracket }] other text");
122+
123+
MT("displayMath environment with label",
124+
"[tag \\begin][bracket {][atom equation][bracket }][tag \\label][bracket {][atom eq1][bracket }] x [tag \\end][bracket {][atom equation][bracket }] other text~[tag \\ref][bracket {][atom eq1][bracket }]");
125+
120126
MT("mathWithComment",
121127
"[keyword $][variable-2 x] [comment % $]",
122128
"[variable-2 y][keyword $] other text");

0 commit comments

Comments
 (0)