A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/KaTeX/KaTeX/commit/0e0835262345d991df61a435800a16b069a4d5c7 below:

`\vdots` and `\rule` support in text mode (#3997) · KaTeX/KaTeX@0e08352 · GitHub

File tree Expand file treeCollapse file tree 4 files changed

+14

-2

lines changed

Filter options

Expand file treeCollapse file tree 4 files changed

+14

-2

lines changed Original file line number Diff line number Diff line change

@@ -11,6 +11,8 @@ defineFunction({

11 11

props: {

12 12

numArgs: 2,

13 13

numOptionalArgs: 1,

14 +

allowedInText: true,

15 +

allowedInMath: true,

14 16

argTypes: ["size", "size", "size"],

15 17

},

16 18

handler({parser}, args, optArgs) {

Original file line number Diff line number Diff line change

@@ -341,7 +341,7 @@ defineMacro("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}");

341 341

// \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}

342 342

// We'll call \varvdots, which gets a glyph from symbols.js.

343 343

// The zero-width rule gets us an equivalent to the vertical 6pt kern.

344 -

defineMacro("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}");

344 +

defineMacro("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}");

345 345

defineMacro("\u22ee", "\\vdots");

346 346 347 347

//////////////////////////////////////////////////////////////////////

Original file line number Diff line number Diff line change

@@ -673,7 +673,9 @@ defineSymbol(text, main, inner, "\u2026", "\\ldots", true);

673 673

defineSymbol(math, main, inner, "\u2026", "\\ldots", true);

674 674

defineSymbol(math, main, inner, "\u22ef", "\\@cdots", true);

675 675

defineSymbol(math, main, inner, "\u22f1", "\\ddots", true);

676 -

defineSymbol(math, main, textord, "\u22ee", "\\varvdots"); // \vdots is a macro

676 +

// \vdots is a macro that uses one of these two symbols (with made-up names):

677 +

defineSymbol(math, main, textord, "\u22ee", "\\varvdots");

678 +

defineSymbol(text, main, textord, "\u22ee", "\\varvdots");

677 679

defineSymbol(math, main, accent, "\u02ca", "\\acute");

678 680

defineSymbol(math, main, accent, "\u02cb", "\\grave");

679 681

defineSymbol(math, main, accent, "\u00a8", "\\ddot");

Original file line number Diff line number Diff line change

@@ -807,6 +807,10 @@ describe("A text parser", function() {

807 807

it("should omit spaces after commands", function() {

808 808

expect`\text{\textellipsis !}`.toParseLike`\text{\textellipsis!}`;

809 809

});

810 + 811 +

it("should handle ⋮ and \\vdots", function() {

812 +

expect`\text{a \vdots b ⋮ d}`.toParse();

813 +

});

810 814

});

811 815 812 816

describe("A texvc builder", function() {

@@ -1065,6 +1069,10 @@ describe("A rule parser", function() {

1065 1069

expect(parse.width.number).toBeCloseTo(-1);

1066 1070

expect(parse.height.number).toBeCloseTo(-0.2);

1067 1071

});

1072 + 1073 +

it("should parse in text mode", function() {

1074 +

expect(r`\text{a\rule{1em}{2em}b}`).toParse();

1075 +

});

1068 1076

});

1069 1077 1070 1078

describe("A kern parser", function() {

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4