mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Add \nobreakspace (#1145)
This commit is contained in:
@@ -563,6 +563,8 @@ defineSymbol(math, main, spacing, null, "\\enspace");
|
|||||||
defineSymbol(math, main, spacing, null, "\\qquad");
|
defineSymbol(math, main, spacing, null, "\\qquad");
|
||||||
defineSymbol(math, main, spacing, null, "\\quad");
|
defineSymbol(math, main, spacing, null, "\\quad");
|
||||||
defineSymbol(math, main, spacing, "\u00a0", "\\space");
|
defineSymbol(math, main, spacing, "\u00a0", "\\space");
|
||||||
|
// Ref: LaTeX Source 2e: \DeclareRobustCommand{\nobreakspace}{%
|
||||||
|
defineSymbol(math, main, spacing, "\u00a0", "\\nobreakspace");
|
||||||
defineSymbol(text, main, spacing, null, "\\!");
|
defineSymbol(text, main, spacing, null, "\\!");
|
||||||
defineSymbol(text, main, spacing, "\u00a0", "\\ ");
|
defineSymbol(text, main, spacing, "\u00a0", "\\ ");
|
||||||
defineSymbol(text, main, spacing, "\u00a0", "~");
|
defineSymbol(text, main, spacing, "\u00a0", "~");
|
||||||
@@ -573,6 +575,7 @@ defineSymbol(text, main, spacing, null, "\\enspace");
|
|||||||
defineSymbol(text, main, spacing, null, "\\qquad");
|
defineSymbol(text, main, spacing, null, "\\qquad");
|
||||||
defineSymbol(text, main, spacing, null, "\\quad");
|
defineSymbol(text, main, spacing, null, "\\quad");
|
||||||
defineSymbol(text, main, spacing, "\u00a0", "\\space");
|
defineSymbol(text, main, spacing, "\u00a0", "\\space");
|
||||||
|
defineSymbol(text, main, spacing, "\u00a0", "\\nobreakspace");
|
||||||
defineSymbol(math, main, punct, ",", ",");
|
defineSymbol(math, main, punct, ",", ",");
|
||||||
defineSymbol(math, main, punct, ";", ";");
|
defineSymbol(math, main, punct, ";", ";");
|
||||||
defineSymbol(math, main, punct, ":", "\\colon");
|
defineSymbol(math, main, punct, ":", "\\colon");
|
||||||
|
@@ -2999,7 +2999,7 @@ describe("Symbols", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should parse spacing functions in math or text mode", () => {
|
it("should parse spacing functions in math or text mode", () => {
|
||||||
expect("A\\;B\\,C \\text{A\\;B\\,C}").toParse();
|
expect("A\\;B\\,C\\nobreakspace \\text{A\\;B\\,C\\nobreakspace}").toParse();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should render ligature commands like their unicode characters", () => {
|
it("should render ligature commands like their unicode characters", () => {
|
||||||
|
Reference in New Issue
Block a user