Skip to content

Commit

Permalink
Make ms behave like mn and add a note about legacy support.
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-wang committed Nov 25, 2019
1 parent f4d766e commit 50862c5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
36 changes: 13 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1881,37 +1881,27 @@ <h3>Definition of space-like elements</h3>
</section>
<section id="string-literal-ms">
<h4>String Literal <code>&lt;ms&gt;</code></h4>
<div class="issue" data-number="120">Can this element be simplified?</div>
<div class="issue" data-number="126">Does not work in RTL mode</div>
<p>
<dfn><code>&lt;ms&gt;</code></dfn>
element is used to represent
"string literals" in expressions meant to be interpreted by computer
algebra systems or other systems containing "programming languages".
</p>
<p>
The <code>&lt;mn&gt;</code> element accepts the attributes described
in <a href="#global-attributes"></a> as well as the following
attributes:
</p>
<ul>
<li><a><code>lquote</code></a></li>
<li><a><code>rquote</code></a></li>
</ul>
<p>The
<dfn><code>lquote</code></dfn>,
<dfn><code>rquote</code></dfn> attributes respectively specify the strings to use as opening and
closing quotes. An unspecified attribute is
interpreted as the character U+0022 QUOTATION MARK.
The <code>&lt;ms&gt;</code> element accepts the attributes described
in <a href="#global-attributes"></a>. Its layout algorithm is
the same as the <a><code>&lt;mtext&gt;</code></a> element.
</p>
<p>
The layout algorithm is the same as the
<a><code>&lt;mtext&gt;</code></a> element.
The <a href="#user-agent-stylesheet">user agent stylesheet</a>
must contain the following rules in order to enclose the content with
quotes:
</p>
<pre class="css" data-include="user-agent-stylesheet/ms.css"></pre>
<div class="note">
In MathML3, it was possible to use the <code>lquote</code> and
<code>rquote</code> attributes to respectively specify the strings
to use as opening and closing quotes. These are no longer supported
and the quotes must instead be specified as part of the text of the
<code>&lt;ms&gt;</code> element. One can add CSS rules to legacy
documents in order to preserve visual rendering. For example,
in left-to-right direction:
<pre class="css" data-include="user-agent-stylesheet/ms.css"></pre>
</div>
</section>
</section>
<section>
Expand Down
6 changes: 3 additions & 3 deletions user-agent-stylesheet/ms.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ms:before, ms:after {
content: "\0022"
content: "\0022";
}
ms[lquote]:before {
content: attr(lquote)
content: attr(lquote);
}
ms[rquote]:after {
content: attr(rquote)
content: attr(rquote);
}

0 comments on commit 50862c5

Please sign in to comment.