Add limit operators

Summary:
Add support for all of the other operators, including the ones with symbols and
limits. This also fixes the bug where subscripts were shifted the same amount as
subscripts.

To accomplish this, the domTree.textNode has been repurposed into symbolNode
which is no longer an actual text node, but instead represents an element with a
single symbol in it. This lets us access properties like the italic correction
of a symbol in a reasonable manner without having to recursively look through
children of spans.

Depends on D13082

Fixes #8

Test Plan:
 - Make sure tests work
 - Make sure huxley screenshots didn't change much, and new screenshot looks good

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13122
This commit is contained in:
Emily Eisenberg
2014-09-12 14:58:58 -07:00
parent 29b00ee6b7
commit f52c84c187
14 changed files with 427 additions and 81 deletions

View File

@@ -385,10 +385,10 @@ big parens
&.mult {
.delim-size1 > span {
font-family: Katex_Size1;
font-family: KaTeX_Size1;
}
.delim-size4 > span {
font-family: Katex_Size4;
font-family: KaTeX_Size4;
}
}
}
@@ -397,4 +397,21 @@ big parens
display: inline-block;
width: @nulldelimiterspace;
}
.op-symbol {
position: relative;
&.small-op {
font-family: KaTeX_Size1;
}
&.large-op {
font-family: KaTeX_Size2;
}
}
.op-limits {
> .vlist > span {
text-align: center;
}
}
}