Skip to content

Commit

Permalink
Add \overarc command.
Browse files Browse the repository at this point in the history
This is simply another Style command with custom CSS to make curved border.
  • Loading branch information
kschaefe committed Sep 29, 2016
1 parent 65ce5c8 commit a926747
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/commands/math/commands.js
Expand Up @@ -81,6 +81,7 @@ LatexCmds.underline = bind(Style, '\\underline', 'span', 'class="mq-non-leaf mq-
LatexCmds.overline = LatexCmds.bar = bind(Style, '\\overline', 'span', 'class="mq-non-leaf mq-overline"');
LatexCmds.overrightarrow = bind(Style, '\\overrightarrow', 'span', 'class="mq-non-leaf mq-overarrow mq-arrow-right"');
LatexCmds.overleftarrow = bind(Style, '\\overleftarrow', 'span', 'class="mq-non-leaf mq-overarrow mq-arrow-left"');
LatexCmds.overarc = bind(Style, '\\overarc', 'span', 'class="mq-non-leaf mq-overarc"');

// `\textcolor{color}{math}` will apply a color to the given math content, where
// `color` is any valid CSS Color Value (see [SitePoint docs][] (recommended),
Expand Down
12 changes: 12 additions & 0 deletions src/css/math.less
Expand Up @@ -343,6 +343,18 @@
font-family: @symbola;
}

.mq-overarc {
border-top: 1px solid black;
-webkit-border-top-right-radius: 50% .3em;
-moz-border-radius-topright: 50% .3em;
border-top-right-radius: 50% .3em;
-webkit-border-top-left-radius: 50% .3em;
-moz-border-radius-topleft: 50% .3em;
border-top-left-radius: 50% .3em;
margin-top: 1px;
padding-top: 0.15em;
}

.mq-overarrow {
border-top: 1px solid black;
margin-top: 1px;
Expand Down

0 comments on commit a926747

Please sign in to comment.