Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MathML documentation about the <ms> element #21248

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 18 additions & 4 deletions files/en-us/web/mathml/element/ms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,41 @@ browser-compat: mathml.elements.ms

{{MathMLRef}}

The MathML `<ms>` element represents a _string literal_ meant to be interpreted by programming languages and computer algebra systems. By default, string literals are displayed as enclosed by double quotes (`&quot;`); by using the `lquote` and `rquote` attributes, you can set custom characters to display. Note that quotation marks should not be specified unless they are part of the string literal. The content of an `<ms>` element is not an ASCII string per se, but rather a sequence of characters and {{ MathMLElement("malignmark") }} elements.
The MathML `<ms>` element represents a _string literal_ meant to be interpreted by programming languages and computer algebra systems.

## Attributes

This element's attributes include the [global MathML attributes](/en-US/docs/Web/MathML/Global_attributes).

Some browsers may also support the following deprecated attributes and will render the content of the `<ms>` element surrounded by the specified opening and closing quotes:

- `lquote`
- : The opening quote character (depends on [`dir`](#attr-dir)) to enclose the content. The default value is "`&quot;".`
- : The opening quote to enclose the content. The default value is `&quot;`.

- `rquote`
- : The closing quote mark (depends on [`dir`](#attr-dir)) to enclose the content. The default value is "`&quot;".`
- : The closing quote to enclose the content. The default value is `&quot;`.

## Examples

### Default rendering

```html
<math display="block">
<ms>Hello World!</ms>
</math>
```

{{ EmbedLiveSample('default_rendering', 700, 200, "", "") }}

### Legacy quote attributes

```html
<math display="block">
<ms lquote="„" rquote="'">abc</ms>
</math>
```

{{ EmbedLiveSample('ms_example', 700, 200, "", "") }}
{{ EmbedLiveSample('legacy_quote_attributes', 700, 200, "", "") }}

## Specifications

Expand Down