w3c / w3c/mathml

Styling MathML-Next Markup

Open
#78 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css / html5 enhancement MathML-Next
Dominant language
HTML
Stars
82
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Introduction

In https://github.com/mathml-refresh/mathml/issues/68, in the section titled URL String Interpolation, Templating and Formatting, a syntactic option was presented with which we could express markup resembling:

<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation-xml encoding="application/mathml-presentation+xml" lang="en" src="math.php?equation=eq1&amp;type=application%2Fmathml-presentation+xml&amp;language=en" />
    <annotation-xml encoding="application/xhtml+xml" lang="en" src="math.php?equation=eq1&amp;type=application%2Fxhtml+xml&amp;language=en" />
    <annotation-xml encoding="application/svg+xml" lang="en" src="math.php?equation=eq1&amp;type=application%2Fsvg+xml&amp;language=en" />
    <annotation-xml encoding="application/mathml-presentation+xml" lang="fr" src="math.php?equation=eq1&amp;type=application%2Fmathml-presentation+xml&amp;language=fr" />
    <annotation-xml encoding="application/xhtml+xml" lang="fr" src="math.php?equation=eq1&amp;type=application%2Fxhtml+xml&amp;language=fr" />
    <annotation-xml encoding="application/svg+xml" lang="fr" src="math.php?equation=eq1&amp;type=application%2Fsvg+xml&amp;language=fr" />
    <annotation-xml encoding="application/mathml-presentation+xml" lang="es" src="math.php?equation=eq1&amp;type=application%2Fmathml-presentation+xml&amp;language=es" />
    <annotation-xml encoding="application/xhtml+xml" lang="es" src="math.php?equation=eq1&amp;type=application%2Fxhtml+xml&amp;language=es" />
    <annotation-xml encoding="application/svg+xml" lang="es" src="math.php?equation=eq1&amp;type=application%2Fsvg+xml&amp;language=es" />
    <annotation-xml encoding="application/mathml-presentation+xml" lang="de" src="math.php?equation=eq1&amp;type=application%2Fmathml-presentation+xml&amp;language=de" />
    <annotation-xml encoding="application/xhtml+xml" lang="de" src="math.php?equation=eq1&amp;type=application%2Fxhtml+xml&amp;language=de" />
    <annotation-xml encoding="application/svg+xml" lang="de" src="math.php?equation=eq1&amp;type=application%2Fsvg+xml&amp;language=de" />
  </semantics>
</math>

with markup resembling:

<math id="eq1">
  <semantics>
    <mrow>default</mrow>
    <annotation-xml encoding="application/mathml-presentation+xml application/xhtml+xml application/svg+xml" lang="en fr es de" pattern="math.php?equation=eq1&amp;type={encoding}&amp;language={lang}" />
  </semantics>
</math>

The syntactic option, with an accompanying content selection algorithm, utilizes space-delimited values for certain attributes, e.g. encoding and lang, with a pattern attribute which, via string interpolation, generates values for a src attribute.

In the first example with twelve <annotation-xml> elements, we could select to style with a syntax resembling:

math > semantics > annotation-xml[encoding='application/mathml-presentation+xml']:selected

or

math annotation-xml[encoding='application/mathml-presentation+xml']:selected

Any thoughts on how we might style content in the second example with one <annotation-xml> element?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issue #68, especially the “URL String Interpolation, Templating and Formatting” section, then compare the two MathML examples and their proposed selector forms. A contribution would need to establish and document how styling should select content produced by the single annotation-xml element; the issue does not name implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.