Skip to content

Commit

Permalink
added \imath and \jmath
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbarabash committed Jun 28, 2015
1 parent 32c41e3 commit 35507f1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/buildCommon.js
Expand Up @@ -75,8 +75,13 @@ var mathDefault = function(value, mode, color, classes, type) {
* Makes a symbol in the italic math font.
*/
var mathit = function(value, mode, color, classes) {
return makeSymbol(
value, "Math-Italic", mode, color, classes.concat(["mathit"]));
if (utils.contains(["\\imath", "\\jmath"], value)) {
return makeSymbol(
value, "Main-Italic", mode, color, classes.concat(["mainit"]));
} else {
return makeSymbol(
value, "Math-Italic", mode, color, classes.concat(["mathit"]));
}
};

/**
Expand Down
11 changes: 11 additions & 0 deletions src/symbols.js
Expand Up @@ -2493,6 +2493,17 @@ var symbols = {
font: "main",
group: "accent",
replace: "\u02d9"
},

"\\imath": {
font: "main",
group: "mathord",
replace: "\u0131"
},
"\\jmath": {
font: "main",
group: "mathord",
replace: "\u0237"
}
},
"text": {
Expand Down
5 changes: 5 additions & 0 deletions static/katex.less
Expand Up @@ -82,6 +82,11 @@
font-family: KaTeX_SansSerif;
}

.mainit {
font-family: KaTeX_Main;
font-style: italic;
}

// This value is also used in fontMetrics.js, if you change it make sure the
// values match.
@ptperem: 10.0;
Expand Down

0 comments on commit 35507f1

Please sign in to comment.