<?xml version="1.0" encoding="UTF-8"?>
<metanorma xmlns="https://www.metanorma.org/ns/standoc" type="semantic" version="2.9.1" schema-version="v2.3.0" flavor="ribose">
<bibdata type="standard">
<title language="en" type="main">Plurimath specifications — Format interfaces</title>
<docidentifier primary="true" type="Ribose">1003(d)</docidentifier><docnumber>1003</docnumber><date type="updated"><on>2026-10-31</on></date><contributor><role type="author"/><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></contributor><contributor><role type="author"><description>committee</description></role><organization>
<name>Ribose Asia Limited</name>
<subdivision type="Committee" subtype="technical">
<name>Plurimath</name>
</subdivision></organization></contributor><contributor><role type="publisher"/><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></contributor><edition>1</edition><version>2026-10-31</version><language>en</language><script>Latn</script><status><stage>draft-standard</stage></status><copyright><from>2026</from><owner><organization>
<name>Ribose Asia Limited</name>
<abbreviation>Ribose</abbreviation></organization></owner></copyright><ext><doctype>standard</doctype><flavor>ribose</flavor></ext></bibdata><metanorma-extension><semantic-metadata><stage-published>false</stage-published></semantic-metadata>
<presentation-metadata><toc-heading-levels>2</toc-heading-levels><html-toc-heading-levels>2</html-toc-heading-levels><doc-toc-heading-levels>2</doc-toc-heading-levels><pdf-toc-heading-levels>2</pdf-toc-heading-levels></presentation-metadata></metanorma-extension>
<boilerplate><copyright-statement>

<clause id="_0bf1199e-8f6c-bc16-f9b0-78b3f1efec79" obligation="normative"><p id="_945067f2-795a-1e64-6f2b-25dd57c0f4d3">© Ribose Asia Limited 2026</p>
</clause>
</copyright-statement>

<license-statement>

<clause id="_3179d22c-816d-e694-6037-341f744bc6dc" obligation="normative">
<title id="_5ad8fb30-fcae-1072-87a2-407e6b4939ec">Warning for Drafts</title>
<p id="_a24807ee-0381-7ef8-1167-c3aacbb0fd73">This document is not a Ribose Standard. It is distributed for review and comment, and is subject to change without notice and may not be referred to as a Standard. Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
</clause>
</license-statement>

<legal-statement>

<clause id="_7e0f3c63-3fc9-65cf-37f7-b94afa0dbc5d" obligation="normative"><p id="_50bbfa02-61c3-8332-bad8-61e7389d1808">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from the address below.</p>
</clause>
</legal-statement>

<feedback-statement>

<clause id="_d43a5e83-e752-e9bc-955e-4282a8ebb43a" obligation="normative"><p id="_0145a561-c9cc-a509-4784-ac2a1e6ea922" anchor="boilerplate-name" align="left">Ribose Asia Limited</p>

<p id="_80954cc8-1f49-9d20-5987-829595995a92" anchor="boilerplate-address" align="left">Suite 1, 8/F, New Henry House<br/> 10 Ice House Street<br/> Central<br/> Hong Kong<br/> <br/> <link target="mailto:copyright@ribose.com"/><br/> <link target="https://www.ribose.com">www.ribose.com</link></p>
</clause>
</feedback-statement>
</boilerplate><preface><foreword id="_1e8fe551-7315-47bd-d79a-3a985c3516db" obligation="informative">
<title id="_41c9fad3-d4c1-eecc-4fad-f91704acc026">Foreword</title>
<clause id="_fcfca09c-5cbc-d660-12d7-a64b211a92dd" obligation="informative">
<title id="_e29a5469-67c9-90aa-f17a-63304bcec2bb">General</title>
<p id="_bfc03eaf-60df-0048-0cbe-7b0b677273e6">This document is the third document of the Plurimath specifications series. It specifies the format interfaces: the readers that turn text and markup in each supported notation into the formula tree, the writers that turn the tree back out, the error behaviour at each boundary, and the round-trip properties that connect them.</p>

<p id="_59db05c4-c309-797c-9342-9fccb9d33da5">The interfaces described here are implemented in the <tt>plurimath</tt> gem of the 0.11 series. Where this document and the implementation disagree, the disagreement is a defect in one of the two.</p>
</clause>

<clause id="_ff5ab875-bc44-19c1-7d99-107f0e7310b7" obligation="informative">
<title id="_dff8ad12-da29-1635-d34a-86a12ce26e23">Documents in the series</title>
<table id="_b9561713-aced-3307-2648-d5625732ef9e"><colgroup><col width="16.6666%"/><col width="50%"/><col width="33.3334%"/></colgroup>
<name id="_8ba81754-e2a3-6855-e68d-adf51719d6bc">Documents in the series</name>
<thead><tr id="_2432e572-7864-80cb-c492-7f47cb7b7cf6"><th id="_1b704ae7-780b-ecf8-bef7-fa18d5d88a1f" valign="top" align="left">Number</th>
<th id="_bf960ce6-4737-ae2a-a5e5-4ddb5b06d416" valign="top" align="left">Title</th>
<th id="_32566de1-8f31-8daf-1907-1beb1e2c407e" valign="top" align="left">Subject</th>
</tr></thead>
<tbody><tr id="_f1dc34d5-f74b-fbc7-4204-b2474d2ea051"><td id="_30b37317-5e34-fd61-49b1-fc10134813b8" valign="top" align="left">1001</td>
<td id="_ba3e6170-bcb4-c94c-9c13-10cae18788f4" valign="top" align="left">Math model</td>
<td id="_20467d8e-02ab-9abf-7ad0-add62db36470" valign="top" align="left">The formula tree, the node classes, the registry, the rendering surfaces</td>
</tr><tr id="_fc2ac57c-66de-b565-ee10-91ce10b6dafa"><td id="_1eb9bc75-45e1-8265-fabb-fab472ad0cd0" valign="top" align="left">1002</td>
<td id="_b345ea72-98b4-2ef8-427a-dd9f6b57782a" valign="top" align="left">Uncertainty model</td>
<td id="_aa0fcc5f-ca05-660d-5dbf-b8c25ffb34a9" valign="top" align="left">The uncertainty node, its categories, its encodings</td>
</tr><tr id="_b88d3f62-d393-36fc-9a68-edfafb300a48"><td id="_caf92e88-9ba6-defb-b7af-51a45b3d40f2" valign="top" align="left">1003</td>
<td id="_21509851-4f65-9a0b-add1-128aced03496" valign="top" align="left">Format interfaces</td>
<td id="_e2d6f965-c0f5-8591-919f-d3f9baf1dd35" valign="top" align="left">This document: the readers and writers per format</td>
</tr><tr id="_dc724f53-82e3-5aee-80ea-87aa19e05734"><td id="_6b1fa606-369a-8e21-2f24-fc99fc4b5631" valign="top" align="left">1004</td>
<td id="_396b142d-2308-23b0-b1d8-658992ca1e3b" valign="top" align="left">Evaluation</td>
<td id="_b1f12984-29a6-4c5d-27e9-6be3f5f9ccd4" valign="top" align="left">Numeric evaluation and uncertainty propagation</td>
</tr></tbody>
</table>
</clause>

<clause id="_91287e17-b901-367a-9fc7-7d8b34bf86db" obligation="informative">
<title id="_acf72849-a777-2ec7-cbe5-efcb46f6d917">Maintainers</title>
<p id="_3b4f5e47-7c59-1dd8-c312-9895aeb48063">This document is maintained by the Plurimath project at <link target="https://github.com/plurimath/plurimath"/>.</p>
</clause>
</foreword><introduction id="_1d11af4a-64de-184f-d055-7db361179ad9" obligation="informative">
<title id="_2b2e98d1-114a-3da4-8556-01ae0a724280">Introduction</title>
<p id="_381d8786-becb-85b5-d2c0-645c488afbea">The math model of PM 1001 is one tree; the world speaks seven notations. The format interfaces are where the tree meets them: a reader for each input notation — AsciiMath, LaTeX, HTML, MathML, OMML, UnicodeMath and the UnitsML unit-expression content — and a writer for each output surface.</p>

<p id="_1fd3478d-f9a8-f8ac-7025-70f6d47a21b5">A reader is a total function on well-formed input: it accepts text, validates the type and the options, and yields a tree that satisfies the model of PM 1001 — with the input text preserved on the tree for diagnostics. A writer is a deterministic function from tree to bytes, per the stability rules of PM 1001. Between them stand the error contracts: an implementation never leaks an internal exception across a boundary — every failure is one of the typed errors of Annex A, carrying the input and the format that failed.</p>

<p id="_27fcb1da-4608-7088-6354-6ef459e1b843">This document also fixes which directions read back. AsciiMath, MathML, OMML, LaTeX and UnicodeMath read back to the tree they were written from, with the exceptions enumerated in the round-trip clause; HTML does not read back. Where PM 1002 defines uncertainty encodings, this document defines how they read — the marker is authoritative, the visible shape is regenerated.</p>

<example id="_63ff0ba0-48cb-13ed-4661-ec6be053d3ea"><p id="_82970bc5-d27d-5773-6ec1-61e18f9478c1"><tt>Plurimath::Math.parse("x^2", :asciimath)</tt> yields the power tree of PM 1001’s first example, with <tt>input_string</tt> equal to <tt>x^2</tt>. <tt>Plurimath::Math.parse("&lt;math&gt;&lt;msup&gt;...", :mathml)</tt> given malformed MathML raises <tt>ParseError</tt> — or the specialized error the failure maps to — and never a naked parser exception.</p>
</example>

<clause id="_192a61a2-e491-a514-e33e-d77b06f40238" obligation="informative">
<title id="_1189d9f6-ef55-df26-566f-d11f2bafd1a1">How to read this document</title>
<p id="_18da5df2-5967-e1bb-784b-d64fe0b33db3">Clauses 5 to 7 are the interface model and the two contracts; they apply to every format. Clauses 8 to 12 are the formats, each self-contained: its reading rules, its writing rules, its place in the round-trip table. Clause 13 is the image surface, clause 14 the round-trip properties, clause 15 conformance. The annexes carry the error classes, the options and the vectors.</p>

<p id="_db8815fb-35af-6781-cb8f-1154bb696898">A reader implementing one format needs: clause 6 or 7 for the shared contract, their format’s clause, clause 14 for the round-trip claim, and the corpora.</p>
</clause>

<clause id="_b06121f0-d000-2652-e8cf-44a5bd17ba1a" obligation="informative">
<title id="_3249719d-5fd7-5417-ca70-ce84dac5d80c">One system, seven doors</title>
<p id="_4da9bd7a-7cc3-6143-1666-1b5a81311c26">The interfaces exist so that the number of formats never multiplies the number of implementations. Seven notations, two boundaries, one tree: an implementation of this document writes each reader once and each writer once, and every format pair works.</p>
</clause>
</introduction></preface><sections>

<clause id="_ef503049-d184-dc96-ff2b-852d96cefc85" type="scope" obligation="normative">
<title id="_f70b6ff6-6131-0e24-81e1-850dbe94b63d">Scope</title>
<clause id="_6d501b7f-a18c-2def-47e9-a0d645d862a2" obligation="normative">
<title id="_917955c1-7e75-5fad-982e-70ebd4b7acee">General</title>
<p id="_1e70b34d-844d-f9d1-82f6-fd32db37f899">This document specifies the format interfaces of the Plurimath system:</p>

<ul id="_9ef245e0-f5fa-3581-6654-75eb868fc52e"><li><p id="_1cf4bde8-8845-7100-9b85-ac02c8fcebd3">the interface model: readers and writers as typed boundaries over the formula tree;</p>
</li>
<li><p id="_d964c407-e0a5-823b-944d-56e18d6426d3">the reader contract: accepted types, options, error behaviour, and the guarantees every reader makes about the tree it yields;</p>
</li>
<li><p id="_9e13c69d-1ceb-269d-12b0-5cc4edc8e63c">the writer contract: entry points, determinism, and the display-style option;</p>
</li>
<li><p id="_9c27f945-d078-3476-ecef-adc6aeb4afd7">the per-format rules for AsciiMath, MathML, OMML, UnicodeMath, LaTeX and HTML, including how the uncertainty encodings of PM 1002 read;</p>
</li>
<li><p id="_d86c03c2-5b1c-63ab-c72a-b32febc91cc7">image rendering through the optional renderer;</p>
</li>
<li><p id="_03142272-b3ff-f213-a04d-2a609f8c875e">round-trip properties and their exceptions;</p>
</li>
<li><p id="_0592e5a9-68a9-6ce7-db6f-3e90a9879abd">conformance of an implementation.</p>
</li>
</ul>

<p id="_c907d05d-7bf8-baca-f31c-6c5e5386a461">This document does not specify:</p>

<ul id="_5ad4fe97-2681-3aa5-3d8a-b38b42a99e3d"><li><p id="_8634b708-9e63-cb26-e426-c46ccd837f65">the grammar of each input notation in the abstract — the accepted surface is what the readers accept, and the writer surfaces are defined in PM 1001 and PM 1002;</p>
</li>
<li><p id="_3f282aee-7d51-0846-07dd-65d6bc1f5b4d">the math model itself (PM 1001) or the uncertainty fields (PM 1002);</p>
</li>
<li><p id="_56807592-702a-c3ce-7045-1e0716145020">numeric evaluation (PM 1004).</p>
</li>
</ul>
</clause>

<clause id="_dd7136ce-81e5-3230-8136-6177bbeb1cd0" obligation="normative">
<title id="_c2e8613d-9c75-ab29-bedc-57271c2b7976">Relationship to the series</title>
<table id="_74a5220f-0d8e-d304-844f-574f2143a7c9"><colgroup><col width="25%"/><col width="75%"/></colgroup>
<name id="_2d809204-d3ff-342c-900d-3b9ed28aa618">Relationship to the series</name>
<thead><tr id="_9527b38b-f19d-5d6f-e437-122274b292a3"><th id="_16eeed8d-a9d8-685e-0009-7b18bb6b2177" valign="top" align="left">Document</th>
<th id="_288d5435-13f8-37bc-31bb-3b3941bd0b37" valign="top" align="left">Relationship to this one</th>
</tr></thead>
<tbody><tr id="_3ecbd6a5-cee5-5abb-4a2c-3d8aa2d9c51e"><td id="_dc4b6190-7e62-95ed-b1e0-9bee286387c5" valign="top" align="left">1001 Math model</td>
<td id="_f4647c26-98ee-3a4e-9f55-33cb40813276" valign="top" align="left">defines the tree readers yield and the surfaces writers serve</td>
</tr><tr id="_83f2eef1-faa9-8d2e-a265-2cf8e6bdd1de"><td id="_06e5e470-9c31-8467-a9e9-609b5a171127" valign="top" align="left">1002 Uncertainty model</td>
<td id="_809c1790-ea8d-8f3c-5cdb-e2cf832f2111" valign="top" align="left">defines the encodings this document specifies reading for</td>
</tr><tr id="_a7884dc4-e5b2-1514-ac34-3ba865e52be2"><td id="_585c85c6-bc1f-9090-4ad9-1dc8fa9c27b7" valign="top" align="left">1004 Evaluation</td>
<td id="_e3d7911a-160d-0ee2-7b71-4e18fec4aea3" valign="top" align="left">consumes the trees readers yield; not a boundary of this document</td>
</tr></tbody>
</table>
</clause>

<clause id="_821bb053-5dd1-7e28-de35-a2c1e9c3b719" obligation="normative">
<title id="_1d0e1a4c-ffd7-07ab-27d9-1b93b15f0191">Audience</title>
<p id="_eb374e23-a7df-b9a3-8465-e5e8c47ac736">Implementers of Plurimath, authors of independent readers or writers that must interoperate with it, and applications embedding the system.</p>
</clause>

<clause id="_cb119929-9825-5566-3073-15423996cfa0" obligation="normative">
<title id="_39e37a0e-2764-8392-25ad-f66ed241ca9f">The interface inventory</title>
<table id="_21264f84-c277-49ae-bb49-14fb8c817177"><colgroup><col width="25%"/><col width="25%"/><col width="25%"/><col width="25%"/></colgroup>
<name id="_2cbdc374-e4d7-6533-6875-895143174631">The interfaces this document specifies</name>
<thead><tr id="_3d182ff9-a6bc-9c7f-54bf-850f0ecdae45"><th id="_77d4b7af-aca9-76f8-7727-2ba1c7078182" valign="top" align="left">Format</th>
<th id="_cedf2212-29d6-4a43-420a-2ef6c431a87f" valign="top" align="left">Reader</th>
<th id="_09f70b02-9c9b-9f07-491d-fcbd7635c339" valign="top" align="left">Writer</th>
<th id="_f6472d33-19db-aada-56cc-c6667f561436" valign="top" align="left">Round trip</th>
</tr></thead>
<tbody><tr id="_523a721f-6d68-3611-1ff9-67730e0ade20"><td id="_8f032c75-4ebb-4e59-9718-30e406db80e8" valign="top" align="left">asciimath</td>
<td id="_b37773d9-19bd-17e2-528f-010a443b6e82" valign="top" align="left">yes</td>
<td id="_54b79784-8baa-af90-3604-2d9cb8191762" valign="top" align="left">yes</td>
<td id="_ca408bbe-77b5-e169-c3a6-844d7a0b119a" valign="top" align="left">lossless</td>
</tr><tr id="_79e0d558-9ad7-c993-1c93-aa398e995335"><td id="_f68472c3-1f99-3461-be82-4481f7acfbbd" valign="top" align="left">latex</td>
<td id="_ea69ca5f-52cc-3628-8ce4-e0fe0fe29fa2" valign="top" align="left">yes</td>
<td id="_bb59c53f-d619-aa0e-c5a1-53d85f322754" valign="top" align="left">yes</td>
<td id="_9f4690e6-22f7-c2c4-1ca2-3e21a8f37346" valign="top" align="left">lossless</td>
</tr><tr id="_778e9d50-b351-9f5a-ebe0-a9cfe3b5a222"><td id="_4d627a6c-159e-6c10-a100-8dd3ccc02286" valign="top" align="left">html</td>
<td id="_34bb9ca6-293c-1f7d-47d6-b5ba649c7642" valign="top" align="left">yes</td>
<td id="_b00ba821-80f4-cef5-5131-896c0541e4c0" valign="top" align="left">yes</td>
<td id="_54372286-c0c0-fa2c-a636-fdb187f4ec71" valign="top" align="left">display only</td>
</tr><tr id="_c5dc2ece-bfc4-fc1c-7f92-4c42c42bc88d"><td id="_8d64ee10-9021-5dd5-6967-8df9a6bcf672" valign="top" align="left">mathml</td>
<td id="_72f98eaa-585d-9174-97c3-ace0bce088c9" valign="top" align="left">yes</td>
<td id="_86ae34bd-a5ee-9227-5c61-b1dc767f7492" valign="top" align="left">yes</td>
<td id="_be7976f8-a515-9023-0e36-3c534c25e9b6" valign="top" align="left">lossless</td>
</tr><tr id="_c9728aad-20e6-71fd-b22f-45921760e242"><td id="_88515d94-bb5d-7be1-31a3-8d283dc76ede" valign="top" align="left">omml</td>
<td id="_78b2a913-adfb-8ee6-ae85-eaebea6967cc" valign="top" align="left">yes</td>
<td id="_3cda513a-6bd7-95fd-f11e-c3abacba7f59" valign="top" align="left">yes</td>
<td id="_f127f528-0201-5a5e-d976-323e0ecb648a" valign="top" align="left">lossless</td>
</tr><tr id="_cffeff03-71d6-b3cd-aadc-e427920f59f4"><td id="_b1abf198-d461-c3b6-210c-644f3facab93" valign="top" align="left">unicode</td>
<td id="_5ba8277e-ec0a-bea7-ecff-8a1099c295ed" valign="top" align="left">yes</td>
<td id="_9a3fa567-5927-9533-7df7-66ca858114f3" valign="top" align="left">yes</td>
<td id="_60a43940-22f1-52da-9f86-bbbe9dd1b720" valign="top" align="left">lossless</td>
</tr><tr id="_8567eacb-e885-e46f-6553-6dbec3bd5bf9"><td id="_6e56326a-d6ad-6ec9-7d52-16f8a8e2be1c" valign="top" align="left">unitsml</td>
<td id="_393fbbd7-8243-436d-68e7-6263d8553b8b" valign="top" align="left">yes (unit expressions)</td>
<td id="_7d6436a1-0ebf-2063-c06b-17b219e76d4e" valign="top" align="left">—</td>
<td id="_8b6489db-90ed-e62a-de57-e95acc293452" valign="top" align="left">—</td>
</tr><tr id="_99bc3f5a-d609-094c-ae73-12f76777e376"><td id="_1c7446cc-289e-0e12-6321-2f64e1c6e05b" valign="top" align="left">image rendering</td>
<td id="_03373343-a560-c336-f94a-18d651c113d3" valign="top" align="left">—</td>
<td id="_f103344e-089a-a48a-1bba-5ab667e30419" valign="top" align="left">yes (svg, png, pdf, ps)</td>
<td id="_1d20efe6-0223-0901-0f53-eb4134dcae5b" valign="top" align="left">—</td>
</tr></tbody>
</table>

<p id="_78058e32-9606-0730-ae20-970046091b4a">Every interface reads or writes the one tree of PM 1001; none of them defines content of its own.</p>
</clause>
</clause>



<terms id="_e1419f81-9341-b3eb-596a-ccf8f31aae88" obligation="normative">
<title id="_dfb2eab2-f980-6365-3c47-81d0eb272962">Terms and definitions</title><p id="_dcc01114-4d03-3550-1347-4ba901bda94c">For the purposes of this document, the following terms and definitions apply.</p>
<p id="_44019f7c-608e-0020-3363-715be497391e">For the purposes of this document, the following terms and definitions apply.</p>

<term id="_12c23525-5a52-8125-0f14-b892a56e8246" anchor="term-reader"><preferred><expression>
<name>reader</name>
</expression>
</preferred>
<definition id="_f7c143c1-f802-3e04-3f3a-47abfa1a4754"><verbal-definition id="_74ec9f19-4b39-2a90-063e-2748bf94e620"><p id="_9814a0b0-e329-f99a-c972-1c8d1b3bd312">a component that converts text or markup of one accepted type into a formula tree</p></verbal-definition></definition>
 </term>

<term id="_54528fcd-c38f-97f9-28bf-57637f96f7ed" anchor="term-writer"><preferred><expression>
<name>writer</name>
</expression>
</preferred>
<definition id="_1763ce9e-dff2-c8c7-3691-b5e0793274bb"><verbal-definition id="_a3ac15f7-851b-a2c3-781b-77a1cde6bb15"><p id="_9ffed06b-dddf-7782-4962-5420d863aa6d">a component that converts a formula tree into the bytes of one output surface</p></verbal-definition></definition>
 </term>

<term id="_1e4a2f2c-74b8-070e-cc9e-06fb692d68a0" anchor="term-interface"><preferred><expression>
<name>interface</name>
</expression>
</preferred>
<definition id="_82282742-0963-fdf2-fbc2-dd37b33d0e0e"><verbal-definition id="_4a3488b8-3a45-2708-c16c-bae91732f432"><p id="_77fbf2fa-7bfd-dd87-cc9d-4dc0fd7c273f">one format’s reader, writer, or pair</p></verbal-definition></definition>
 </term>

<term id="_d161be4a-fc2c-cfcf-ca7b-e3de2dda3d22" anchor="term-accepted-type"><preferred><expression>
<name>accepted type</name>
</expression>
</preferred>
<definition id="_42c482be-bb92-b5bb-fcee-6d2928944206"><verbal-definition id="_6b50b47a-cb4f-1d59-00ca-7b0fbd8789bb"><p id="_f5dd1bcd-6ecf-dd9c-e15c-d22598c6341e">one of the type keys the parse entry point validates: <tt>asciimath</tt>, <tt>html</tt>, <tt>latex</tt>, <tt>mathml</tt>, <tt>omml</tt>, <tt>unicode</tt>, <tt>unitsml</tt></p></verbal-definition></definition>
 </term>

<term id="_7f12f522-d880-2436-06f0-4bbfb3d334f1" anchor="term-input-string"><preferred><expression>
<name>input string</name>
</expression>
</preferred>
<definition id="_5e5a9529-e3c3-0b7d-8811-9929708c4ce4"><verbal-definition id="_5825e06a-174e-8b9e-9a00-12dbdcd5b229"><p id="_46029944-68ff-3853-d149-d92f869111c6">the original text a reader received, preserved on the yielded tree for diagnostics</p></verbal-definition></definition>
 </term>

<term id="_4693cad6-9f17-0ca5-9bc6-951a6bb82d17" anchor="term-typed-error"><preferred><expression>
<name>typed error</name>
</expression>
</preferred>
<definition id="_8afd0c8f-4c4d-f483-af2d-064b199fa49f"><verbal-definition id="_8b59d00f-5b64-2db6-9c27-cf885bf4305d"><p id="_42b96d91-bf2b-f6f0-dcd7-5b289157bef2">one of the error classes of Annex A; the only failures that cross an interface boundary</p></verbal-definition></definition>
 </term>

<term id="_18b4ee49-d379-1234-5d53-d71ff13707de" anchor="term-locale"><preferred><expression>
<name>locale</name>
</expression>
</preferred>
<definition id="_b697db8b-f8e6-8891-03b8-216d0e21e138"><verbal-definition id="_bf94c399-bc78-94f1-3077-88cd231216c5"><p id="_4d2789dd-031f-2e09-6eac-ae89cbd005f8">the parse option selecting language-specific symbol readings for the localized types</p></verbal-definition></definition>
 </term>

<term id="_3009bc43-124d-8460-75d5-b3baf44b2b3d" anchor="term-lossless-direction"><preferred><expression>
<name>lossless direction</name>
</expression>
</preferred>
<definition id="_5937e0d0-904b-5386-f1a9-95050bc5ef54"><verbal-definition id="_5ff53cd8-4c46-fc12-f65d-7789e7cecafc"><p id="_827f793c-0e75-9891-2484-61effbcfb992">a reader-writer pair whose composition returns a tree equal to the one rendered</p></verbal-definition></definition>
 </term>

<term id="_ad3af9a1-d351-b6ca-26f0-9974495592ad" anchor="term-round-trip"><preferred><expression>
<name>round trip</name>
</expression>
</preferred>
<definition id="_f67c1013-2092-bf72-5c58-2a13c7683d67"><verbal-definition id="_fb06fdf7-2312-99de-b88c-6aee67a59f6f"><p id="_41a518e4-edbe-309c-9ffc-c893ddc4ae4c">render a tree with a writer and read the result back with the same format’s reader</p></verbal-definition></definition>
 </term>

<term id="_0c7c19b1-fcf7-8fa9-09d4-c31c2909fb65" anchor="term-intent-authority"><preferred><expression>
<name>intent authority</name>
</expression>
</preferred>
<definition id="_a98d4765-d7c7-91b6-9544-c3c73e804270"><verbal-definition id="_1163b36c-8a39-11a9-27c0-6e46d99538d3"><p id="_00729d35-5cc5-3d6d-229b-47ef5911cb8e">the rule that a marker (intent attribute, marker run, intent wrapper) determines the fields, and the visible shape is regenerated from them</p></verbal-definition></definition>
 </term>

<term id="_c5db529b-18a4-5589-16d8-26a3fa70ed6f" anchor="term-approximate-rendering"><preferred><expression>
<name>approximate rendering</name>
</expression>
</preferred>
<definition id="_2c3a00e7-5cd9-6ff5-4ac3-6ad7ecd2452e"><verbal-definition id="_44a7dc42-d58f-5b04-917f-d16d460b9bbc"><p id="_31441ea3-ee9c-ceef-358f-5706cacc9853">a registry entry’s LaTeX rendering that does not carry the construct exactly; recorded with the entry, equal in both directions</p></verbal-definition></definition>
 </term>

<term id="_c56a34cd-c2ff-937c-74f9-fa1c6f072ba5" anchor="term-reading-corpus"><preferred><expression>
<name>reading corpus</name>
</expression>
</preferred>
<definition id="_88b16d92-c8b1-d2fc-0a90-dd8bc5a16215"><verbal-definition id="_a88fee31-ec33-caab-1ba5-00941c5408e0"><p id="_70d13d86-5ae9-d167-cd97-324c564c5cb7">the frozen inputs and their trees, replayed to discharge reading claims</p></verbal-definition></definition>
 </term>

<term id="_7f73a53b-7eff-b04b-b77f-75fc87dba913" anchor="term-boundary"><preferred><expression>
<name>boundary</name>
</expression>
</preferred>
<definition id="_d2fabafb-cca8-3aa0-5825-32ddb1bf9119"><verbal-definition id="_e4ad73f6-a319-4139-39d5-e8c5eb6ee953"><p id="_c76b4cbe-4750-304a-a846-2801c0db33e9">the seam between the system and a caller, of which this document defines two: the reader’s and the writer’s</p></verbal-definition></definition>
 </term>

<term id="_a3dfca56-42f6-6aed-18f8-154ff9b8eab9" anchor="term-channel"><preferred><expression>
<name>channel</name>
</expression>
</preferred>
<definition id="_83c49d26-3b70-a313-b260-908f0e638533"><verbal-definition id="_0d14895c-48ba-a097-d664-fb6ad0316458"><p id="_7e996493-499a-8e3a-4978-4f1fd821050c">the quoted UnitsML string of the AsciiMath interface; the reserved form carrying unit expressions</p></verbal-definition></definition>
 </term>

<term id="_03087414-f282-c89e-5418-6caadf0e44f7" anchor="term-marker-run"><preferred><expression>
<name>marker run</name>
</expression>
</preferred>
<definition id="_e7cbb2a6-ea95-b966-6eb8-32ed2435dca5"><verbal-definition id="_fcec7569-b0ff-421f-2d10-05d53abec206"><p id="_3a27eb0e-5ec9-7f76-a2a6-a99cde7224ab">the OMML run carrying an uncertainty marker ahead of its construct</p></verbal-definition></definition>
 </term>

<term id="_f9067edc-6f12-000f-4fe7-ba4e9f8800ad" anchor="term-wrapper"><preferred><expression>
<name>wrapper</name>
</expression>
</preferred>
<definition id="_1981927f-2655-ce3c-2e60-0ac19286c895"><verbal-definition id="_0e77db2c-63f0-9e08-764f-0305af970cb5"><p id="_69357a49-44d5-d18b-d185-8a607304db62">the UnicodeMath <tt>ⓘ("marker" visible)</tt> construct carrying machine-readable intent</p></verbal-definition></definition>
 </term>

<term id="_fb9e1835-536f-aba5-56f8-919190f1df8f" anchor="term-display-form"><preferred><expression>
<name>display form</name>
</expression>
</preferred>
<definition id="_fab6fa57-ccd5-9f24-3910-d11b3e19f766"><verbal-definition id="_584f9863-525e-4164-2f83-1a159913544b"><p id="_08ba2a95-c503-2007-0eb7-373299e22b48">the presentation variant of a surface selected by display style</p></verbal-definition></definition>
 </term>

<term id="_3765875e-f135-f7c2-39cb-a97b224398e4" anchor="term-corpus-generation"><preferred><expression>
<name>corpus generation</name>
</expression>
</preferred>
<definition id="_a0ffea59-8662-905f-f0e7-4ece8e9634ec"><verbal-definition id="_0ee32afb-12d6-5cc0-55ed-ad7fe3d546c1"><p id="_d849914a-fcce-970c-a0c5-516f8fcdfcf2">a published, immutable version set of the corpora; claims name the generation they were checked against</p></verbal-definition></definition>
 </term>
</terms>

<clause id="_f1804e8d-2859-6838-cd53-7b348c3a6628" obligation="normative">
<title id="_577f0878-cbad-249b-c576-b43a5f664bb6">Conventions</title>
<clause id="_603f5a00-e51d-6f10-e5a6-da1359a5e73b" obligation="normative">
<title id="_53d82e48-1024-e16a-9901-40ceda1ab9b0">General</title>
<p id="_b4506936-511c-6da1-024f-be55880e994f">Interface signatures are written as <tt>parse(text, type, **options)</tt> and <tt>to_&lt;format&gt;(options)</tt> following the implementation’s shape; this document specifies behaviour, not a language binding. Format names follow PM 1001.</p>
</clause>

<clause id="_2d99cd8c-8dff-fe59-9d35-65f20a20a3a3" obligation="normative">
<title id="_e9f19607-0eba-c5f0-206e-d25ce63aee52">Examples</title>
<p id="_2f2c1283-aeef-980d-b229-987db70f9172">Examples carry an <strong>Expected outcome</strong> paragraph stating observable behaviour. Where an example shows reading, the outcome states the resulting tree; where it shows failure, the typed error and its message shape.</p>
</clause>

<clause id="_bcd20364-d6a9-8fba-1a4c-8f9c4fee56bd" obligation="normative">
<title id="_72afb57c-4ea2-dba0-975e-28138dbf2805">Normative encodings</title>
<p id="_5bbd7cfe-471b-b369-73ef-f2257c6313b9">The encodings read and written here are the ones defined in PM 1001 (surfaces) and PM 1002 (uncertainty); this document adds the reading rules, not new encodings.</p>
</clause>

<clause id="_c6e13584-36bd-9499-c372-f14286825a25" obligation="normative">
<title id="_b38ff429-8e6b-f8a4-45e3-ed717baed1ed">Corpus entries</title>
<p id="_a30e8518-c765-befc-38cb-97f8ed2ac3e8">Where an example says “the corpus freezes” an outcome, the frozen vector is the example with its provenance; the corpora are external, versioned artifacts, and this document’s examples are their illustrations.</p>
</clause>
</clause>

<clause id="_d6a3e901-3351-8438-0e49-d371f485b09f" obligation="normative">
<title id="_6846c6d5-57aa-ce6f-d4fe-8a96369bac8c">The interface model</title>
<clause id="_758a7749-f64b-2b0d-5fc5-6e31949b1d3d" obligation="normative">
<title id="_0175f76d-716b-304d-d5e0-55b2c2c71130">General</title>
<p id="_7993e6ba-2827-ae7e-b86c-190964c13f9c">Every exchange with the outside world passes one of two boundaries:</p>

<sourcecode id="_27b58034-f57e-b74d-7925-befc69b2ecaf" lang="lml"><body>lml "1.0"

models FormatInterfaces {

  class Reader {
    attribute accepted_type, TypeKey[1]
    attribute input, String[1]
    attribute options, ParseOptions
  }

  class Writer {
    attribute surface, SurfaceKey[1]
    attribute tree, Formula[1]
    attribute options, WriteOptions
  }

  enum TypeKey {
    value asciimath
    value html
    value latex
    value mathml
    value omml
    value unicode
    value unitsml
  }

  enum SurfaceKey {
    value asciimath
    value html
    value latex
    value mathml
    value omml
    value unicodemath
  }

  class ParseOptions {
    attribute locale, String
  }

  class WriteOptions {
    attribute display_style, Boolean
  }
}</body></sourcecode>


<p id="_08dff394-c08b-2db6-d7e5-0f4204b0e116">A reader receives text of one accepted type and yields a formula tree. A writer receives a tree and emits one surface’s bytes. Neither boundary exposes anything else: no parser objects, no intermediate representations, no partial trees.</p>
</clause>

<clause id="_6858aa4d-38b5-b573-c2fc-e6c03aaed8fb" obligation="normative">
<title id="_940be365-8b91-cb5d-74ee-056e58df88b2">The boundaries are typed</title>
<p id="_cb9cbbfa-ecc7-3cf2-c8d8-78ddf2574436">Every failure crossing a boundary is a typed error (Annex A). A reader that cannot complete raises a <tt>ParseError</tt> or one of its specialized subclasses; a writer does not fail on a well-formed tree — render totality is a model guarantee of PM 1001 — and the renderer’s failures are the rendering errors of clause 13.</p>
</clause>

<clause id="_4d4e15b6-c237-e216-8c99-7db7d377a85f" obligation="normative">
<title id="_e4f50c7e-04d7-1575-7bd2-51f2470f86aa">Composition</title>
<p id="_1740114d-cb3c-3fbf-21b6-474c9bb6a911">The interfaces compose without glue: the tree a reader yields satisfies every writer. An application may read AsciiMath, inspect the tree, evaluate it (document 1004), and write OMML in one pipeline; no format-specific steps exist between the boundaries.</p>

<example id="_53befb06-02ba-c667-535a-f9d52edb6a4b"><p id="_4f14f8e0-dae7-1d6c-24a3-99a1f691fa02">A pipeline that reads LaTeX, writes MathML, reads the MathML back, and writes AsciiMath. <strong>Expected outcome.</strong> each boundary yields or consumes a tree per this document; the final AsciiMath is a function of the original tree alone, and the intermediate MathML round-trips per clause 14.</p>
</example>
</clause>

<clause id="_6f00dead-ec93-8205-e3c5-8b42830c67bb" obligation="normative">
<title id="_11d5f4f5-f700-1490-1309-20f1207e5545">Boundary invariants</title>
<p id="_9961ecf6-0a7f-0d77-12b3-06ccbee55fbb">Four invariants hold at both boundaries, and the clauses that follow make each precise:</p>

<ul id="_629172d0-76ac-dcce-ab14-4416cbf90403"><li><p id="_a50ee2e3-05c0-67a3-f962-149dc5c847df"><strong>Typed failures.</strong> only Annex A’s errors cross; internals stay inside.</p>
</li>
<li><p id="_7dc9dd40-8b18-6a0d-6601-f33afbb2e225"><strong>Tree guarantees.</strong> readers yield PM 1001 trees; writers consume them without inspection of provenance.</p>
</li>
<li><p id="_46974fe3-0310-856b-14cb-b82eef24ef79"><strong>No hidden state.</strong> a boundary call depends on its arguments and the configuration only — no reader remembers the previous call, no writer caches by identity.</p>
</li>
<li><p id="_627d96dc-3719-a615-fb8c-566b1ae804ce"><strong>Composition.</strong> any reader’s output feeds any writer; nothing between the boundaries knows formats exist.</p>
</li>
</ul>
</clause>

<clause id="_fcaa0075-b2de-dffe-2748-a49cb3eea63c" obligation="normative">
<title id="_0806d9b6-3b85-4ca4-faeb-3453a684de4f">Where the units reader sits</title>
<p id="_19ed0b1e-bfdf-b4f1-a8f9-d9377ad7435d">The <tt>unitsml</tt> type is a reader without a writer: it reads one unit expression (CalConnect 36817) into the unit embedding the tree carries. It exists so applications can validate and embed units independently of a surrounding formula, and its failure mode is the parse error naming the unit expression.</p>
</clause>

<clause id="_9190677b-7c88-4a36-0371-c495379c1b1c" obligation="normative">
<title id="_207087f9-a712-7ba3-6961-d0b5e24bacd8">The contracts as obligations</title>
<p id="_461df057-6fbc-3a77-7570-65b495c41056">The two boundaries carry symmetrical obligations, which the rest of this document discharges:</p>

<table id="_60a3fbc4-771d-0aaa-cfa1-c6e6da4403fc"><colgroup><col width="33.3333%"/><col width="66.6667%"/></colgroup>
<name id="_15d9e2ef-ca9b-c536-ca0f-c802af4e03c6">Reader obligations</name>
<thead><tr id="_cfd99076-e092-79cc-18bc-2cd9699dbc8e"><th id="_91e43390-f4d8-09c4-7e5d-a815e606569b" valign="top" align="left">Obligation</th>
<th id="_41cb796a-86e9-1b10-7b8d-78896c0699d4" valign="top" align="left">Clause</th>
</tr></thead>
<tbody><tr id="_422d6a91-e48e-c7cb-4855-3b109564b671"><td id="_da781c2b-3ca2-4b00-bdcc-596bb8d58e1f" valign="top" align="left">validate type and options before work</td>
<td id="_a2552704-2ebf-9ef3-e635-b5fe0eb53673" valign="top" align="left">6</td>
</tr><tr id="_2e7564a3-c76c-fe44-7d71-745816142db3"><td id="_3fee809c-de9b-ed47-c3aa-b3212f0a07ee" valign="top" align="left">yield model-conformant trees</td>
<td id="_438d51d7-d012-fac1-20a1-15dd5e12b053" valign="top" align="left">6</td>
</tr><tr id="_c45bc0b7-b5a8-1d47-3a9b-f3d14a23570b"><td id="_8d75fe3b-66fa-ece2-81b8-00848e9d452f" valign="top" align="left">preserve the input string</td>
<td id="_7305a85b-bc6e-a33a-bf55-b65f27530cd4" valign="top" align="left">6</td>
</tr><tr id="_8994351f-8bc7-80c7-090f-e84add9fa368"><td id="_a5f27b1c-b566-12ab-9ee9-32e2ee65043e" valign="top" align="left">raise only typed errors</td>
<td id="_fa1ff919-412e-3a4f-2677-c065072ce46f" valign="top" align="left">6, Annex A</td>
</tr><tr id="_cb31c992-1c93-95f5-b965-6234c808e9db"><td id="_76847a26-5b74-15bf-7812-9874f2f4b068" valign="top" align="left">read the encodings of PM 1002 by their authority rules</td>
<td id="_6b00c690-48a2-dcf7-edee-d5e5c3181061" valign="top" align="left">8 to 11</td>
</tr></tbody>
</table>

<table id="_da833e67-8f99-b56a-bb71-715a23c7d43d"><colgroup><col width="33.3333%"/><col width="66.6667%"/></colgroup>
<name id="_a3cd4b69-3d39-efa2-d490-1a327c66c0fb">Writer obligations</name>
<thead><tr id="_d32abdd0-bd32-6ac1-b260-ecbc6ac0532c"><th id="_126293ce-cccc-eec6-a940-4fedb1236a7d" valign="top" align="left">Obligation</th>
<th id="_23cae919-dcc8-94e2-58a7-211083233e99" valign="top" align="left">Clause</th>
</tr></thead>
<tbody><tr id="_92084361-8fd1-ef3f-b53c-af29ade7eeb4"><td id="_215551cf-0e44-ab11-ad9d-40b70322c839" valign="top" align="left">emit model-defined encodings only</td>
<td id="_f2672229-8273-a8cc-c63c-b83a6e7a14e1" valign="top" align="left">7</td>
</tr><tr id="_dbd42f2b-14b7-565c-eafa-6e4ccda53583"><td id="_e910a76e-282d-db9a-556e-3c93e0934812" valign="top" align="left">deterministic bytes per model version</td>
<td id="_a5caf387-c1d8-1822-d6cf-6edadda92a52" valign="top" align="left">7, PM 1001</td>
</tr><tr id="_d3c83b0c-248b-fe28-68cf-425240bf6001"><td id="_aea115b6-14be-c9a5-e3c7-b8fcb6f54a55" valign="top" align="left">totality on well-formed trees</td>
<td id="_fcb8ab64-75a2-57dd-9e80-88ed53283f0e" valign="top" align="left">7, PM 1001</td>
</tr><tr id="_2e762b4a-02ce-7c3a-69f3-660b134b600a"><td id="_629b737d-054f-05ac-52ef-63ceab05d01b" valign="top" align="left">no provenance inspection</td>
<td id="_08657df4-130d-22bb-095e-c9259f434b28" valign="top" align="left">7</td>
</tr></tbody>
</table>

<p id="_f9a3eb3b-9bf8-a74c-0647-b66c303ce6f4">An implementation audit walks these two tables; the conformance classes of clause 15 are their operational form.</p>
</clause>
</clause>

<clause id="_51e92a77-3c81-536d-3c68-b9e107d632b2" obligation="normative">
<title id="_18a2f57a-6f8a-76a0-0a9e-5cc97dc72fa7">The reader contract</title>
<clause id="_62f176b6-282c-ec33-f26a-4e5aef869d2a" obligation="normative">
<title id="_2b22b111-6e32-3392-4bb6-a58a5eaf4433">The parse entry point</title>
<p id="_d7579d10-39ec-93c8-37d5-f1737b229953">Reading goes through one entry point, <tt>parse(text, type, **options)</tt>:</p>

<ol id="_ddf05e2d-1614-44bc-5197-ebdf30a45c26" type="arabic"><li><p id="_c09e3354-ab92-3ac5-55e0-d45f93c05b80">The type is validated: an unknown type raises <tt>InvalidTypeError</tt>, before the text is examined.</p>
</li>
<li><p id="_01859cf9-056b-ea92-359d-56c398a7c666">The options are validated: only the supported options (<tt>locale</tt>) are accepted, and an unknown option raises <tt>ParseOptionError</tt>; a <tt>locale</tt> passed for a type that does not localize raises the same error naming the type.</p>
</li>
<li><p id="_765a7b07-eddb-7694-8d99-cbfa231e15a2">The text is parsed by the type’s reader; success yields a formula tree whose <tt>input_string</tt> is the original text.</p>
</li>
<li><p id="_e6104b3c-e290-256e-901b-8debcc7c289c">Failure raises the specialized error the failure maps to, or <tt>ParseError</tt> carrying the text and the type.</p>
</li>
</ol>

<p id="_2b658cf7-11a8-7534-65b8-4ac141faba91">The entry point never raises any other error. An internal exception escaping a reader is a defect of the reader; the boundary converts everything it can into the typed errors and preserves the specialized ones unchanged.</p>
</clause>

<clause id="_70a4d263-37b4-a388-772e-d811ae0a10c1" obligation="normative">
<title id="_70f61842-86ac-2eb8-8284-ba006fca2a50">Accepted types</title>
<table id="_37df0f2c-8439-230d-caa7-478d629b5cc9"><colgroup><col width="22.2222%"/><col width="44.4444%"/><col width="33.3334%"/></colgroup>
<name id="_fcafba22-c376-4e54-c889-c9dc1ec46c3c">Accepted types and their inputs</name>
<thead><tr id="_583b37a5-01d0-a42d-3d44-c0a0aa0d9f3b"><th id="_41cc1c2f-0a53-2e3f-12e4-9303af23459e" valign="top" align="left">Type</th>
<th id="_60ce297d-93a3-a2bf-2579-6ec7280f4332" valign="top" align="left">Input</th>
<th id="_3a1d445d-fa1e-1772-f74c-78ab2307cd28" valign="top" align="left">Localized</th>
</tr></thead>
<tbody><tr id="_2a829995-422b-45a5-c0ba-4c90b6d0889a"><td id="_11a3c7f3-5d51-0897-ebf0-7e206ac5d236" valign="top" align="left">asciimath</td>
<td id="_d23875bb-183a-258e-0c7a-ed6107f26771" valign="top" align="left">AsciiMath linear text</td>
<td id="_f932fcf3-1a4c-bf90-7bac-02faa925d8af" valign="top" align="left">yes</td>
</tr><tr id="_324c204f-3673-2778-bdb0-ca781353e77a"><td id="_484f7fe1-3f49-e2f9-3d68-5ea4b35ce99d" valign="top" align="left">latex</td>
<td id="_504d415e-a9da-cfde-e688-6442bc815721" valign="top" align="left">LaTeX fragment</td>
<td id="_e1406ecd-f886-e7ac-40a6-28717cc96a90" valign="top" align="left">yes</td>
</tr><tr id="_9517c2dd-386e-4a8e-1ee4-50f93d733713"><td id="_09dfdaad-40b1-372c-9b04-43daca9ec3bf" valign="top" align="left">html</td>
<td id="_9705c2e5-d7d6-45b6-e449-2ea88d98dce3" valign="top" align="left">HTML fragment</td>
<td id="_de1f18e3-d3c9-3869-c616-7dd82d2eb091" valign="top" align="left">yes</td>
</tr><tr id="_e28547f8-135d-cfb0-2de7-287b73c598d1"><td id="_2137baf2-ef0e-a5ea-3a66-09bae8533795" valign="top" align="left">mathml</td>
<td id="_9db3cf2c-5b47-18fe-0f65-b57f0c7488de" valign="top" align="left">MathML 4 document or fragment</td>
<td id="_dcbb4ac4-757e-0e03-c4c6-33cbd515f520" valign="top" align="left">no</td>
</tr><tr id="_26938b38-e367-3039-e00a-2e10c08aca24"><td id="_03aa565d-c258-7688-be7e-fc8c8d200f02" valign="top" align="left">omml</td>
<td id="_68d3ef1f-dd3b-a659-002b-94c51c934766" valign="top" align="left">OMML (DrawingML mathematics)</td>
<td id="_e98649a4-85ce-b141-fde4-91b073478ee5" valign="top" align="left">no</td>
</tr><tr id="_ae709e2e-5cfe-bce3-0fcc-c09f3aa6d3d3"><td id="_6a0de96b-2ec0-ea62-ff2a-f3f19155fa29" valign="top" align="left">unicode</td>
<td id="_607e33f9-5acf-b6fe-8a2c-320c722a41cc" valign="top" align="left">UnicodeMath linear text</td>
<td id="_6d28181d-885b-2635-6cdc-151b71a17642" valign="top" align="left">yes</td>
</tr><tr id="_8cd19538-02cf-92d1-3d3f-8dd9a245c8cd"><td id="_6508b9ad-3c25-376d-5be3-d5853109fa35" valign="top" align="left">unitsml</td>
<td id="_a10b907e-df5a-b70e-4e36-3fc1580306f6" valign="top" align="left">a UnitsML unit expression</td>
<td id="_0a4a4c93-8d60-b058-faaa-954a15b4a8ea" valign="top" align="left">no</td>
</tr></tbody>
</table>

<p id="_23aeaa0d-19ee-4c58-2d2c-4208f00406ef">The localized types accept the <tt>locale</tt> option, which selects the language-specific readings of symbols and function names (for instance, localized function names in LaTeX and HTML inputs). The markup types do not localize: a MathML document says what it says.</p>
</clause>

<clause id="_f1b9505b-d7f9-213d-a551-ca28921b758c" obligation="normative">
<title id="_d203ba68-dc99-5549-febf-a5a977f81808">The tree guarantee</title>
<p id="_48a87a2d-18a2-05f6-b8ac-a8967f8972af">A reader yields a tree that satisfies PM 1001: node classes from the model, operands in the class-defined order, no formatting in descendant nodes, and — for inputs carrying uncertainty encodings — uncertainty nodes per PM 1002. A reader never yields a tree it cannot itself render.</p>
</clause>

<clause id="_a5b662e7-54be-0da0-c938-82496517445d" obligation="normative">
<title id="_8725efe1-9d40-f8db-d5e5-3af13c67e652">The input string</title>
<p id="_90c23746-f6be-ad69-e16e-ffc7b7f5397f">The yielded tree records the input text verbatim. Diagnostics, error messages and the math zone printers may show it; the tree’s identity does not depend on it: two trees read from equal inputs carry the same <tt>input_string</tt> and are equal; two equal trees from different inputs differ only in that field.</p>

<example id="_e6787ca8-eb61-a0e0-398a-be2b1985e869"><p id="_af60a6f4-d223-8b2f-3184-1965c4971a23">Reading <tt>"10.3(2)"</tt> in AsciiMath. <strong>Expected outcome.</strong> the tree carries an uncertainty node per PM 1002 (value <tt>10.3</tt>, magnitude <tt>0.2</tt>, notation concise), and <tt>input_string</tt> is <tt>"10.3(2)"</tt>.</p>
</example>
</clause>

<clause id="_ea9d1f58-d078-d0e3-857e-9935d0b75cc8" obligation="normative">
<title id="_698a31fc-598d-bdb2-2e8f-1afb24b59edb">Failure</title>
<p id="_90dca38c-1e50-8e6b-5bca-4efaaba5c93f">A reader’s refusals are part of its contract. The general <tt>ParseError</tt> names the input and the type; the specialized errors name their cause: an ambiguous decimal in uncertainty reading raises <tt>AmbiguousDecimalError</tt>, a missing parsing dependency raises <tt>MissingDependencyError</tt>. The message shapes of Annex A are stable within an edition.</p>
</clause>

<clause id="_746f929a-dfb1-e542-f5be-bdee63bb7e82" obligation="normative">
<title id="_47c46dc5-29a7-62aa-f6f1-ef5cd1d1d7a9">Validation order</title>
<p id="_c7017c47-a009-422e-dde4-d60c5b31a99e">The entry point validates in a fixed order, so callers can predict which error they see first:</p>

<ol id="_11366c18-88f7-cedd-971f-effb03fb2cde" type="arabic"><li><p id="_9a3a13e0-6fdb-c515-e089-374f1f5a5c6c">the type — <tt>InvalidTypeError</tt> before anything else;</p>
</li>
<li><p id="_29a95363-6fa1-5199-a825-5fda48b00f14">the options — <tt>ParseOptionError</tt> next;</p>
</li>
<li><p id="_65d4a94c-76ac-d3f4-ac0a-3e6547321376">the input — parse errors last.</p>
</li>
</ol>

<p id="_3025eb02-610b-c575-453e-7e280e7be702">A call with both an unknown type and an unknown option reports the type. A call with a bad option and a malformed input reports the option. No reader runs before the boundary checks pass.</p>
</clause>

<clause id="_50db36a0-5da2-656f-b105-23f01bc84d80" obligation="normative">
<title id="_7c35ba47-f5bd-15c5-285b-03e96dcc508a">What each reader guarantees</title>
<p id="_b7cdcd65-d761-35b9-4857-c432fa5d3baa">Every reader, for every input it accepts, yields a tree with these properties:</p>

<ul id="_3fb4b2bf-25ca-785a-0944-8e8fe8f7410a"><li><p id="_2b18844f-0727-4f8a-5953-f90854629315">the node classes and operand orders of PM 1001;</p>
</li>
<li><p id="_4e69d8f4-dd41-e06f-49a5-5fd4ad216d5b">numbers as exact decimals of the grammar PM 1002 states, wherever the tree carries numbers;</p>
</li>
<li><p id="_4d12987d-9ae6-1839-7921-00ecef8125eb">uncertainty nodes constructed through the validation of PM 1002 — a reader never assembles a malformed uncertainty;</p>
</li>
<li><p id="_4f65477e-c1ef-4abe-8b4e-4c87bb588cae">units as UnitsML embeddings read from the content language;</p>
</li>
<li><p id="_19836187-cce4-e38e-85f3-8510c1953a6f">no reference to the reader, the type or the options inside the tree.</p>
</li>
</ul>

<p id="_0ac8f1b1-bfe5-3cee-2ea5-11e2d6a10859">The last property keeps trees portable: a tree does not remember which reader made it, and PM 1001’s syntax-independence invariant holds at the boundary.</p>
</clause>

<clause id="_d351e5c0-1cdb-1295-2880-00f7d0b51a44" obligation="normative">
<title id="_9d94d25f-8ef0-6cad-28f5-4b43342b923c">Reading is not interpretation</title>
<p id="_c4bb456c-9b5c-7a1a-c911-21639af75eb7">Readers translate structure; they do not evaluate, simplify, reorder or repair. An input that says <tt>2 + 2</tt> yields a tree that says <tt>2 + 2</tt>; whether that is 4 is evaluation’s business (document 1004). An input with a suspicious construct — a division by a zero-valued expression, an inverted interval — reads as written; the evaluators and the checkers flag, the readers transcribe.</p>
</clause>

<clause id="_fe81cc0f-5c80-2985-15e5-48223a4cc7e9" obligation="normative">
<title id="_93556b5a-4b2f-1fe0-93f0-baa10f3446ac">Reading uncertainty: the summary</title>
<p id="_3424aea8-838b-0cec-1172-79e97dd71b23">The reading rules per format, in one place (the full rules are PM 1002’s encodings plus the clauses above):</p>

<table id="_1e2d1697-0444-e2f5-1798-4aacf24f7365"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_20a87fac-3671-b098-61d3-5de1e09eb0a9">Reading uncertainty by format</name>
<thead><tr id="_5291e1e8-360b-3f63-1b33-c6418a448e65"><th id="_11013123-26c5-a559-b12b-a8b3ecd77515" valign="top" align="left">Format</th>
<th id="_21e22dec-1eb9-ae1a-ce36-efcbbf745596" valign="top" align="left">Authoritative channel</th>
<th id="_66cac2bf-d680-dbbd-6efa-e6f420d658f1" valign="top" align="left">Visible shape</th>
</tr></thead>
<tbody><tr id="_b457fcea-175c-a62d-db93-d1d519330cb2"><td id="_12afad0f-5e79-c910-26bf-e8b79b466d08" valign="top" align="left">asciimath</td>
<td id="_d62698b4-c5c2-814c-2911-f6452a3a6abb" valign="top" align="left">the call form / reporting form</td>
<td id="_f3fd1d7e-8f9c-2c3f-d36c-7a59688e9821" valign="top" align="left">is the form</td>
</tr><tr id="_763ea7cc-134a-0d3f-6665-b7a53668ed34"><td id="_0a058fca-489d-3e99-775b-491fea401987" valign="top" align="left">mathml</td>
<td id="_2a9da5ef-924a-a7be-9df7-9d91682103ec" valign="top" align="left">the <tt>intent</tt> marker</td>
<td id="_87810d9e-c4bd-d088-52db-4ef7d94e201c" valign="top" align="left">regenerated</td>
</tr><tr id="_07e5d43e-3c25-1620-f85c-53a95c68500e"><td id="_34dd1529-904a-e10c-dd4e-3ae447c18d7a" valign="top" align="left">omml</td>
<td id="_9b070c50-7f05-1b79-3ff5-c7a2e1d3ac8b" valign="top" align="left">the marker run</td>
<td id="_03ca9db0-b64c-4102-0646-1834bb311ffe" valign="top" align="left">regenerated</td>
</tr><tr id="_a3b68c8d-2e7a-80a7-a416-4b924e84f4dd"><td id="_44579c10-a859-e99b-aafd-6d9e0c29121d" valign="top" align="left">unicode</td>
<td id="_9d4df5e6-9086-6789-36e9-2817e8911522" valign="top" align="left">the <tt>ⓘ</tt> marker</td>
<td id="_f67b6f01-1e9a-0b61-f7d2-c1bf4db586aa" valign="top" align="left">regenerated</td>
</tr><tr id="_3decaf3c-5c04-f770-fecc-8573152e706c"><td id="_dbd02913-4a56-5a1d-644f-b86ce8e9f1a0" valign="top" align="left">latex</td>
<td id="_30fe7011-dccd-9edd-ec68-8788bb339cc2" valign="top" align="left">not read</td>
<td id="_15c03937-e36e-adab-239e-fbf8624d04ca" valign="top" align="left">not read</td>
</tr><tr id="_cc7a8876-f234-c615-805b-10105eb56feb"><td id="_2069a465-b793-0e10-3649-bbf33ed7921a" valign="top" align="left">html</td>
<td id="_433e8c9d-b219-3b62-9908-3206c71db2a6" valign="top" align="left">not read</td>
<td id="_8aba4efb-13d5-976e-b850-7c14f88889b2" valign="top" align="left">not read</td>
</tr></tbody>
</table>

<p id="_e9c2fed9-407d-f8f5-70f5-efcc2285a8c8">A marker and its shape disagreeing is a producer defect; the reader takes the marker, and the next write emits a consistent pair. The corpora include a stale-shape vector per markup format so the authority is tested, not stated.</p>
</clause>
</clause>

<clause id="_8f1f4bab-4f32-60f4-f9a2-b8d55e4b439e" obligation="normative">
<title id="_7d1e2f5d-ff47-22e9-7285-90fd9af269a5">The writer contract</title>
<clause id="_20c5e3c1-48cf-56ac-1bcd-6a41fbecec78" obligation="normative">
<title id="_b15ca0c3-0f2f-bfc7-5ea8-70601c2a2787">Entry points</title>
<p id="_602ac61b-1613-475e-ae42-05db8ed806dd">A tree writes to each surface through one entry point: <tt>to_asciimath</tt>, <tt>to_mathml</tt>, <tt>to_omml</tt>, <tt>to_latex</tt>, <tt>to_unicodemath</tt>, <tt>to_html</tt>. The surfaces, their outer elements and their stability rules are PM 1001’s; this document adds the interface obligations.</p>

<table id="_c5bf0bd8-56e6-ff99-1e0a-2c8ddb9f0f10"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_a48d07ce-72ef-f187-1a1d-78fbca582fd3">Writers and obligations</name>
<thead><tr id="_ba13ff0e-1250-6d31-bc07-899512a34eea"><th id="_334d35b5-2f5d-2a43-9628-09c3bab9d4fa" valign="top" align="left">Entry point</th>
<th id="_1f3bbba7-090a-702b-eb97-4673f266719d" valign="top" align="left">Obligation this document adds</th>
<th id="_76cf93f5-cbbc-23dc-607c-d19ae1ad8074" valign="top" align="left">Reads back</th>
</tr></thead>
<tbody><tr id="_34b986a7-6185-c75e-22d8-8f886b8d115e"><td id="_7859232c-1472-1d33-bb68-3ac2c10414f8" valign="top" align="left"><tt>to_asciimath</tt></td>
<td id="_a47145eb-1aec-912c-9ab0-a983338d6c95" valign="top" align="left">emits the call forms and reporting forms that clause 8 reads</td>
<td id="_40e25a4e-1ba8-4f6c-737b-9918556c5c2c" valign="top" align="left">yes</td>
</tr><tr id="_27937bfd-ab9f-c5a7-94ee-8794eb375491"><td id="_04d406e7-a971-dca1-62d1-864b1d3bcf60" valign="top" align="left"><tt>to_mathml</tt></td>
<td id="_2935d149-f215-b3b4-5e04-cc1372eb6995" valign="top" align="left">emits intent markers that clause 9 reads</td>
<td id="_adb6f0e9-5e32-1139-b9d2-ae5e56765113" valign="top" align="left">yes</td>
</tr><tr id="_e20d0277-e70a-4bf8-59cb-231ee37e07af"><td id="_a1c42aa7-126f-7575-3cac-3a84921ba431" valign="top" align="left"><tt>to_omml</tt></td>
<td id="_1228d3a0-2809-6869-64cb-f66f3bc27831" valign="top" align="left">emits marker runs that clause 10 reads</td>
<td id="_a813df84-5651-3285-0c56-7e959fa43f67" valign="top" align="left">yes</td>
</tr><tr id="_1ef3ce2a-827c-1a94-7789-d3df26c58a9a"><td id="_6cc836f7-0489-99fc-a58a-9640d09ea271" valign="top" align="left"><tt>to_unicodemath</tt></td>
<td id="_99d54038-40d8-faf2-cb62-1f997b00a9e3" valign="top" align="left">emits the intent wrapper that clause 11 reads</td>
<td id="_d928a8a3-7b11-e743-db82-9c0ebdf53299" valign="top" align="left">yes</td>
</tr><tr id="_6b00a120-9d5c-f469-1306-67e955b5dcb8"><td id="_f91f6257-46b9-dbb5-bf8b-437ff51b8da2" valign="top" align="left"><tt>to_latex</tt></td>
<td id="_a684e61c-459d-6cb5-943c-55ccaec249cf" valign="top" align="left">emits shapes and statements; display surface</td>
<td id="_ddec6146-7b91-a7a0-5ac7-6432f6348c4d" valign="top" align="left">no</td>
</tr><tr id="_866f94cf-6152-9a7c-9296-1b312e1315bb"><td id="_a6ff3074-f4d8-cca7-fc76-fb02fc2b8993" valign="top" align="left"><tt>to_html</tt></td>
<td id="_139789b7-073c-e338-a538-9320fcbde645" valign="top" align="left">emits shapes and statements; display surface</td>
<td id="_3b4cd986-c9a2-2436-9bec-977482991972" valign="top" align="left">no</td>
</tr></tbody>
</table>
</clause>

<clause id="_d9357251-a405-3fed-3911-45dcf2a9758a" obligation="normative">
<title id="_10a1266f-4724-82be-13a3-c366b5145ff6">Determinism</title>
<p id="_154b9149-bd2e-6775-b9e3-2d6b3e2d30d5">Writers are deterministic and byte-stable per PM 1001. This document adds: a writer emits only through its own boundary — no writer depends on a reader having produced the tree, and no writer consults the tree’s <tt>input_string</tt>.</p>
</clause>

<clause id="_8f48dc7e-3a9a-16ac-2360-4529157245a3" obligation="normative">
<title id="_30d41661-dc5f-6268-8240-95376f30677a">The display-style option</title>
<p id="_638ff40c-c582-e74c-61fe-3202ae5641e1">The root’s display flag (PM 1001) may be forced per call: a writer asked for display style renders the display form regardless of the root’s flag, and one asked for inline renders inline. Absent an override, the root’s flag decides.</p>
</clause>

<clause id="_aa406e36-8bf7-2721-e1e7-11679edb3667" obligation="normative">
<title id="_1160fdb1-b064-a458-ee5c-17c1712d983a">Failure</title>
<p id="_b8465dc2-5b5b-942f-67a0-75db26bd8bf9">A writer given a well-formed tree does not fail. A writer given a tree that violates PM 1001 — an operand missing, an unknown node class — is outside the contract; implementations report it as a programming error, not as a parse or rendering error.</p>

<example id="_23def37a-0227-fda9-9e4e-636edea962e3"><p id="_ac074c20-e7d2-5628-80e7-5a16d525c624">The same uncertainty node written to all six surfaces and the outputs collected. <strong>Expected outcome.</strong> six encodings, one per PM 1002’s tables; byte-identical output on every conforming implementation for each.</p>
</example>
</clause>

<clause id="_e319e2ca-a978-83e8-c3b2-9bbb97c27f15" obligation="normative">
<title id="_478196d1-3991-e55a-285b-a53781b61dfa">Family obligations per surface</title>
<p id="_85e79376-d43c-247b-36e4-6ad7aeb7a594">The writers’ family obligations, at the level this document pins them (the per-construct detail is PM 1001’s mapping and PM 1002’s encodings):</p>

<table id="_1fd5b308-8e68-7c65-ef70-0f5a0d2f63a5"><colgroup><col width="16.6666%"/><col width="16.6666%"/><col width="16.6666%"/><col width="16.6666%"/><col width="16.6666%"/><col width="16.667%"/></colgroup>
<name id="_e638ba6c-02f1-a1a1-e068-2820556f065a">Obligations by family</name>
<thead><tr id="_a809c92f-f0da-0336-f1e4-2483baf15293"><th id="_6e458688-1746-253b-722d-071cfe239db4" valign="top" align="left">Family</th>
<th id="_e9d73934-f9de-d2ec-ead6-a5fba1c8f979" valign="top" align="left">AsciiMath</th>
<th id="_cc99b939-ec0b-5375-7570-ed20b7b20b12" valign="top" align="left">MathML</th>
<th id="_51c29f03-4b4c-f8f8-70ae-a235fdb14495" valign="top" align="left">OMML</th>
<th id="_95559b30-42eb-410d-64f8-136a7213de86" valign="top" align="left">UnicodeMath</th>
<th id="_37236253-7f59-e30a-c44a-4be03e9783ba" valign="top" align="left">LaTeX / HTML</th>
</tr></thead>
<tbody><tr id="_eb5b0281-de8d-5fc9-2ad5-de14beb9e0b1"><td id="_728feee6-3195-0745-faea-4ef3178d20fb" valign="top" align="left">content</td>
<td id="_631ed5bf-daea-9e66-5ccf-e797b92d316a" valign="top" align="left">literal</td>
<td id="_254f9b27-0262-6afa-63c6-554c2a62bf0c" valign="top" align="left"><tt>mn</tt>/<tt>mi</tt>/<tt>mo</tt>/<tt>mtext</tt></td>
<td id="_fda31d6c-7f58-9a0a-2fa9-ebc917bad9bc" valign="top" align="left">runs</td>
<td id="_b93cc98d-6829-d700-75fa-4cacfa426327" valign="top" align="left">literal</td>
<td id="_a078f01b-9e70-e2f7-b88c-8ebdbb4c8904" valign="top" align="left">literal elements</td>
</tr><tr id="_f452cdd4-dd81-3b71-98fd-57256ab1a090"><td id="_8ee29d2c-7ad9-21eb-44b0-b66db68572bf" valign="top" align="left">structure</td>
<td id="_511ada22-4539-a435-f64a-0c201d1c6a98" valign="top" align="left">linear grouping</td>
<td id="_f8bed20f-0000-4188-35a1-e57ecec6ab5f" valign="top" align="left"><tt>mrow</tt> families</td>
<td id="_ff174105-f926-4608-83ed-2cf02720092f" valign="top" align="left">construct elements</td>
<td id="_0107adb9-480a-9af7-2432-08ab64419839" valign="top" align="left">parentheses</td>
<td id="_80c6dfde-6085-2da8-47a1-fb1fc1b9b0d9" valign="top" align="left">nested elements</td>
</tr><tr id="_e373b875-31e9-7969-fabc-98ac46959ce9"><td id="_f7a87bc9-a9b5-210e-4fc4-259506557f04" valign="top" align="left">scripts</td>
<td id="_f442f187-c9b9-450c-abee-8b197dd05f9d" valign="top" align="left"><tt>^</tt>/<tt>_</tt></td>
<td id="_cec0398c-cc06-fb02-573d-d3406d008590" valign="top" align="left">script elements</td>
<td id="_93a784eb-5587-c2ce-175b-3a25859c82a1" valign="top" align="left">script elements</td>
<td id="_3270bd3e-3d5c-7540-de18-6bcf091df2f9" valign="top" align="left"><tt>^</tt>/<tt>_</tt></td>
<td id="_6152b131-f226-e808-0154-3c056cd39e58" valign="top" align="left"><tt>sup</tt>/<tt>sub</tt>, braces</td>
</tr><tr id="_640ad201-0bfb-f5d1-522d-17ec8a282ece"><td id="_ef41564c-5cae-01fb-5f50-8677b58217ee" valign="top" align="left">fractions</td>
<td id="_11c5cfa8-d9f0-a6c8-6cac-2904b27bace9" valign="top" align="left"><tt>/</tt></td>
<td id="_56e22de8-12ba-04ce-1d89-e559a73f74fb" valign="top" align="left"><tt>mfrac</tt></td>
<td id="_66a5e7ac-b33d-4431-fdde-cb27ba043766" valign="top" align="left"><tt>m:f</tt></td>
<td id="_4cb8e569-71d6-b84c-67d4-f1d31cf87724" valign="top" align="left"><tt>/</tt></td>
<td id="_bd9ae812-7d19-4362-36ec-c3b8d018c056" valign="top" align="left"><tt>\frac</tt>, layouts</td>
</tr><tr id="_d1dc0fa3-4746-d736-2b18-5aa099c73d3b"><td id="_1a388e74-df9f-6983-615f-e565e5a2152d" valign="top" align="left">nary</td>
<td id="_c4b8aafb-7429-e73c-d013-ab3bde41c1d8" valign="top" align="left">name + limits</td>
<td id="_92a62bfc-02ec-dbfd-6ffd-eaba5357723a" valign="top" align="left">nary elements</td>
<td id="_d9cfaf2b-5c31-c4d1-2302-ae87f4b1290c" valign="top" align="left"><tt>m:nary</tt></td>
<td id="_398f158d-5089-4d6d-8bdb-59bc5e10d340" valign="top" align="left">symbol + limits</td>
<td id="_7352d208-9b84-beb6-139b-d4a9b1780398" valign="top" align="left">commands + limits</td>
</tr><tr id="_f6bd8940-6be5-95e4-908b-933a58b4923a"><td id="_36d5cdcc-f6ae-67ee-a4fb-177529ce996f" valign="top" align="left">tables</td>
<td id="_7cb3bd72-d0ed-c8de-474f-ed3cde3858f3" valign="top" align="left"><tt>[[..]]</tt> forms</td>
<td id="_4e4cb39e-8bc2-66b3-f0fc-e35e932effd3" valign="top" align="left"><tt>mtable</tt> family</td>
<td id="_f9194514-2dbb-2b55-5273-43521249480a" valign="top" align="left"><tt>m:m</tt> family</td>
<td id="_8024f8bb-18e7-18fe-d2c4-14b172db2b1a" valign="top" align="left"><tt>■(...)</tt></td>
<td id="_374e9eac-a3cb-a8ec-22b6-5f777f88fc04" valign="top" align="left">environments, tables</td>
</tr><tr id="_a9f05b92-6f5a-2556-846c-96e93cc52886"><td id="_c43e2c00-1170-b396-76bb-a7b952f845b9" valign="top" align="left">fonts</td>
<td id="_26e5df0e-7d01-3126-fac2-5e9250b0149f" valign="top" align="left">call forms</td>
<td id="_ccbff82a-528b-cfe6-fcc9-9901d0305ca7" valign="top" align="left"><tt>mathvariant</tt></td>
<td id="_3c043775-4cfa-0dd2-28c4-2413e4ff9dcf" valign="top" align="left">run properties</td>
<td id="_ed991c85-f26c-25ec-9720-d2d580586f87" valign="top" align="left">alphanumeric ranges</td>
<td id="_8ce71241-daf9-e4f5-3c4b-795518749247" valign="top" align="left">font commands, styles</td>
</tr><tr id="_6678fdd7-4181-df14-9cff-dc79fbf3ddca"><td id="_6e7bfbab-8828-eac7-8585-e1a144fc5069" valign="top" align="left">uncertainty</td>
<td id="_ab234cc2-11b9-5f3e-3cf8-b1af516fb08d" valign="top" align="left">calls, reporting form</td>
<td id="_25ee6570-c890-6fca-fa3c-48bf6b6555e9" valign="top" align="left">intent</td>
<td id="_6bf63462-1362-b9ca-9a75-1e90bf7c8183" valign="top" align="left">marker run</td>
<td id="_2cdf959d-13a2-14ef-8d4c-a56cfaf0bab1" valign="top" align="left">wrapper</td>
<td id="_3886d48a-0dc0-4bfc-cfc0-7a748758a233" valign="top" align="left">shapes + statements</td>
</tr><tr id="_71ccc916-94dd-7e80-bdf7-5b0718b31e34"><td id="_5fc8ce6e-830b-9e06-c181-2d62287216a2" valign="top" align="left">units</td>
<td id="_519f47bc-f76e-10ca-b249-7ac31a1c84e7" valign="top" align="left">quoted channel</td>
<td id="_e9de6524-9e59-d2f1-6931-f8e03452ee32" valign="top" align="left">UnitsML form</td>
<td id="_9cc2cf2f-335a-64ec-9553-f0d031554934" valign="top" align="left">UnitsML form</td>
<td id="_fcefd3fe-b3f0-a297-e7eb-1597a29c17b7" valign="top" align="left"><tt>ⓐ</tt> form</td>
<td id="_d4a52a4f-107e-dce6-9bd1-ef0ae63ff9f2" valign="top" align="left">UnitsML form</td>
</tr></tbody>
</table>

<p id="_5c3159b7-0ae3-ade3-15d4-7ac5db4c819f">Every cell is discharged by the corpora: each family’s row in each surface’s column has corpus vectors, and a writer claim covers its column end to end.</p>
</clause>

<clause id="_c9492f87-9d54-60d6-63b6-289eed3da370" obligation="normative">
<title id="_b1c4a7e6-2fef-712b-79ef-5052a364b4ea">Writing what was not read</title>
<p id="_d236fb23-09bf-e41c-2c5e-5c3f50ba6f10">A tree may be built by construction — an application assembling nodes — rather than by reading. Writers treat constructed trees identically: the boundary knows no difference between a read tree and a built one. This is what makes evaluation pipelines possible: document 1004’s output trees write like any others.</p>
</clause>

<clause id="_d90e85dd-4768-13f1-4b83-bc5acd0b58df" obligation="normative">
<title id="_cd09f79d-f7c3-2812-f6e7-45e6424c070e">Idempotence of shape</title>
<p id="_7aa54631-c6c6-91ae-7d00-8b460d6aa4d9">Writing a tree twice yields identical bytes. Writing a read-back tree yields the same bytes as writing the original: the round-trip property plus writer determinism give write-read-write idempotence per lossless format. The corpora assert it.</p>
</clause>
</clause>

<clause id="_4365c074-e7e7-fd56-1248-b11cbf9ab320" obligation="normative">
<title id="_62409bf8-5545-01e4-417d-11c4a7e4d496">The AsciiMath interface</title>
<clause id="_d5c1744f-aabe-2876-eb9b-f50cb5162449" obligation="normative">
<title id="_30bea8e0-e2f6-f9de-3d19-99d12fccb4b2">Reading</title>
<p id="_c515e950-6195-b2dd-d1d3-afabae0f7ad7">The AsciiMath reader accepts the linear form: symbols and function applications of the registry vocabulary (PM 1001), grouping, scripts, fractions, nary constructions, text in <tt>text(...)</tt> and in quoted strings, and the uncertainty forms of PM 1002.</p>

<p id="_8709f14d-90a9-19f3-a25f-a6035a81468f">The quoted string is content: <tt>"unitsml(kg*m/s^2)"</tt> is the UnitsML channel, read as a unit embedding; any other quoted string is upright text. The reader does not interpret inside a quoted string beyond the UnitsML channel check.</p>

<p id="_7122a658-2add-3249-9a36-744f45a50bfe">The uncertainty reading follows PM 1002:</p>

<ul id="_454097d9-953f-4407-1a9a-3ac65c5a5ef2"><li><p id="_81e08802-34ad-8172-af6d-2d8106c86385">the calls <tt>ustd(v, m)</tt>, <tt>uexp(v, m, k, p)</tt> and <tt>ucov(v, l, u, p, kind)</tt> read to their categories with the given fields;</p>
</li>
<li><p id="_180b0d55-a6d6-46be-fad7-32b3e473f4bc">the reporting form <tt>v(digits)</tt> reads to a standard uncertainty with notation concise and the magnitude reconstructed by the decimal-places rule;</p>
</li>
<li><p id="_6a98be54-fad9-0d70-b44f-7df4e1bb2149">the interval kinds spell <tt>shortest</tt> and <tt>symmetric</tt> on input, reading to the model’s kinds;</p>
</li>
<li><p id="_171f55a6-8eb0-e68e-cd50-f8f908f82d70">a malformed form — wrong arity, non-decimal arguments, an unknown kind — is a reading error: <tt>AmbiguousDecimalError</tt> where the ambiguity is the decimal place count, <tt>ParseError</tt> otherwise.</p>
</li>
</ul>
</clause>

<clause id="_77ea0b85-6b5a-576b-8153-5d5670ddf8a7" obligation="normative">
<title id="_b669d426-cdd5-62e3-9ec1-4c1cc3277e98">Writing</title>
<p id="_385c1553-ab54-9dac-2acc-752212182b56">The AsciiMath writer emits per PM 1002’s encodings: the calls with their argument orders, the concise reporting form for concise nodes, the quoted UnitsML channel for expressible units and the visible unit otherwise.</p>
</clause>

<clause id="_7d1418d7-7ac1-1f24-523e-cfd30fafbeaf" obligation="normative">
<title id="_fc346f62-5576-e05d-1fca-7e09e1e3012f">Losslessness</title>
<p id="_b90bef92-5da9-eb74-b0ba-abab13e38f3a">The AsciiMath interface is lossless: writing a tree and reading the result yields an equal tree, for every tree the model defines. The one deliberate asymmetry: a concise node writes the reporting form and reads back concise — the notation survives the round trip, as a field of the node.</p>

<example id="_2ef49bb4-160d-09fd-3fb1-a037a0c57497"><p id="_b288eb5f-52e9-2057-05dd-04e3e01c9b87">Writing <tt>ustd(10.3, 0.2)</tt> and reading it back; writing the same node with notation concise and reading that back. <strong>Expected outcome.</strong> the first round trip returns the node with notation absolute; the second returns notation concise. The two trees differ in that field and in nothing else.</p>
</example>
</clause>

<clause id="_880ab9a8-77cf-bc8e-fd14-f12964dd530a" obligation="normative">
<title id="_eaa1a043-e752-a5bb-e807-7744cb8ba69e">The accepted surface</title>
<p id="_64cca3d4-d5cd-d7e4-1a88-ead33c1c1fe1">The reader accepts the construct families below, in the spellings of the registry vocabulary. The table states each family’s AsciiMath shape and the node it yields; the vocabulary itself is the registry of PM 1001.</p>

<table id="_e180ef48-e793-c42d-5ad0-befed1ea5f13"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_7d1e5894-a90e-ebc4-a6d3-c5715685ac7f">Construct families, AsciiMath</name>
<thead><tr id="_3b726623-015b-8a4c-a013-30d8bb5dcf17"><th id="_2f96547f-48dc-a4c5-8cc4-b7801fee1d32" valign="top" align="left">Family</th>
<th id="_fe7e8147-ab73-2e1a-f9b4-195152d8e107" valign="top" align="left">Shape</th>
<th id="_c9508945-7b79-539e-cb6b-944646079840" valign="top" align="left">Node yielded</th>
</tr></thead>
<tbody><tr id="_cd9ba892-c88e-3b25-2217-9866860d351d"><td id="_71d0aa53-47c8-3475-f376-29be3e73d0b6" valign="top" align="left">symbols</td>
<td id="_6deb3de8-a6dc-5b68-1879-737a964cda46" valign="top" align="left">token from the registry (<tt>alpha</tt>, <tt>sum</tt>, <tt>infty</tt>)</td>
<td id="_4f8e04b7-767e-5f87-bc5f-c1a877fb1f2f" valign="top" align="left"><tt>Symbol</tt> per entry</td>
</tr><tr id="_1c0f6a15-fd68-db4a-7e53-4ae77b14f8ab"><td id="_ecf25f2d-7b80-b57c-8cd8-ad7b3064356e" valign="top" align="left">numbers</td>
<td id="_ae5d8513-74cf-e226-52e9-b48a8aab3d26" valign="top" align="left">digits with optional decimal point</td>
<td id="_109993bd-7489-708d-3654-2dd693c20440" valign="top" align="left"><tt>Number</tt></td>
</tr><tr id="_1e88fd09-ab19-c63a-1d0a-013314abbc52"><td id="_f844ee17-717e-b207-a869-7bce88df595b" valign="top" align="left">grouping</td>
<td id="_4dc4c404-6dac-f362-9105-8bc2109263ba" valign="top" align="left">parentheses</td>
<td id="_46d9d987-cc86-1c80-8c2a-3b86dac54134" valign="top" align="left">content nodes, <tt>Fenced</tt> where the fences are meaningful</td>
</tr><tr id="_97a2beaa-a7ff-0dc3-7fc7-364cd24031e2"><td id="_406941f3-7fb9-3aac-ebda-1bbba5e59acc" valign="top" align="left">fractions</td>
<td id="_40c979a9-3f7a-8c2e-091d-e969ccef814a" valign="top" align="left"><tt>a/b</tt></td>
<td id="_4daf7ca9-fe62-4adc-51b8-e4722d6d664e" valign="top" align="left"><tt>Frac</tt></td>
</tr><tr id="_419b2870-233f-9ddd-a851-11eea486f982"><td id="_6ce43c8e-e7f1-98d5-ce05-338c8958e196" valign="top" align="left">roots</td>
<td id="_b3a52cae-e268-52eb-6280-3ff23c8a27b9" valign="top" align="left"><tt>sqrt(x)</tt>, <tt>root(x)(n)</tt></td>
<td id="_3d9afecd-f7a9-5c11-1050-6f10cc7a5302" valign="top" align="left"><tt>Sqrt</tt>, <tt>Root</tt></td>
</tr><tr id="_90aad206-1ca6-045e-ac43-5119607a26ad"><td id="_843a8f38-f597-35ed-989a-84423514acb2" valign="top" align="left">scripts</td>
<td id="_adaa72c4-3e87-98ba-0d01-dd6459792c9e" valign="top" align="left"><tt>x^2</tt>, <tt>x_1</tt>, <tt>x_1^2</tt></td>
<td id="_ec1b897f-ae6d-26bf-2dbf-796d986121af" valign="top" align="left"><tt>Power</tt>, <tt>Base</tt>, <tt>PowerBase</tt></td>
</tr><tr id="_50396a65-d4b0-2502-8e7c-03ba3bd117d3"><td id="_a1f06260-50a3-81e6-c04e-edb550165da1" valign="top" align="left">nary with limits</td>
<td id="_f4ea706b-1f59-6914-b2c0-6ca14baa0246" valign="top" align="left"><tt>sum_(i=1)^n</tt></td>
<td id="_703fbe82-91d1-ad6b-630e-baca9f077400" valign="top" align="left"><tt>Sum</tt> with limits</td>
</tr><tr id="_917428d7-6d70-bc5a-e7b2-528425fe5ca3"><td id="_65ae60d3-8c30-9dc5-170c-bd872b3e7b5c" valign="top" align="left">functions</td>
<td id="_dd57fccc-44aa-7d60-b8c5-f56941c821af" valign="top" align="left"><tt>sin x</tt>, <tt>log_a b</tt>, <tt>abs(x)</tt></td>
<td id="_5d73d2f6-f7fe-8d69-f55c-204aa4e0674c" valign="top" align="left">the function classes</td>
</tr><tr id="_8d09c7d0-7e31-b807-28af-75eafd623398"><td id="_523db482-9149-355a-e731-3be235525181" valign="top" align="left">matrices</td>
<td id="_eea49798-ccd0-49d6-8969-a5d0056af1a3" valign="top" align="left"><tt><bookmark id="_36ad7a76-3573-b5bc-bc27-a9acedddf053" anchor="a"/></tt> and variants</td>
<td id="_e7b11752-b4d6-bbde-3507-c545f9168535" valign="top" align="left">the table classes</td>
</tr><tr id="_9c3aa5de-9db9-f702-28d7-e386f35d8b6e"><td id="_2b6fd499-4e0a-64ce-9acb-35efd272f7b9" valign="top" align="left">text</td>
<td id="_b0d8cbff-ce4c-b270-621f-a65aed54bfbc" valign="top" align="left"><tt>text(...)</tt> and quoted strings</td>
<td id="_4702bf5e-9cb9-7428-7ff6-f4ded9f9d21e" valign="top" align="left"><tt>Text</tt></td>
</tr><tr id="_4d61cb8a-b85a-ca6f-727b-4d28e2904523"><td id="_76a9271d-20fc-7c60-dbb2-8aaad7be1f16" valign="top" align="left">accents</td>
<td id="_e0db3344-94d2-e9b0-308c-5e6c3d885cff" valign="top" align="left"><tt>hat x</tt>, <tt>bar x</tt>, <tt>vec x</tt></td>
<td id="_14e7ca54-9e38-7691-dc19-62bb622b9057" valign="top" align="left">the accent classes</td>
</tr><tr id="_897aba37-ec77-5760-960e-f8d6220a931a"><td id="_4439e446-03f9-3efb-fcd4-e96ff401e1ac" valign="top" align="left">font styles</td>
<td id="_27c5d152-c793-b692-dfd0-f7f881882c82" valign="top" align="left"><tt>bold(x)</tt>, <tt>fraktur(g)</tt></td>
<td id="_6a977ec1-53e1-c15e-d41a-0e07d1054289" valign="top" align="left">font style nodes</td>
</tr><tr id="_5eb9f088-4882-2ba2-e058-f175d847a65d"><td id="_71e1dcd0-3b40-5886-488e-d3ca43f01811" valign="top" align="left">colour</td>
<td id="_fd25ed89-93db-b426-2713-bd53ade6ff6c" valign="top" align="left"><tt>color(red)(x)</tt></td>
<td id="_112999a6-31f5-0a83-2f83-8e73e2ca6b44" valign="top" align="left"><tt>Color</tt></td>
</tr><tr id="_12487b65-b630-1350-3661-3c4e1203d571"><td id="_411905c7-0fce-65a9-4574-5cacc371e389" valign="top" align="left">units</td>
<td id="_f3c7bbfc-2132-0c8a-e876-b8d26a1bfd1d" valign="top" align="left"><tt>"unitsml(…​)"</tt></td>
<td id="_173d7d3e-ac97-4ed0-5dfc-116d9efc1104" valign="top" align="left"><tt>Unitsml</tt></td>
</tr><tr id="_6f035175-4ba9-f998-49f0-058a799f7ee4"><td id="_be100554-f553-6f52-8738-ae42f6974c53" valign="top" align="left">uncertainty</td>
<td id="_68a7d37b-8603-28da-5e1f-e56e80f46f9e" valign="top" align="left"><tt>ustd</tt>/<tt>uexp</tt>/<tt>ucov</tt> calls, <tt>v(digits)</tt></td>
<td id="_f6f14c8d-b318-427d-9258-b18b99fbc65c" valign="top" align="left"><tt>Uncertainty</tt></td>
</tr></tbody>
</table>
</clause>

<clause id="_b80b6173-53bb-40e7-129b-9d4ee286e310" obligation="normative">
<title id="_67b01784-9cb9-db49-f5d9-74f0161dfccd">Precedence and grouping</title>
<p id="_e8a4e170-cc49-3244-1592-f7abec96801e">The reader applies the notation’s precedence: scripts bind tighter than adjacency, fractions tighter than addition, and explicit grouping overrides. The tree is the precedence-correct reading; an author who means something else parenthesises. This document does not restate the precedence table — the reader’s behaviour is its definition, and the corpus pins it vector by vector.</p>
</clause>

<clause id="_1b068990-42a5-4466-87f2-0d665093dee6" obligation="normative">
<title id="_606fda7b-ff71-f6c4-8ac3-c5952360b4c2">Localization</title>
<p id="_023b119c-cdaf-b550-26bf-abf50bb1bf18">The localized symbols and function names follow the active locale: an Italian locale reads <tt>sen</tt> as the sine function where an English reading sees a symbol sequence. Localization affects which tokens map to which nodes; it never changes the tree shape a construct yields.</p>
</clause>

<clause id="_f7a74ab5-53f1-3ffc-7a0e-21f3b830bf99" obligation="normative">
<title id="_ed6662c3-76fd-9513-1d3e-64cfe36a526b">Errors and the corpus</title>
<p id="_fc09a1e3-c7e6-33b6-e199-4daafd0f2bfc">The reader’s refusals are pinned by the corpus alongside its successes: every reading error of Annex A that the AsciiMath surface can produce has a corpus vector whose expected outcome is the error and its message shape.</p>
</clause>

<clause id="_f5ff9341-11da-1ecd-f3b3-801af6d6a9a3" obligation="normative">
<title id="_c12dddbe-c846-5bbd-a0d2-d3e179d28670">The quoted channel, precisely</title>
<p id="_81b4e4d3-12fe-9bb3-b805-a24e0e00bf86">A quoted string in AsciiMath input is content, with exactly one special case: text matching the UnitsML channel shape <tt>unitsml(&lt;expression&gt;)</tt> becomes a unit embedding. The check is on the whole string, after trimming nothing: <tt>" unitsml(g)"</tt> with a leading space is text, <tt>"unitsml(g)"</tt> is the channel. Anything inside the channel that the unit reader refuses is a reading error naming the expression — the channel never silently degrades to text, because a unit intended as a unit must not become prose.</p>
</clause>

<clause id="_8c44bcc4-82ed-9daf-b89d-b4118815f2c2" obligation="normative">
<title id="_7c8d12d9-e92c-8344-5c32-019904940bde">Concise reconstruction, precisely</title>
<p id="_1e13d133-3210-3c2b-e850-2f48017a6b70">On reading the reporting form <tt>v(digits)</tt>:</p>

<ol id="_3b4470b5-6914-4104-df35-1178e7c030b8" type="arabic"><li><p id="_80553529-ff8f-fcca-f87a-d370e593e902">the value is the text before the parenthesis;</p>
</li>
<li><p id="_735209b6-14e1-0859-a512-831b44b17341">the digit string is the text inside;</p>
</li>
<li><p id="_2731959b-533f-ed01-f2b6-1d171a48dd3e">the magnitude’s decimal places are the value’s decimal places — the count that made the form well formed;</p>
</li>
<li><p id="_0288dbf0-43a4-a2e2-bc7e-ed79741f35ef">the magnitude is the digit string with its last digit(s) moved behind a decimal point at that place count, prefixed with <tt>0.</tt> when the place count is positive;</p>
</li>
<li><p id="_74773cec-8398-ca7a-5c31-ac48c9cd29ac">the node is constructed with notation concise, through PM 1002’s validation.</p>
</li>
</ol>

<p id="_4b036b42-e4b3-3c12-8e62-cf7a4aa0cbe9">A digit string that cannot be reconstructed at the value’s place count — more digits than places is unambiguous, fewer or mismatched is not — raises <tt>AmbiguousDecimalError</tt>. The reconstruction never invents places: <tt>10(2)</tt> reads magnitude <tt>2</tt> at zero places; <tt>10.3(25)</tt> refuses.</p>
</clause>

<clause id="_4a70a00a-697d-192d-9b52-9967904d9efd" obligation="normative">
<title id="_74838ac8-0cdf-9c54-1c60-f8e0c46b8826">Symmetric, precisely</title>
<p id="_7af31d51-8969-a170-4deb-14ce8f675217">The AsciiMath kind token <tt>symmetric</tt> reads to <tt>probabilistically-symmetric</tt> before node construction; the model never sees the short spelling. Writing a <tt>probabilistically-symmetric</tt> node emits <tt>symmetric</tt> in AsciiMath and the full name everywhere else. The asymmetry is spell-level and pinned in both corpora.</p>
</clause>

<clause id="_b8a08290-5193-8a00-e65b-eb9ced55c0aa" obligation="normative">
<title id="_3a25d9b5-05e6-7d5b-6c82-b702c8690171">AsciiMath error table</title>
<table id="_d4488e93-0a17-37d1-312e-f9cef42ed5cb"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_03b16000-9547-d14e-8e46-a151eda415ca">AsciiMath reading errors</name>
<thead><tr id="_4dcefe65-5e8d-5f99-0ffe-5f79b7bd40f8"><th id="_5d531da9-ef07-10a4-61c2-537a50bb7b17" valign="top" align="left">Input fault</th>
<th id="_c058b888-bc62-ebe3-6736-78263a5b86f6" valign="top" align="left">Error</th>
<th id="_3d76604b-21ff-8532-2cf4-22a9e069e187" valign="top" align="left">Message shape</th>
</tr></thead>
<tbody><tr id="_67300d6d-1fb5-e6cc-a18d-67a24cc5f0b8"><td id="_692ec025-d31e-d7f9-5df1-ea6d6a884923" valign="top" align="left">unknown token</td>
<td id="_61da9dc1-8ec5-013c-5987-ffde6b88b9e5" valign="top" align="left"><tt>ParseError</tt></td>
<td id="_c0e5a76a-98d7-e9ce-5532-5fa1b4184263" valign="top" align="left">the token and its position</td>
</tr><tr id="_98fd13f6-6ce2-02f3-db14-5c4f8f57e20c"><td id="_5f5d2cbc-d5a8-efd3-7866-ebaa4fda6416" valign="top" align="left">arity mismatch in a call</td>
<td id="_54344f4a-860d-4062-49d4-94941d985ac5" valign="top" align="left"><tt>ParseError</tt></td>
<td id="_9eb2173b-8dbc-b05d-0be3-11933f06a24d" valign="top" align="left">the call and its argument count</td>
</tr><tr id="_991e3be8-a8d1-eaef-79c0-15bff609a441"><td id="_443f8a2f-ceb0-4667-d30a-5a3d354d7c37" valign="top" align="left">unknown interval kind</td>
<td id="_6f59c579-b6a2-dfd3-d3b0-0883dc3bfdfd" valign="top" align="left"><tt>ParseError</tt></td>
<td id="_7bdfc7bb-834d-03e2-920b-03cea14cdc32" valign="top" align="left">the kind as written</td>
</tr><tr id="_2f51d607-be48-b287-3e69-cd046cf44b45"><td id="_745a8746-9b88-70de-9248-24a259b0f780" valign="top" align="left">concise place-count mismatch</td>
<td id="_ae8559a2-3c79-4d26-a32e-716bd60821cb" valign="top" align="left"><tt>AmbiguousDecimalError</tt></td>
<td id="_6841148e-b7a6-9704-8f46-c557180fd2e3" valign="top" align="left">the value and the digit string</td>
</tr><tr id="_57979c01-d8f2-131b-cb2e-d788428a8756"><td id="_60693f3a-b7c4-22e4-52fa-3f7e4ca9576c" valign="top" align="left">refused unit expression in the channel</td>
<td id="_63477ee1-5f5e-f9d8-ddc1-221b7733e146" valign="top" align="left"><tt>ParseError</tt></td>
<td id="_659d683d-627f-8925-3a2b-acac15056c81" valign="top" align="left">the expression, from the unit reader</td>
</tr></tbody>
</table>
</clause>

<clause id="_b00b327c-a710-a84c-be5d-e07fd7458239" obligation="normative">
<title id="_5f455dd9-8d2a-d90c-929e-8368acf35480">Writing matrices and alignment</title>
<p id="_eebcfdc5-9fde-7f5f-29a7-eca68857d680">The table classes write in the bracket forms; <tt>Align</tt> and <tt>Eqarray</tt> write with the ampersand alignment their reads accept. Alignment points are structural for these classes and survive the round trip; a writer that drops them fails the corpus.</p>
</clause>

<clause id="_f2a9198b-c660-4a07-3d9d-5e7686fcd23c" obligation="normative">
<title id="_07952001-dd95-1b26-1e40-60b5e6e6d351">The vocabulary surface</title>
<p id="_2634b10a-49df-8b17-5c94-876e1a81157f">The AsciiMath reader’s symbol vocabulary is the registry’s AsciiMath token set. The families, with representative tokens (the full set is the registry; the corpus exercises it):</p>

<table id="_8753a312-eef3-37f7-bb3c-440f815edcb0"><colgroup><col width="33.3333%"/><col width="66.6667%"/></colgroup>
<name id="_60c32719-86c7-dc15-b3d6-06a4143d1a25">Symbol families, AsciiMath tokens</name>
<thead><tr id="_5029641c-a8cf-a75b-040c-5412735b5ed5"><th id="_9c7a6468-59b7-82f1-6a2b-7496c4a9bbac" valign="top" align="left">Family</th>
<th id="_1cba87e0-a2f2-b7ea-1831-dfe97ce34c05" valign="top" align="left">Representative tokens</th>
</tr></thead>
<tbody><tr id="_931a2852-d71b-207f-b7b4-830878a48ad8"><td id="_be5bb561-43fc-1e7c-de21-8377093f1199" valign="top" align="left">Greek</td>
<td id="_cc096783-6b89-012c-3006-3d6cdd3c6ff0" valign="top" align="left"><tt>alpha</tt>, <tt>beta</tt>, <tt>Gamma</tt>, <tt>Delta</tt>, <tt>theta</tt>, <tt>Omega</tt></td>
</tr><tr id="_bfa752e4-7d37-d913-54b8-bd2b9b709fbb"><td id="_d8388629-5420-b13e-023a-63ebfe49f8f2" valign="top" align="left">operators</td>
<td id="_acbb88ea-eb7f-6818-8f61-a1b91bf36144" valign="top" align="left"><tt>+</tt>, <tt>-</tt>, <tt>*</tt>, <tt>**</tt>, <tt>times</tt>, <tt>div</tt>, <tt>pm</tt>, <tt>mp</tt>, <tt>cdot</tt></td>
</tr><tr id="_32d56bbf-0ab6-22c7-a1d7-996a85d42142"><td id="_111f98ea-167d-cdb6-3edb-82c3b2118682" valign="top" align="left">relations</td>
<td id="_fca2508d-3df4-fed8-7a22-dbdea4ba076d" valign="top" align="left"><tt>=</tt>, <tt>!=</tt>, <tt>&lt;</tt>, <tt>&lt;=</tt>, <tt>&gt;</tt>, <tt>&gt;=</tt>, <tt>approx</tt>, <tt>equiv</tt>, <tt>sim</tt>, <tt>propto</tt></td>
</tr><tr id="_1f3bd085-94d5-4fcd-4555-3cab90d8f558"><td id="_6cdcdf13-89fd-14c3-2a00-1aabb632d850" valign="top" align="left">logic and sets</td>
<td id="_c551b738-889c-5086-1762-b78e91c9217d" valign="top" align="left"><tt>and</tt>, <tt>or</tt>, <tt>not</tt>, <tt>forall</tt>, <tt>exists</tt>, <tt>in</tt>, <tt>notin</tt>, <tt>subset</tt>, <tt>cup</tt>, <tt>cap</tt></td>
</tr><tr id="_894ca385-3918-085a-687e-4ea1ba35003d"><td id="_8581e062-ab2b-d4ff-3946-785dd278db09" valign="top" align="left">arrows</td>
<td id="_0dcd5207-6e81-b7f8-069b-cf55e545350b" valign="top" align="left"><tt>-&gt;</tt>, <tt>=&gt;</tt>, <tt>&lt;-&gt;</tt>, <tt>iff</tt>, <tt>mapsto</tt></td>
</tr><tr id="_9ebb675a-45e8-2b5e-51fb-601b6a28503c"><td id="_fc7b8d06-eb9a-4b0f-ec66-c94baf7ead70" valign="top" align="left">calculus</td>
<td id="_0825f9db-38cf-6bd3-2d94-6a90c645a38a" valign="top" align="left"><tt>int</tt>, <tt>oint</tt>, <tt>sum</tt>, <tt>prod</tt>, <tt>partial</tt>, <tt>nabla</tt></td>
</tr><tr id="_549d3846-4c63-e730-a0f0-0d0a9caa1873"><td id="_ebf699ad-9022-462f-7a6b-c0baaff12eb8" valign="top" align="left">miscellany</td>
<td id="_a6421794-bd25-b0d9-cb87-2980242e299c" valign="top" align="left"><tt>oo</tt>, <tt>emptyset</tt>, <tt>aleph</tt>, <tt>hbar</tt>, <tt>ell</tt>, <tt>Re</tt>, <tt>Im</tt>, <tt>degree</tt></td>
</tr></tbody>
</table>

<p id="_3dbca776-b714-7122-cb3d-f55258a31a06">Function-name tokens follow: <tt>sin</tt>, <tt>cos</tt>, <tt>tan</tt> and kin, <tt>log</tt>, <tt>ln</tt>, <tt>lg</tt>, <tt>exp</tt>, <tt>min</tt>, <tt>max</tt>, <tt>gcd</tt>, <tt>lcm</tt>, <tt>mod</tt>, <tt>det</tt>, <tt>dim</tt>, <tt>deg</tt>, <tt>exp</tt>, <tt>hom</tt>, <tt>ker</tt>, <tt>lim</tt> with its variants — each reading to its function class. Locale-selected alternatives exist for a number of them, per clause 6.</p>
</clause>

<clause id="_b37f012f-3d78-afcb-0438-fc0c52d3f182" obligation="normative">
<title id="_056b700b-d1da-ec25-9b69-75fcac31a754">Text and quotes, precisely</title>
<p id="_05cdcc8e-edd7-a31f-3846-a742a4c6ff19"><tt>text(...)</tt> reads its content as upright text with grouping; quoted strings read as text with the UnitsML channel exception of this clause. The two forms differ in one observable way: <tt>text(...)</tt> may contain AsciiMath commands, a quoted string never does — quotes are literal, which is what makes them the right channel for content a formula must not interpret.</p>
</clause>

<clause id="_07f7c170-d6b7-86a4-59b1-c19ec82940b3" obligation="normative">
<title id="_06124135-152c-8175-4bad-2823462c6cc5">What the corpus pins for AsciiMath</title>
<p id="_150708ff-22c9-427b-9b4a-ec0f111d8a30">The AsciiMath corpora carry, at minimum: every registry family with a representative per entry-group; every construct family of the table above, in plain and grouped forms; the uncertainty forms of PM 1002 with all categories, notations and kinds; the quoted channel with expressible, inexpressible and refused units; the localization pairs; and the error table’s rows. 143 cases formed the first frozen generation; later generations extend, never rewrite.</p>
</clause>
</clause>

<clause id="_5c149437-425d-653d-2037-308fadf56ba8" obligation="normative">
<title id="_39969c0f-af27-9a5d-93e6-b0e025628cc7">The MathML interface</title>
<clause id="_07d7d7a4-b5e5-78bb-3d1d-c74cf56a4df4" obligation="normative">
<title id="_9a6cc285-5f11-ad38-0cd2-fec811a3cae5">Reading</title>
<p id="_0ce14be3-c6b4-637e-add8-111c2074e772">The MathML reader accepts a MathML 4 document or fragment. It reads the presentation markup into the tree: <tt>mi</tt>, <tt>mn</tt>, <tt>mo</tt>, <tt>mrow</tt>, <tt>mfrac</tt>, <tt>msqrt</tt>, <tt>mroot</tt>, scripts, tables, and the constructs the model names. Two rules govern semantics:</p>

<ul id="_f87052b5-9a35-fc7f-3435-c42e828c17ac"><li><p id="_d8e3718c-acc1-2d44-a258-418ea1ce4da2">the <tt>intent</tt> attribute is authoritative for uncertainty (PM 1002): where an <tt>mrow</tt> carries an uncertainty marker, the fields come from the marker’s arguments and the row’s visible content is regenerated;</p>
</li>
<li><p id="_8b37eb8e-997f-0565-7490-be20529ff32e">a <tt>semantics</tt> element carries its annotations as annotation data on the tree, and its first child as the expression.</p>
</li>
</ul>

<p id="_3dc95c46-b792-210c-ff9e-dc6bc54a880a">Unknown presentation elements are read as their content where they are containers and refused where they are not: the reader does not silently drop structure it cannot represent.</p>
</clause>

<clause id="_19b3b58e-1e2b-2478-29d7-f5db3dc6aee1" obligation="normative">
<title id="_74298721-cabb-1d2b-62b0-32580fe8f09f">Writing</title>
<p id="_e484d7c0-2dd8-d5d3-0978-b73abca4f01e">The MathML writer emits MathML 4 per PM 1001’s surface rules: <tt>mathvariant</tt> from font styles, intent markers from uncertainty nodes, <tt>mtable</tt> families from tables, <tt>mn</tt>/<tt>mi</tt>/<tt>mo</tt> per the registry entries. The <tt>display</tt> attribute follows the root’s flag or the call’s override.</p>
</clause>

<clause id="_1158cc56-ad79-5a67-753b-7db3bbf0436b" obligation="normative">
<title id="_3b7d4a47-c35e-c39b-dc2c-574246400bca">Losslessness</title>
<p id="_76e75456-ee68-36a7-06fa-3db7e3916cc6">MathML is lossless for the constructs the model defines, with the intent-authority rule for uncertainty. A MathML document using constructs the model does not define reads to the closest model content it can represent and records nothing else — such documents are outside the losslessness claim.</p>

<example id="_87f626bf-cfdb-7ef5-0377-936d6be8f0a7"><p id="_1741c686-a1ee-2c18-c4d3-ff230e53dfa9">Reading a MathML <tt>mrow</tt> with <tt>intent="expanded-uncertainty(10.3,0.5,2,0.95)"</tt> whose visible content shows a stale magnitude. <strong>Expected outcome.</strong> the tree carries the marker’s fields (<tt>0.5</tt>, <tt>2</tt>, <tt>0.95</tt>); the stale visible magnitude is discarded and regenerated on the next write.</p>
</example>
</clause>

<clause id="_97921f54-6006-6509-bf8f-8c180f9d0734" obligation="normative">
<title id="_f21a7d83-fdbe-670d-8a65-427e56799ca8">Element mapping</title>
<p id="_559be865-2ec3-f3a4-a6aa-d40b0d9bc424">The reader’s element mapping, at family level:</p>

<table id="_bebffd04-3612-03ea-5063-277c06cdef76"><colgroup><col width="28.5714%"/><col width="28.5714%"/><col width="42.8572%"/></colgroup>
<name id="_1d89790e-bd02-56b0-03c9-500d2a5f7de6">MathML elements to nodes</name>
<thead><tr id="_3fb9b111-ca48-74fe-9872-86dfb4202c50"><th id="_39f88fbe-701f-c813-bb42-886cda10943d" valign="top" align="left">Element or construct</th>
<th id="_4213a420-2453-0d6d-5567-7000028647a3" valign="top" align="left">Node</th>
<th id="_a299b46e-ddb5-8286-aa50-9be32bc20abe" valign="top" align="left">Notes</th>
</tr></thead>
<tbody><tr id="_5e7eab16-b67c-2773-ace7-4df041bda8b9"><td id="_4f783620-37b9-0a2a-6cca-a5b4c5a54be2" valign="top" align="left"><tt>mi</tt>, <tt>mo</tt> with registry entries</td>
<td id="_9d8b00c8-eb3e-1bc9-c8eb-fd3267db32cf" valign="top" align="left"><tt>Symbol</tt></td>
<td id="_79489d73-948f-3dde-d425-785e61da47af" valign="top" align="left">per the entry’s MathML rendering</td>
</tr><tr id="_9993c130-cf1b-2ee1-c444-c8aebc12aeb5"><td id="_fa17806c-0728-9d75-915e-8e996f39550f" valign="top" align="left"><tt>mn</tt></td>
<td id="_9a6719a9-0d69-c53a-a356-d35a2abcbe2f" valign="top" align="left"><tt>Number</tt></td>
<td id="_3a489ba6-38cc-5d3d-d475-77a01ce5165d" valign="top" align="left">text verbatim</td>
</tr><tr id="_8d6656d6-8fbf-7f2e-7c86-fe7824c878fa"><td id="_af60f53e-c47c-3329-8acd-d35aa1266f6b" valign="top" align="left"><tt>mtext</tt></td>
<td id="_caf5f97b-1fd3-eda9-bfe5-0f3eb0d73b67" valign="top" align="left"><tt>Text</tt></td>
<td id="_0791a144-eb13-f382-d3c0-fe8c93173669" valign="top" align="left">content verbatim</td>
</tr><tr id="_f8823f32-a96c-d15a-04d9-d5b1588f77f8"><td id="_5cea975b-f358-71ce-203e-96bddd27e4f3" valign="top" align="left"><tt>mfrac</tt></td>
<td id="_808cd04a-99e4-65c4-66cb-070f828d6f59" valign="top" align="left"><tt>Frac</tt></td>
<td id="_7705f8f5-6cef-fa22-6357-29c6eed6bf33" valign="top" align="left">numerator, denominator order</td>
</tr><tr id="_58d8259c-a56f-b9a0-e85f-60d578d39cfa"><td id="_47a4f542-086e-d48c-5ae3-75094c37709e" valign="top" align="left"><tt>msqrt</tt>, <tt>mroot</tt></td>
<td id="_f3127cbf-99e5-d142-4cc3-9a7948839aaf" valign="top" align="left"><tt>Sqrt</tt>, <tt>Root</tt></td>
<td id="_d1dfdfbe-52a7-c13d-5b36-243714972987" valign="top" align="left">degree order preserved</td>
</tr><tr id="_ae2002a7-9a05-e47c-fba1-4f39a02b3eb8"><td id="_c0beece1-81f9-400b-5c2d-ff3faad73a01" valign="top" align="left"><tt>msub</tt>, <tt>msup</tt>, <tt>msubsup</tt></td>
<td id="_cf992002-54c8-9f9c-c29c-c5af7b038493" valign="top" align="left"><tt>Base</tt>, <tt>Power</tt>, <tt>PowerBase</tt></td>
<td id="_a462de71-29aa-d063-c114-7037b4b43d50" valign="top" align="left">order preserved</td>
</tr><tr id="_18b29db7-2ff5-d82c-a611-6ae42b7fd640"><td id="_e9b11a97-d093-4f0c-723b-f01d72b4e2a5" valign="top" align="left"><tt>munder</tt>, <tt>mover</tt>, <tt>munderover</tt></td>
<td id="_02a3b789-a3df-d185-0852-7bfd7541107d" valign="top" align="left"><tt>Under</tt>, <tt>Over</tt>, <tt>Underover</tt> family</td>
<td id="_692b1679-9974-e46c-ee9f-7dc4562692b9" valign="top" align="left">per construct</td>
</tr><tr id="_aedd9288-1a2d-25e8-c6ad-604d8f46048a"><td id="_68a20b74-8786-c563-eaf1-786682ad9106" valign="top" align="left"><tt>nary</tt> shapes</td>
<td id="_34e26653-35d8-7033-68ad-1ca69bd0fbc4" valign="top" align="left">the nary classes</td>
<td id="_1d2329aa-3bc4-3166-44d2-ab7965f08a53" valign="top" align="left">character from the construct</td>
</tr><tr id="_ba3a0dce-7409-333a-dc5a-b79e245226df"><td id="_b6738934-c330-329d-3bf2-0639d0771373" valign="top" align="left"><tt>mtable</tt>, <tt>mtr</tt>, <tt>mtd</tt>, <tt>mlabeledtr</tt></td>
<td id="_93eeaf25-09aa-a9b4-e538-6a560c321ea5" valign="top" align="left">table, <tt>Tr</tt>, <tt>Td</tt>, <tt>Mlabeledtr</tt></td>
<td id="_76cb2428-3cd6-269a-ad6f-8669f1181f4a" valign="top" align="left">structure preserved</td>
</tr><tr id="_994a1b0e-3a45-0e8d-ed59-9395062c89bd"><td id="_e3db29cd-5832-7a49-760e-0424ee57aade" valign="top" align="left"><tt>menclose</tt>, <tt>merror</tt>, <tt>mphantom</tt>, <tt>mpadded</tt>, <tt>mspace</tt></td>
<td id="_30ab8a3b-e679-c791-ff53-34666d80cb00" valign="top" align="left">the presentation classes</td>
<td id="_f4425c48-f8e7-1b22-855f-7930ea08e99e" valign="top" align="left">per construct</td>
</tr><tr id="_838f5a70-0568-7f7b-e427-f850b5269368"><td id="_cb3651a9-35cd-80b6-4964-7fe566e35c84" valign="top" align="left"><tt>mmultiscripts</tt></td>
<td id="_20306fb5-0540-dc32-71c9-7d8c03efbade" valign="top" align="left"><tt>Multiscript</tt></td>
<td id="_26f6f10e-e4d5-f2be-6903-2be032cc1978" valign="top" align="left">pre and post pairs</td>
</tr><tr id="_48902cb1-8271-9b20-e9b8-769064c73c97"><td id="_07a53c2d-a30c-56d6-2876-cc77cd8abd21" valign="top" align="left"><tt>semantics</tt></td>
<td id="_4950953f-2e91-068d-3d5c-e1dc492a397c" valign="top" align="left"><tt>Semantics</tt></td>
<td id="_0c55830e-ffb1-9594-d824-4ed4790f9543" valign="top" align="left">annotations carried</td>
</tr><tr id="_26c7b7f6-9929-0c3b-f90a-778763b740b4"><td id="_d27df2d4-6f67-e423-37a2-306162c3d3a1" valign="top" align="left"><tt>intent</tt> attribute</td>
<td id="_1eb50153-7932-45a1-cf6d-e7e54970c4f3" valign="top" align="left">per the intent</td>
<td id="_ac7e5b78-fed3-7b93-c870-a48b6ba2d55e" valign="top" align="left">uncertainty per PM 1002</td>
</tr></tbody>
</table>
</clause>

<clause id="_f37c9916-8730-097d-ebb6-cc7cf64f3aed" obligation="normative">
<title id="_9a87f2c3-6f37-59c6-d03f-9fb79bd533bb">Whitespace and <tt>mspace</tt></title>
<p id="_2a258065-032f-f9a0-be86-129cfb788456">Significant whitespace in MathML is structural; the reader treats <tt>mspace</tt> per its width semantics and collapses presentation-only whitespace, as MathML itself prescribes. Trees carry structure, not spacing.</p>
</clause>

<clause id="_2381446c-dab4-ac18-8f00-ffd8ad25db07" obligation="normative">
<title id="_b8a56bc3-a4fd-810c-afdf-685b17e642e4">Diagnostics</title>
<p id="_5b88df4f-3872-9e9a-53b9-6f5c5a52a1ba">A MathML input that mixes constructs the model cannot represent reads to its representable core; the reading corpora contain such vectors with their expected trees, so the boundary between “reads with loss” and “refuses” is pinned, not folklore.</p>
</clause>

<clause id="_77812457-55f3-d030-21e7-505289640ee1" obligation="normative">
<title id="_cfa22a48-6aac-3b6c-6889-505adfbf8f4c">Reading algorithm</title>
<p id="_91b43926-0716-6a50-5e04-a2ca465f543a">The MathML reader walks the document in order:</p>

<ol id="_c27c2e1c-acee-ac68-4f6d-7ac1ea800855" type="arabic"><li><p id="_952e3e3b-5672-5a92-58c0-080f9ccf80f4">the root element fixes the fragment’s bounds; a stray text outside it refuses;</p>
</li>
<li><p id="_7e52b08e-fb4b-25a1-9cc4-5b7f64fd39e1">each element maps per the table of this clause; containers recurse;</p>
</li>
<li><p id="_05eb1ea3-4b38-a1d6-04c6-1fc4f725de96"><tt>intent</tt> markers are collected as the elements carrying them close, and the marked element’s node is reconstructed from the marker per PM 1002;</p>
</li>
<li><p id="_a50a758b-9da5-64f3-f442-ee5803443b0d">annotations ride with their <tt>Semantics</tt> node;</p>
</li>
<li><p id="_14d08ae9-88b5-13f3-532f-a38b75464dc7">the resulting parameters form the tree’s top level, in document order.</p>
</li>
</ol>
</clause>

<clause id="_5ab6c294-d1e2-acf7-5c82-760d1776577e" obligation="normative">
<title id="_efc48572-fb53-f298-6ca1-8baee217221e">The intent-authority consequence</title>
<p id="_d5097b60-a0bb-b9c1-3a07-e90fd9b4ac5e">Because markers are authoritative, a MathML producer has exactly one way to be wrong about uncertainty: emit a marker whose arguments contradict the visible content. That document reads to the marker’s fields. A producer that wants the visible shape to win must not carry a marker; but then the node is not an uncertainty node, and the shape reads as ordinary constructs.</p>
</clause>

<clause id="_ebabf1f0-4a47-5d6a-589b-84f8685c15fc" obligation="normative">
<title id="_b43ef95d-a9a0-a744-cf27-6df6c54d233d">Entities</title>
<p id="_7aad23a9-1064-2df8-26ac-8d85ed63d7bc">Named entities (<tt>&amp;#x3b1;</tt>) and numeric character references read through the registry’s MathML renderings — an entity the registry knows reads to its entry; an unknown entity is a reading error naming it.</p>
</clause>

<clause id="_87918a64-a513-2626-fe7c-9628a830ef2f" obligation="normative">
<title id="_cc4a2726-9e20-bc5f-153d-77c237a6afd7">Writing the intent, concretely</title>
<p id="_33b1a3f7-df51-2336-31ee-8f572388d788">The uncertainty markers of PM 1002 write as the <tt>intent</tt> attribute value on the enclosing <tt>mrow</tt>: <tt>intent="standard-uncertainty(10.3,0.2)"</tt>. The attribute is the whole machine-readable contract; a MathML consumer that understands intent reads the fields, one that does not sees the shape. The writer never splits a marker across elements or abbreviates it — the grammar of PM 1002 is the attribute’s entire alphabet.</p>
</clause>
</clause>

<clause id="_2c5102bd-34aa-17b1-72e2-e21fc58fdb20" obligation="normative">
<title id="_893f0bad-7744-8f8e-ec1f-b2784c1a2589">The OMML interface</title>
<clause id="_5fec8609-a713-02ee-c117-63fccd751e65" obligation="normative">
<title id="_69021c37-590b-2ffa-b381-4d1007df7068">Reading</title>
<p id="_e288453b-aef6-0dcf-ac15-f95dc821f274">The OMML reader accepts DrawingML mathematics (ECMA-376, <tt>m:</tt> namespace): runs, run properties, fractions, radicals, scripts, nary constructs, matrices, delimiters, and phantom boxes.</p>

<p id="_1df56ee7-b3fa-4564-1532-f4b0dd52eb48">The marker convention is authoritative for uncertainty: a run holding an uncertainty marker string (PM 1002’s grammar) marks the construct that follows; the fields come from the marker and the shape runs are regenerated. A consumer that never learned the convention sees one extra run of text; a conforming reader consumes it.</p>

<p id="_e3d43e4b-ba0b-08c9-2bcc-79adf30fa42e">Run properties map to font styles; <tt>m:nary</tt> to the nary classes with their character; matrices to the table classes; <tt>m:d</tt> delimiters to <tt>Fenced</tt>. As with MathML, structure the model does not define is read to its closest representable content.</p>
</clause>

<clause id="_bc876d92-cf64-3625-ce16-645cb82945b3" obligation="normative">
<title id="_fb6ac5c1-beb7-9196-8602-528a9083c1c7">Writing</title>
<p id="_ac8518f0-a16e-6ff2-5adc-b62f01fcee6c">The OMML writer emits per PM 1001: run properties from font styles, <tt>m:nary</tt> from nary nodes, <tt>m:m</tt> matrices with the table class’s delimiters, <tt>m:d</tt> from fences, and the marker run before the shape runs for uncertainty nodes, with the unit boxed. The display form wraps in <tt>m:oMathPara</tt> per the root’s flag.</p>
</clause>

<clause id="_7a85b59e-3053-f972-f7b2-791c3aec9b21" obligation="normative">
<title id="_31ff8e32-4f8e-71ab-f85b-c119a99ba983">Losslessness</title>
<p id="_ee439717-a7f7-85aa-2040-45ba20837c45">OMML is lossless for the model’s constructs under the marker-authority rule.</p>

<example id="_3360fe34-27ef-e272-1ff7-f414387a6c1e"><p id="_7d9b3b38-4c29-9617-6bf8-07184e770af3">Reading an OMML run sequence whose marker run says <tt>coverage-interval:shortest(10.3,9.9,10.7,0.95)</tt> followed by shape runs showing <tt>[9.8, 10.8]</tt>. <strong>Expected outcome.</strong> the tree carries the marker’s endpoints <tt>9.9</tt> and <tt>10.7</tt>; the stale shape is discarded; the next write emits the marker’s shape.</p>
</example>
</clause>

<clause id="_66070332-c965-4192-dc52-cab988c15de1" obligation="normative">
<title id="_016051b1-651d-5904-f38f-c12ec5c88024">Construct mapping</title>
<table id="_ebfe41f6-2ebf-1c25-9613-bc4217926ca7"><colgroup><col width="28.5714%"/><col width="28.5714%"/><col width="42.8572%"/></colgroup>
<name id="_4c983ac3-f1ff-3d68-bdd7-fabd00d5dccc">OMML constructs to nodes</name>
<thead><tr id="_c5510e9b-6545-c5e7-cc2e-2dc738db5b36"><th id="_cfffc5d0-e7ba-8d79-a3d8-bfe39cd6807c" valign="top" align="left">Construct</th>
<th id="_06abce3d-ed16-e933-65f7-5799a1df4b63" valign="top" align="left">Node</th>
<th id="_b2d6ab75-c3a6-0223-0622-137761cce40e" valign="top" align="left">Notes</th>
</tr></thead>
<tbody><tr id="_f6ebc4f3-9ae3-f4f5-312d-70fe27323fe6"><td id="_3a4da52e-0a0f-283d-134f-7e97aa347eea" valign="top" align="left"><tt>m:r</tt> runs with <tt>m:rPr</tt></td>
<td id="_460a8d96-479a-e2d1-f9f8-2c2c161b1a1f" valign="top" align="left"><tt>Symbol</tt>, <tt>Number</tt>, <tt>Text</tt>, font styles</td>
<td id="_b4ab1124-93ee-3d32-6529-ee79cda6b4d3" valign="top" align="left">properties map to variants</td>
</tr><tr id="_50c41e6a-eef2-bb62-91f0-9f6a4bd64821"><td id="_d0ba8f81-a109-f42d-a692-afbcaabac36f" valign="top" align="left"><tt>m:f</tt> with <tt>m:num</tt>, <tt>m:den</tt></td>
<td id="_277111e1-b802-00be-43ac-301cbc6eed99" valign="top" align="left"><tt>Frac</tt></td>
<td id="_d17c865e-b05a-492a-2f1e-f41b86eed173" valign="top" align="left">order preserved</td>
</tr><tr id="_37fc3a10-685e-e5c2-a4b7-9449a66283cf"><td id="_de7d9866-4b63-9085-5adb-7cec136a8bf6" valign="top" align="left"><tt>m:rad</tt></td>
<td id="_59604b28-6396-2800-4629-841366fc44f5" valign="top" align="left"><tt>Sqrt</tt>, <tt>Root</tt></td>
<td id="_5bc7707e-8697-494a-c6a1-e722e5d41323" valign="top" align="left">degree hiding per construct</td>
</tr><tr id="_c51c6e66-2225-3f7e-27bd-e4d2bf1dbdec"><td id="_00637443-841a-0d2f-2920-1a0fa6624697" valign="top" align="left"><tt>m:sSup</tt>, <tt>m:sSub</tt>, <tt>m:sSubSup</tt>, <tt>m:sPre</tt></td>
<td id="_76480be3-e7a6-6015-5d98-dde585c48f8a" valign="top" align="left">script classes</td>
<td id="_25661c63-7201-af6b-3c69-43ddc4d9aa93" valign="top" align="left">pre-scripts to <tt>Multiscript</tt></td>
</tr><tr id="_3b626cc4-be52-dc84-02d7-4ea01d8e1ac3"><td id="_d170a272-da44-1ebe-165a-3c415ca77e59" valign="top" align="left"><tt>m:nary</tt></td>
<td id="_5407c406-7658-ee26-7f64-2f8d4907efd1" valign="top" align="left">the nary classes</td>
<td id="_d9cedbd2-0466-6965-a0cf-fc9f266979c0" valign="top" align="left"><tt>m:chr</tt> carries the character</td>
</tr><tr id="_7fceae69-7f35-7652-a33b-88582e898936"><td id="_fc746bac-4125-3ac2-3782-e0d31a5d3714" valign="top" align="left"><tt>m:d</tt> with <tt>m:dPr</tt></td>
<td id="_f7a3680f-00c6-b17f-cc74-05860b597b76" valign="top" align="left"><tt>Fenced</tt></td>
<td id="_6174c0be-8cbe-c007-6aba-e9df804d18d9" valign="top" align="left">delimiter characters preserved</td>
</tr><tr id="_c8e17689-37ae-4618-f7f5-a7c24c6ceaf2"><td id="_6914058d-af41-3678-b9ba-07c69120cf7a" valign="top" align="left"><tt>m:m</tt>, <tt>m:mr</tt>, <tt>m:eqArr</tt></td>
<td id="_fa3f06e7-e9ec-a291-3a8c-c3bfdccee913" valign="top" align="left">table classes</td>
<td id="_fc02a1f4-f0ee-e645-5d31-1a8867f48353" valign="top" align="left">delimiters per properties</td>
</tr><tr id="_a132a4c2-0374-6cf8-66d9-71802e986005"><td id="_cf43fddd-efe7-79f8-c2f1-f5536cfd7fc5" valign="top" align="left"><tt>m:box</tt>, <tt>m:phant</tt>, <tt>m:groupChr</tt></td>
<td id="_ea7fd285-6f90-cead-3f2d-756beef2e11b" valign="top" align="left">the presentation classes</td>
<td id="_d1545c77-00e9-7398-bb5b-a1b733ae46ea" valign="top" align="left">per construct</td>
</tr><tr id="_d0cba718-4e91-78e0-132b-997b9f339be9"><td id="_3237c785-8634-8425-8573-20ccb7334a64" valign="top" align="left">marker run</td>
<td id="_26f00b98-f5cb-e4ee-f1c2-0bae2b56c334" valign="top" align="left"><tt>Uncertainty</tt></td>
<td id="_f6ded8ba-bd6c-7612-d51c-c0f840dfc7bd" valign="top" align="left">per PM 1002’s convention</td>
</tr></tbody>
</table>
</clause>

<clause id="_c0dcc26e-c563-3358-8ef4-1adbb16f1771" obligation="normative">
<title id="_a1584b3e-ec66-b03d-d138-c660a6366af6">The marker run in detail</title>
<p id="_746ef99a-3789-6c3d-0607-57a4a065bc87">The marker run is an ordinary <tt>m:r</tt> whose text matches PM 1002’s marker grammar. The reader scans for it at the start of a construct it marks; on a match, the construct’s fields come from the marker and the shape runs are skipped. A run that resembles a marker but is ordinary text — inside another run, or after the construct it would mark — is text. The convention is positional: marker first, shape after.</p>
</clause>

<clause id="_21c6238e-38ce-4fc1-0242-c289031137b4" obligation="normative">
<title id="_e55c871a-5bef-fac4-39b7-44156a5ef01f">Run properties</title>
<p id="_c2b5e97b-c2c5-ff57-b478-dde9bfc5cf81">Fonts, styles and script positioning in run properties map to the font style nodes and the script placement the model defines; properties without a model counterpart (kerning, colour) are dropped on read, as presentation the tree does not carry.</p>
</clause>

<clause id="_7e18ebb0-f9d1-2ab3-0dfd-2c4c3bd4d447" obligation="normative">
<title id="_275f63e4-934d-5ef9-e855-308141e0a595">Reading algorithm</title>
<p id="_5e0800bd-2dc5-b6ef-fb04-e8af5b10d628">The OMML reader walks the <tt>m:</tt> tree:</p>

<ol id="_663623a9-be85-b458-5d3a-31fa6629cec7" type="arabic"><li><p id="_ed50e81c-0d48-0b0a-6cee-d04f9506aa13">runs accumulate into content; a marker-matching run switches to marker handling;</p>
</li>
<li><p id="_1818af1f-909c-95ee-8c4a-a1faa40cc54a">construct elements (<tt>m:f</tt>, <tt>m:rad</tt>, script and nary elements, <tt>m:d</tt>, <tt>m:m</tt>) map per the table;</p>
</li>
<li><p id="_61d06e66-41f2-ca75-4431-3396659e54d6">delimiter and matrix properties select the table class and its fences;</p>
</li>
<li><p id="_a13862d7-93e1-49d5-9ac2-7b3b41e8a9fe">a marker reconstructs the following construct’s uncertainty node per PM 1002 and consumes its shape runs;</p>
</li>
<li><p id="_4f879ddd-20f0-aa04-7347-0c64402c0e8b">document-level properties outside the model are dropped as presentation.</p>
</li>
</ol>
</clause>

<clause id="_f7232750-499e-1cce-96ef-805d037c5832" obligation="normative">
<title id="_dad4d73f-b8ea-9d8d-a787-eac659f8ba65">OMML specificity of the model</title>
<p id="_2047ea36-05d8-6a54-33c8-357d4b235fc9">Two OMML constructs have model-specific treatment: pre-sub/superscript (<tt>m:sPre</tt>) reads to <tt>Multiscript</tt>, and the equation-array constructs read to <tt>Align</tt>/<tt>Eqarray</tt> with their alignment. Everything else maps one to one.</p>
</clause>

<clause id="_44601582-e5b9-cea2-bc08-99170fc5fc4e" obligation="normative">
<title id="_49ddd319-9be7-4552-00b7-d18fcb02ab8d">Writing matrices and nary constructs, concretely</title>
<p id="_9ac1afa2-0700-8bed-619b-2154ab6ff439">The table classes write to <tt>m:m</tt> with delimiter properties per class: <tt>Matrix</tt> plain, <tt>Pmatrix</tt> parenthesised, <tt>Bmatrix</tt> braced, <tt>Vmatrix</tt> barred, <tt>Cases</tt> with the asymmetric brace. The nary classes write to <tt>m:nary</tt> with <tt>m:chr</tt> carrying the character and the limits in <tt>m:sub</tt>/<tt>m:sup</tt>; a limit absent leaves the element empty rather than omitted, which is how OMML spells “no limit here”.</p>
</clause>
</clause>

<clause id="_e907bd6f-cbce-f550-a8c4-01fad259417a" obligation="normative">
<title id="_0b753c46-ec1a-1810-900d-c9aee9e3eb0d">The UnicodeMath interface</title>
<clause id="_9eb72a49-c96c-69c0-545b-2104335759a9" obligation="normative">
<title id="_0406d991-cbc7-3ce2-97b0-00157966812e">Reading</title>
<p id="_85165e71-5743-09df-5d33-3bb6951f01c5">The UnicodeMath reader accepts the linear format of UTR #28 as the implementation defines its surface: symbols, fractions, scripts, nary constructs, and the intent wrapper <tt>ⓘ("marker" visible)</tt>.</p>

<p id="_b1d6d4b0-5df5-8bf7-b30d-20fcc09cfe41">The wrapper is authoritative for uncertainty: the marker string inside the quotes carries the fields; the visible shape inside the wrapper is regenerated. The <tt>ⓐ(unit ...)</tt> form inside the wrapper carries the unit. Outside wrappers, the linear format reads per its own conventions — <tt>^</tt>, <tt>_</tt>, <tt>/</tt> grouping, named symbols from the registry’s UnicodeMath tokens.</p>
</clause>

<clause id="_4f46cbc8-a625-b24b-a1d3-00d651843b96" obligation="normative">
<title id="_df9c675b-7105-af99-ce75-d91791333d69">Writing</title>
<p id="_76223e2a-cd15-3c83-d3ce-794ad1fd9b82">The UnicodeMath writer emits per PM 1001 and PM 1002: the linear forms of the constructs, the intent wrapper for uncertainty nodes with the marker and the regenerated visible shape, and <tt>ⓐ(unit ...)</tt> for the unit.</p>
</clause>

<clause id="_4f8c1ce6-093f-1cca-f87a-35ed6edd436f" obligation="normative">
<title id="_e0df18e6-66c0-da7b-43a5-d3f40192be62">Losslessness</title>
<p id="_83cafda0-810b-3abc-f216-6d882b32ae23">UnicodeMath is lossless for the model’s constructs under the intent-authority rule.</p>

<example id="_cb892fd8-2403-ac1c-c4f9-cb240f83312c"><p id="_e96c6f45-cd6a-4145-11e1-294a93028791">Reading <tt>ⓘ("standard-uncertainty:concise(10.3,0.2)"10.3(2))</tt>. <strong>Expected outcome.</strong> a standard uncertainty node, notation concise, magnitude <tt>0.2</tt>; writing it emits the wrapper again with the reporting form visible.</p>
</example>
</clause>

<clause id="_cceb81c5-8714-f703-1a6c-69295b0b93d2" obligation="normative">
<title id="_a2051d49-e19f-5d2e-3a05-f4c17b5ed46c">Token families</title>
<table id="_ce347c01-048c-4429-a820-67f51cef827f"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_49fea5c6-0f1d-f564-f5dc-097e5d5e12b8">UnicodeMath token families</name>
<thead><tr id="_dab48f63-e094-c2d3-470c-4238e8c5c507"><th id="_05d87024-7136-dc07-b3cc-808534cad2f0" valign="top" align="left">Family</th>
<th id="_25cfccc3-4dc6-eedf-99d1-d4ac36fc21d5" valign="top" align="left">Shape</th>
<th id="_2eb9b7ea-e5ca-3a65-4590-d4d4cd474a1f" valign="top" align="left">Node yielded</th>
</tr></thead>
<tbody><tr id="_dca41300-8b47-6cb2-881b-78c9d83b6b37"><td id="_58204268-f806-d2ce-0386-8b0140df15f1" valign="top" align="left">literal characters</td>
<td id="_663edae4-57c4-b528-63cf-eca6ba55e475" valign="top" align="left">Unicode symbol characters</td>
<td id="_2645a2af-7d0c-2ea9-5ea9-8000d7473c13" valign="top" align="left"><tt>Symbol</tt> per registry entry</td>
</tr><tr id="_41ba250e-9799-e942-f741-764b02b0654e"><td id="_0d8e8dbf-37b6-de47-f093-f379052d2d07" valign="top" align="left">named tokens</td>
<td id="_13eb869c-28bd-3e39-aca5-fa9a856c9f92" valign="top" align="left"><tt>alpha</tt>, <tt>sum</tt>, <tt>infty</tt></td>
<td id="_145b0688-178b-fcab-77c6-a5321e6a063b" valign="top" align="left"><tt>Symbol</tt> per entry</td>
</tr><tr id="_ea810b6c-9ada-50b3-b0c7-9933d0a385c2"><td id="_b1d772f0-af04-4d14-737a-c28d4cf7e6d3" valign="top" align="left">fractions</td>
<td id="_179e65df-5b29-f61b-443c-fc3e29eb8d30" valign="top" align="left"><tt>a/b</tt>, <tt>(a+b)/(c+d)</tt></td>
<td id="_5221fcd6-c829-d167-a3b5-384bc991b5b0" valign="top" align="left"><tt>Frac</tt></td>
</tr><tr id="_0c898fe9-75c4-8d33-685b-f374d6c1918c"><td id="_7505d253-b3df-4a2f-79e5-23768eea336c" valign="top" align="left">radicals</td>
<td id="_eba4b844-1608-fc74-a189-5e1a28f87034" valign="top" align="left"><tt>√x</tt>, <tt>∛(x&amp;3)</tt></td>
<td id="_e93d09c3-bb5f-fa94-c1b8-c1537728f756" valign="top" align="left"><tt>Sqrt</tt>, <tt>Root</tt></td>
</tr><tr id="_f32c0b96-a506-93a5-67a1-a4c4662dda9c"><td id="_39d24cbc-373a-c8af-041f-11f379315e07" valign="top" align="left">scripts</td>
<td id="_ea33736b-633d-8122-a0b2-57ea6b95aea6" valign="top" align="left"><tt>x^2</tt>, <tt>x_1</tt></td>
<td id="_aac363a7-0384-f938-0d79-85c887e3123e" valign="top" align="left">script classes</td>
</tr><tr id="_3dba1d98-fffd-2520-e548-7afe293c6484"><td id="_1198da1d-4a78-cc82-f186-fefecd13cec0" valign="top" align="left">nary with limits</td>
<td id="_8e2d3a38-d0c3-d673-7fbb-e35cdec00acf" valign="top" align="left"><tt>∑_(i=1)^n</tt></td>
<td id="_3e42b090-8176-8544-d20c-6f38113c7a6c" valign="top" align="left">the nary classes</td>
</tr><tr id="_5381362b-bb95-25d8-165b-b8dda784ed0b"><td id="_b7af8fe9-c721-f9fc-e831-2b75ab704c67" valign="top" align="left">functions</td>
<td id="_9be42f69-f53f-fbb8-9639-1389d7f7171f" valign="top" align="left"><tt>sin</tt>, <tt>log_2 x</tt></td>
<td id="_bb89e34b-bc98-5494-d109-f59d87c40ec4" valign="top" align="left">the function classes</td>
</tr><tr id="_621aa485-2945-0ef8-b494-740efb788253"><td id="_9fca272b-8a5c-9c55-ca30-24af45b34340" valign="top" align="left">intent wrapper</td>
<td id="_b01a782a-8e75-9d14-67ee-04ffe7c82156" valign="top" align="left"><tt>ⓘ("marker" visible)</tt></td>
<td id="_d4b37a84-6631-408b-c7a0-a5a1c492471f" valign="top" align="left">per the marker; uncertainty per PM 1002</td>
</tr><tr id="_221a1ee9-3739-e1c0-9dae-69cb78af693e"><td id="_932153d8-e7ac-347a-1d86-d97091d8cc18" valign="top" align="left">units in wrappers</td>
<td id="_5af7eea1-805f-e109-ea88-f27224969a3e" valign="top" align="left"><tt>ⓐ(unit ...)</tt></td>
<td id="_3288328b-62af-ff4b-9cd8-1c68c0ed2431" valign="top" align="left">the unit embedding or unit text</td>
</tr><tr id="_33e2f25a-0408-c717-084a-3c135dd3b2eb"><td id="_cf5d1213-599c-4c2f-c928-043fe1899970" valign="top" align="left">text</td>
<td id="_24e32b1f-c76d-70c1-12fd-ebda46c8f8e3" valign="top" align="left">quoted strings</td>
<td id="_51581bca-0d30-0567-8046-db471089095c" valign="top" align="left"><tt>Text</tt></td>
</tr></tbody>
</table>
</clause>

<clause id="_de7d429d-6ca1-6a7c-4b63-58db95fe9f64" obligation="normative">
<title id="_f85d4724-d32a-f65a-bca8-d65f73b5efc6">The wrapper is the only comment channel</title>
<p id="_6b117ac8-94ee-3c6c-5bb2-adbe6ba67ac0">UnicodeMath has no comment or annotation mechanism the model carries; the <tt>ⓘ</tt> wrapper is the single channel for machine-readable intent. An <tt>ⓘ</tt> whose quoted text does not match the marker grammar is a reading error, not text — the wrapper is reserved.</p>
</clause>

<clause id="_b79fec7d-8de4-6161-8c53-9f593207b53e" obligation="normative">
<title id="_0f9eddc7-b88b-d52d-b74c-2958ac4a250e">Linear-format precedence</title>
<p id="_a7d321bf-4e98-9129-ebe3-1e3f5d9bd067">As with AsciiMath, the reader applies the linear format’s precedence and the corpus pins it. Fraction and script grouping in parentheses follows UTR #28’s conventions as the implementation defines them.</p>
</clause>

<clause id="_646620f6-0795-d0ed-beef-c9a00ffaf1f3" obligation="normative">
<title id="_1195e887-0a12-0eb0-e161-3f577e31373a">Reading algorithm</title>
<p id="_8e9fd6a8-60eb-77b4-dc5e-ae0b32ae6390">The UnicodeMath reader scans the linear text:</p>

<ol id="_18228cef-ec56-ee5e-4ac6-98f3e1534495" type="arabic"><li><p id="_598b0b24-9c94-b690-8c02-e9c6a390fafe">literal characters and named tokens read through the registry’s UnicodeMath tokens;</p>
</li>
<li><p id="_13062e67-9292-4355-71c5-5c97ac2b6811">structural characters (<tt>/</tt>, <tt>^</tt>, <tt>_</tt>, parentheses) build the corresponding nodes;</p>
</li>
<li><p id="_e02efdbf-f857-ab28-f8f0-65ee9884a7d2">an <tt>ⓘ</tt> opens a wrapper: the quoted marker reads per PM 1002’s grammar, the visible shape is skipped or regenerated, and <tt>ⓐ</tt> inside carries the unit;</p>
</li>
<li><p id="_29e97acd-da5d-6339-e16e-d3e1befb5f62">a <tt>ⓐ</tt> outside a wrapper is unit text;</p>
</li>
<li><p id="_71ae94ec-8b14-c337-eb06-eadfdf3a6dea">everything else reads per the linear format’s precedence, as the corpus pins.</p>
</li>
</ol>
</clause>

<clause id="_25a05f1f-99ae-2b3f-0382-5eb5dc12b904" obligation="normative">
<title id="_007eb6d9-73ee-3815-eecd-5e131b34b4ca">Why the wrapper skips and regenerates</title>
<p id="_649b1fa4-417a-341c-3c20-0f761c78e970">The visible shape inside a wrapper was produced from the marker’s fields; re-reading it would invite the stale-shape problem the marker exists to prevent. The reader reads the marker, reconstructs the node, and moves past the visible shape.</p>
</clause>
</clause>

<clause id="_ade9bccf-20fa-e5c8-c4dd-9be0fc17ec73" obligation="normative">
<title id="_3c9e0561-9ee6-44d9-2dc0-a61efe0fd55b">The LaTeX and HTML interfaces</title>
<clause id="_e4472465-ff4c-9414-384d-79c0bb8fef1d" obligation="normative">
<title id="_dc3282bb-b819-fd95-f74b-15e4ef25df92">LaTeX</title>
<p id="_6323d61e-7f34-aa37-0751-cc02958c46c8">The LaTeX reader accepts the fragment-level LaTeX the writer emits, plus the common mathematical core: commands of the registry vocabulary, environments for tables and alignment, and math-mode grouping. It does not accept document preamble, packages or free text outside math.</p>

<p id="_d9164bee-1c3b-7091-4d8c-838fb1501072">LaTeX is a lossless direction for the model’s constructs: writing and reading returns an equal tree, with the exceptions the registry records (constructs whose LaTeX rendering is approximate carry the approximation in both directions and are equal as trees).</p>

<p id="_a48731dd-eb47-bece-3656-72f508774f2b">The LaTeX writer emits per PM 1001 and PM 1002, with the statements of PM 1002 after the unit.</p>
</clause>

<clause id="_95404565-d0cb-7f50-9d58-663d0ac4f736" obligation="normative">
<title id="_d8c0dbd1-3384-92e2-e7bd-608845de4852">HTML</title>
<p id="_b2bf5ac0-8bed-604b-1ba2-c6fb0ac58228">HTML is a display surface. The writer emits an HTML fragment optimised for browser presentation: nested elements for structure, sub/sup for scripts, and the encodings of PM 1002 for uncertainty. HTML does not read: the interface has a writer only, and round-trip claims do not include it.</p>

<example id="_7e7e7cb0-61c7-e757-61e7-c2c11435be3d"><p id="_bb302c72-a73f-1454-1cd8-2b29e4cbff53">Writing the quadratic formula to HTML and to LaTeX. <strong>Expected outcome.</strong> the HTML fragment renders the same content with presentational markup; the LaTeX fragment is the lossless one; only LaTeX reads back.</p>
</example>
</clause>

<clause id="_2badcc9d-43ce-ded1-a67b-d9641dcff327" obligation="normative">
<title id="_c28d4a9b-9d54-6ea6-6a49-da76caa5b4bb">Command mapping</title>
<table id="_a1d51d64-86d6-df52-bfd7-f36632f9a1bf"><colgroup><col width="28.5714%"/><col width="28.5714%"/><col width="42.8572%"/></colgroup>
<name id="_12818090-7706-c6c4-4356-2296cf84c384">LaTeX commands to nodes</name>
<thead><tr id="_bff8847a-743e-5aca-a2e9-cf16c70ec8a3"><th id="_41b1525a-be5d-836e-1f0a-33a8efe08829" valign="top" align="left">Command or environment</th>
<th id="_3bc4218d-bd8b-691f-91d1-7eca623b35a7" valign="top" align="left">Node</th>
<th id="_293d9b66-cfe4-b01b-344a-d5ace11ec210" valign="top" align="left">Notes</th>
</tr></thead>
<tbody><tr id="_b58368b5-7f07-a5bd-4a9b-9972482f0ff9"><td id="_2ddf9234-19f0-6112-99f2-1e40d446aaa6" valign="top" align="left">registry commands</td>
<td id="_40cea17f-5f23-57b5-7152-938c5c30c1eb" valign="top" align="left"><tt>Symbol</tt></td>
<td id="_6951662f-7828-8b81-e625-569083e596a8" valign="top" align="left"><tt>\alpha</tt>, <tt>\sum</tt>, <tt>\infty</tt>, and so on</td>
</tr><tr id="_090a8793-139f-a15f-cc49-247c53f5cc89"><td id="_1fa3f328-21c7-e6cb-40dd-0e78fa179105" valign="top" align="left">digits and <tt>.</tt></td>
<td id="_93d5cea3-cf87-4440-a3d1-6864f1448287" valign="top" align="left"><tt>Number</tt></td>
<td id="_31318c45-478c-2849-41dc-66fee4f390c8" valign="top" align="left">in math mode</td>
</tr><tr id="_721823e0-baea-79f4-8bb7-82cb4fda28f7"><td id="_54bc6654-1d16-d3bc-b983-7ebe50445272" valign="top" align="left"><tt>\frac{}{}</tt>, <tt>\tfrac</tt>, <tt>\dfrac</tt></td>
<td id="_a1533270-640e-66bd-f787-b05ff5484e66" valign="top" align="left"><tt>Frac</tt></td>
<td id="_7cc986c3-3fc7-5f2a-5d4f-22142cacf523" valign="top" align="left">style variants to the same node</td>
</tr><tr id="_24262f48-8805-2a15-4be0-58deca5e80c3"><td id="_d3350608-17ce-3571-2517-cac1d675af94" valign="top" align="left"><tt>\sqrt{}{}</tt>, <tt>\sqrt[]{}</tt></td>
<td id="_e24488fb-a0d9-0073-7243-ef55a197f7ff" valign="top" align="left"><tt>Sqrt</tt>, <tt>Root</tt></td>
<td id="_3a9f25a3-7ec0-2159-a214-73331606c900" valign="top" align="left">optional degree</td>
</tr><tr id="_2bcae1f0-66dd-6599-703f-62ac980dd468"><td id="_efcce581-3436-2039-1f40-69eda0422d19" valign="top" align="left"><tt>^{}</tt>, <tt>_{}</tt></td>
<td id="_181e5a09-2ed3-61ea-14c5-bc77e37ebdab" valign="top" align="left">script classes</td>
<td id="_309e28e0-0bee-6c46-dbe2-78168a104cc1" valign="top" align="left">grouping per braces</td>
</tr><tr id="_7e92b0e8-f274-68a4-d3e6-61bb8f247a7d"><td id="_078717e6-913b-ac81-bb80-15efb3194806" valign="top" align="left"><tt>\sum_{}^{}</tt> and kin</td>
<td id="_f773fce7-9add-b7d2-ddf2-9618a81d533e" valign="top" align="left">the nary classes</td>
<td id="_b2246e1c-550d-f71b-c28e-ddac49a0415e" valign="top" align="left">limits as given</td>
</tr><tr id="_c6deafbd-dad4-9b72-8172-d6ce527d557d"><td id="_1fcc8a3d-752a-6f86-2097-35bcb7e34ebe" valign="top" align="left"><tt>\left..\right</tt></td>
<td id="_8997f119-60ed-0818-8adc-0851c10b8ecd" valign="top" align="left"><tt>Fenced</tt></td>
<td id="_cd989cd3-8446-d0e0-a3d1-5d97fa62d226" valign="top" align="left">delimiter pair preserved</td>
</tr><tr id="_044ff564-e379-799b-073b-4a1bfc36dbcf"><td id="_38c722e6-cda4-dc34-4ba0-8cb7ecfd4c0c" valign="top" align="left"><tt>matrix</tt>, <tt>pmatrix</tt>, <tt>cases</tt>, <tt>aligned</tt></td>
<td id="_b17084a4-64f5-7a1e-eb19-00af3cb44afd" valign="top" align="left">the table classes</td>
<td id="_39adec9a-8f61-f1d1-cab0-48df9885da8b" valign="top" align="left">environment per class</td>
</tr><tr id="_25ac954d-6399-c615-3622-491259777041"><td id="_7ce5578a-b7a2-fc2d-9ec0-b9b966d2a187" valign="top" align="left"><tt>\text{}</tt>, <tt>\mbox{}</tt>, <tt>\mathrm{}</tt></td>
<td id="_1c688a2b-504e-2ace-08bd-5e4c68fddcc1" valign="top" align="left"><tt>Text</tt>, font styles</td>
<td id="_a5716251-bc3f-8522-aea6-2c7d5aa7ea20" valign="top" align="left">per command</td>
</tr><tr id="_54b137f4-4936-a3b2-8c7f-1af733fed8dc"><td id="_6ef6e1b9-503b-d7d9-e51d-f0b5ce64b79a" valign="top" align="left"><tt>\hat</tt>, <tt>\bar</tt>, <tt>\vec</tt> and kin</td>
<td id="_136b0811-670c-2849-b9e5-518667b0e8f0" valign="top" align="left">the accent classes</td>
<td id="_3e6af634-b5ea-1b1b-2c4b-4bd8875c44e8" valign="top" align="left">per command</td>
</tr><tr id="_58a8bb8d-fbe1-662d-9c91-8494c3fc0f90"><td id="_557eab52-ca10-f124-5185-dca63f3efc46" valign="top" align="left"><tt>\mathbf{}</tt> and kin</td>
<td id="_6a1fce2b-da04-5559-3160-21604f62ebdc" valign="top" align="left">font styles</td>
<td id="_79f3e243-6cbb-618d-2379-c117a4d210dd" valign="top" align="left">per command</td>
</tr><tr id="_6d55b169-d5b3-e4fc-3bc4-aa627ce99c4a"><td id="_44b2bcb4-670f-3486-247f-28df938de991" valign="top" align="left"><tt>\textcolor{}{}</tt></td>
<td id="_fd6c51ab-b6e1-fc12-2adc-adbacb21b9db" valign="top" align="left"><tt>Color</tt></td>
<td id="_f952d259-5623-4fca-b6f1-ae3e837184fa" valign="top" align="left">colour argument carried</td>
</tr><tr id="_f1f11b3b-e0ef-1518-e512-368914db24e0"><td id="_6ad22e5b-2b58-9355-fbca-598ea013cf3f" valign="top" align="left">uncertainty shapes</td>
<td id="_de7bb3b4-3cf6-7e89-d8e4-4a93b44ca4e7" valign="top" align="left"><tt>Uncertainty</tt></td>
<td id="_5be58d1d-5337-5422-d776-f521054853b1" valign="top" align="left">per PM 1002’s LaTeX encodings and statements</td>
</tr></tbody>
</table>
</clause>

<clause id="_1b0b6bb7-9053-9b54-1a88-7d5a23a9770c" obligation="normative">
<title id="_6f2c9720-7a08-6a6a-92b8-f6690c7e9dc8">What the LaTeX reader refuses</title>
<p id="_aba34df7-2ce0-94da-a715-60c2e358e0b6">Preamble, <tt>\usepackage</tt>, document environments and free prose between math are refused: the interface is a math fragment interface. A document that carries formulas in prose extracts the formulas first; that extraction is outside this interface.</p>
</clause>

<clause id="_b1ddaeb2-2166-e005-b3af-e5fec3214743" obligation="normative">
<title id="_78d1f69e-07b1-142b-c87a-b2f37993e9d3">The HTML writer’s output shape</title>
<p id="_e416b033-feda-c2d9-a239-ea3bcf30a940">The HTML writer emits nested presentational elements: spans for structure, <tt>sub</tt>/<tt>sup</tt> for scripts, fraction layouts with borders, tables for matrices, and the statement spans of PM 1002. Class names are stable within an edition and the corpus freezes them.</p>
</clause>

<clause id="_4491870c-5f44-07ba-a715-c36b5264d4fa" obligation="normative">
<title id="_2830f3cc-1be0-f2e9-0545-15a4c7ce126d">An HTML fragment, concretely</title>
<p id="_ccf92796-2bcb-80ba-cef7-ec95226163ff">The HTML writer’s shape, for the power example of PM 1001:</p>

<sourcecode id="_de38f87d-ca1b-4c88-e6b4-522adcf305b6" lang="html"><body>&lt;span class="plurimath-formula"&gt;&lt;i&gt;x&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/span&gt;</body></sourcecode>


<p id="_96408651-1d5a-09d9-7082-4f86202addd2">The class names are the writer’s stable surface: editions may add classes, never rename them. Presentational decisions (fonts, sizes) belong to the host page’s styles; the fragment carries structure and semantics only.</p>
</clause>

<clause id="_7e026f44-9628-6e4c-84c6-da0f40d568a4" obligation="normative">
<title id="_ae35d346-d6dc-5620-2564-537c346109d4">LaTeX shape, concretely</title>
<p id="_45110378-75f5-5d50-21ce-8e319c309129">The same tree in LaTeX:</p>

<sourcecode id="_1e0e8283-2827-4414-c188-5d36149af02b" lang="latex"><body>x^{2}</body></sourcecode>


<p id="_f31ccbf9-f96a-d87b-db9d-a054edf6072a">and the quadratic formula:</p>

<sourcecode id="_1753e10f-2b4b-3075-3d35-68ce624e8306" lang="latex"><body>x = \left(-b \pm \sqrt{b^{2} - 4ac}\right)/(2a)</body></sourcecode>


<p id="_f91a6236-8a1f-29aa-3b3e-66fb563b8054">The writer emits the linear fraction form when the tree was read from one and the <tt>\frac</tt> form when built as <tt>Frac</tt>; both read back to equal trees, and the round-trip corpus carries both shapes.</p>
</clause>
</clause>

<clause id="_2db3bad0-68c5-b61d-48f1-3ee679815770" obligation="normative">
<title id="_ecea8948-c466-faf3-e17f-afef3bc49a5e">Image rendering</title>
<clause id="_9d91d8bd-0911-3b1e-34c9-14c81a0e3781" obligation="normative">
<title id="_c9728824-86ff-df68-c33f-a1ea207a51b6">The renderer</title>
<p id="_f8bfe345-e0e4-6334-da58-1bc688b57fc5">Beyond the text surfaces, a tree renders to images — SVG, PNG, PDF and PostScript — through the optional renderer, which delegates to the <tt>lasem</tt> library. Rendering goes through one entry point, <tt>render(text, type, format:, **options)</tt>: it parses per clause 6 and renders the parsed tree to the requested image format.</p>
</clause>

<clause id="_ff724322-4368-a1ff-c7e3-79fa09eeba46" obligation="normative">
<title id="_5fa92d02-2970-e576-f2fe-4f99c509259b">Availability</title>
<p id="_fa0069c4-b5f3-5234-819e-6da135650aef">Image rendering is available when the <tt>lasem</tt> gem and its native extension are present; it is never available under Opal. Availability is queryable and never raises: <tt>render_available?</tt> answers the question, and <tt>render</tt> raises the typed errors when called without it.</p>
</clause>

<clause id="_65756016-a4e1-20ef-1e18-1fe1a086b519" obligation="normative">
<title id="_278070c2-57e7-c537-1e0e-c510fc632e2b">Failure</title>
<p id="_5399d92e-48c8-edfd-653a-23e49a04d74d">The renderer’s failures are typed: <tt>RenderingUnavailable</tt> when the library is missing, <tt>UnsupportedRenderFormat</tt> for a format it does not offer, <tt>RenderingFailed</tt> when rendering fails on a tree that parsed. Parsing failures surface as the parse errors of clause 6 — the renderer never masks a parse failure as a rendering failure.</p>

<example id="_f0647880-5527-1ead-bf5d-cb25d4af0852"><p id="_a5889071-0e87-04de-2ce1-5d306baaab12"><tt>render("x^2", :asciimath, format: :png)</tt> with lasem installed. <strong>Expected outcome.</strong> the PNG of the rendered formula. The same call with lasem absent raises <tt>RenderingUnavailable</tt> before any parsing work is repeated. A malformed input raises <tt>ParseError</tt>, not <tt>RenderingFailed</tt>.</p>
</example>
</clause>

<clause id="_c302ab2d-131f-1309-3e86-39559ff757e5" obligation="normative">
<title id="_135be1fa-e749-62af-f5ed-d6422579e771">The rendering pipeline</title>
<p id="_1b498a15-3824-28fb-d770-e0583d797882">Rendering composes two boundaries: parse per clause 6, then render the tree to the image format through the library. Options split the same way — parse options to the parse step, the rest to the renderer. The pipeline is one entry point so that callers cannot interleave a broken state: either the image bytes or a typed error, nothing in between.</p>
</clause>

<clause id="_e3dcf9af-6b53-b37e-bcde-20e8bc8be8e4" obligation="normative">
<title id="_9574b435-8324-753e-5a08-118bcfd7bece">Formats and their properties</title>
<table id="_34de7181-42c1-fc70-5f63-c8b0e9a8c1c7"><colgroup><col width="28.5714%"/><col width="28.5714%"/><col width="42.8572%"/></colgroup>
<name id="_100484bc-bdca-1435-1f3d-9974af6f35de">Image formats</name>
<thead><tr id="_252e2458-f206-2cd9-9a08-993f47bc9d5c"><th id="_c36795ce-9342-58e3-20b4-dbf7a2490f06" valign="top" align="left">Format</th>
<th id="_d52371a6-f8de-3bb2-3f3f-f288e8a0ebe3" valign="top" align="left">Bytes</th>
<th id="_3a7d6339-4014-83c4-05eb-ca6b55d29061" valign="top" align="left">Notes</th>
</tr></thead>
<tbody><tr id="_9dede267-ce06-e6ab-0930-47edc8245b0c"><td id="_c7176cca-71cc-132f-6542-b42f8f3b71fd" valign="top" align="left">svg</td>
<td id="_0f4e1879-5ec2-504d-38fc-8a69ac5ee22f" valign="top" align="left">vector</td>
<td id="_908000a8-f456-212c-bd25-1729b7262a72" valign="top" align="left">the default</td>
</tr><tr id="_6d696075-871e-55d7-b831-9c69892b6f65"><td id="_02cb1f2c-c0bb-4cf0-efc4-2c9549b0dd4b" valign="top" align="left">png</td>
<td id="_a3733ca5-4f57-d768-302a-a2232542da98" valign="top" align="left">raster</td>
<td id="_bac3f6b5-073b-71bb-041d-9e5fd131c150" valign="top" align="left">width options apply</td>
</tr><tr id="_e3cdc80a-a269-6dc1-7fa9-cee859011a17"><td id="_6a016237-7418-1173-9f46-6486eb6ba389" valign="top" align="left">pdf</td>
<td id="_e692d416-3b3b-53f6-7819-a7c14ab303f8" valign="top" align="left">vector page</td>
<td id="_5d8e72d1-ade7-b3ea-039e-6d64b13a76a2" valign="top" align="left">one formula per page</td>
</tr><tr id="_f09766d9-361d-35c3-e6ee-480d2117bc25"><td id="_9c0d301b-6d4c-c8e2-9878-f1dca544c1c3" valign="top" align="left">ps</td>
<td id="_7cfe3a96-5451-bd50-e95a-6f0e5565b74c" valign="top" align="left">vector page</td>
<td id="_179a85ba-fb13-6b00-6b16-27b065a310ec" valign="top" align="left">as pdf</td>
</tr></tbody>
</table>

<p id="_7ea2d1af-1275-5790-931c-9c7b84019f98">The corpus freezes one image per format at a reference size; raster differences at other sizes are not drift.</p>
</clause>

<clause id="_1d824e94-11be-190c-bb79-a058a64d1e26" obligation="normative">
<title id="_af7e9ff4-db09-0317-28b4-72e38f02f0fd">Availability and platforms</title>
<p id="_d8858d4b-f4d4-c5b0-8c1b-9bc21ec60a7e">The renderer’s availability follows the library’s platform support: native where the extension builds, absent under Opal and on platforms without the native stack. Applications probe availability once and degrade to text surfaces where images are unavailable; the interface makes degradation explicit rather than failing mid-document.</p>
</clause>

<clause id="_6c988e3f-a829-81df-76d7-22414a1b044e" obligation="normative">
<title id="_7809c758-31b7-d3f6-b453-204d1aa99ecd">Rendering and the model version</title>
<p id="_848b64a9-3890-778a-85a5-da7912831a91">Image output depends on the library’s rendering of the intermediate form; it is byte-stable per model version plus library version, and the corpus records both. A library upgrade that changes bytes is a corpus regeneration with provenance, the same discipline as any other byte change.</p>
</clause>
</clause>

<clause id="_ecf1365c-4075-484a-c179-d676f9ddcffa" obligation="normative">
<title id="_dec7ff51-77a7-9d97-49fc-57a6459469c3">Round trips</title>
<clause id="_495901f0-6a88-0553-efb8-9b0ace11a430" obligation="normative">
<title id="_d2f9ea1a-52aa-452d-adf0-3468d0b0ee95">The lossless directions</title>
<p id="_b211bc46-a1fe-d0af-08e1-cd4de9495bd0">The lossless directions of the system:</p>

<table id="_500b363d-574b-2e21-8a73-be1e12782e08"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_25965709-bd36-5994-bf35-8fc896644398">The lossless directions</name>
<thead><tr id="_f1386f5d-c4d9-6740-ff59-34bad9924553"><th id="_38c3a1a6-1220-84b3-7786-098ffdff33cb" valign="top" align="left">Format</th>
<th id="_8281f74f-c084-0c4b-947f-ca22556edc83" valign="top" align="left">Round trip</th>
<th id="_86666843-5d9b-7680-f5b8-2411e0690f23" valign="top" align="left">Exceptions</th>
</tr></thead>
<tbody><tr id="_d5dd28d0-3dd5-5377-05a3-4feb15c586a0"><td id="_65832acc-19e9-1cd0-ab87-d3611669b9fa" valign="top" align="left">AsciiMath</td>
<td id="_5eaa8dc9-5f75-2565-6167-24f9cb2fe9ce" valign="top" align="left">yes</td>
<td id="_79660b1d-4dff-1717-1956-43bdcd43381e" valign="top" align="left">none</td>
</tr><tr id="_4165aeaf-c2aa-f77c-0442-d360843c9351"><td id="_282a0a2c-edc2-c4d5-2839-51c6c7b8e2c3" valign="top" align="left">MathML</td>
<td id="_9ef589c3-bd91-1744-3764-76e38892ce61" valign="top" align="left">yes</td>
<td id="_cada0d3e-fb38-c458-4436-b1211ec5ada0" valign="top" align="left">constructs outside the model</td>
</tr><tr id="_a02761c5-96f3-a2a3-d906-798c3e3b4ec5"><td id="_fff6b401-4864-2a68-5a4b-bafca415af20" valign="top" align="left">OMML</td>
<td id="_1258cd89-5a54-084e-0965-9456c7ffd634" valign="top" align="left">yes</td>
<td id="_43981e5d-45dc-dda7-9fee-e30ee9f4c34c" valign="top" align="left">constructs outside the model</td>
</tr><tr id="_983931ff-4498-22ad-af17-6a1e59fbe047"><td id="_ee09488c-620d-312e-1088-262c27365fef" valign="top" align="left">UnicodeMath</td>
<td id="_5cc6d31b-2ac8-d7dc-589d-a9b28a3c89f1" valign="top" align="left">yes</td>
<td id="_8c8b57c7-4e50-6ceb-1447-d66330b0f4b8" valign="top" align="left">constructs outside the model</td>
</tr><tr id="_20c0ed19-328f-6a8f-7fe0-32b629f515de"><td id="_d2476787-c870-e0f4-61ac-1ab1b19438db" valign="top" align="left">LaTeX</td>
<td id="_860ae6b3-f2f9-1759-f1c4-11208d68153d" valign="top" align="left">yes</td>
<td id="_5490847d-0b21-2469-2e68-f27ff1e54a2b" valign="top" align="left">the registry’s approximate renderings</td>
</tr><tr id="_f5cfae04-d4e0-a3c9-36fa-1ec4e299013e"><td id="_c1a1805c-e293-03cb-4426-fa8bf9cbd07f" valign="top" align="left">HTML</td>
<td id="_cca01820-bfe3-66ad-1616-fd3a9ff324f9" valign="top" align="left">no</td>
<td id="_8e95c4d0-35e5-bfdb-6d73-e06bb9f95d16" valign="top" align="left">display surface; no reader</td>
</tr></tbody>
</table>

<p id="_10a5f1be-10ac-906f-f4d1-d3a26c49361a">A round trip composes the writer and the reader of one format: <tt>read(write(tree))</tt> equals <tt>tree</tt>, under the structural equality of PM 1001, for trees built from the model’s constructs. The <tt>input_string</tt> after a round trip is the written form, not the original — identity of trees does not depend on it.</p>
</clause>

<clause id="_7bc52a5d-b09b-db3f-544e-9e725d9e28dd" obligation="normative">
<title id="_9302c949-0cb8-57ba-0bd0-fee285463365">What survives</title>
<p id="_8354656e-3b0b-3be4-2ea5-83b7c9179a6f">Every model field survives every lossless round trip: operands, order, uncertainty categories, fields, notation, interval kinds, units, intent annotations. The encodings of PM 1002 were designed so that no lossless format is the weak link: each carries the marker or the call that reconstructs the node.</p>
</clause>

<clause id="_396f0007-9190-4bb5-999a-bfbc3f65a917" obligation="normative">
<title id="_6a4af4cb-51f3-7b87-111d-2a45a6bd4bb8">What does not</title>
<p id="_2d815c52-8376-29a9-78ad-7045e7c519e0">Three things do not survive, by design and stated here so that no one searches for them:</p>

<ul id="_4be145e2-c268-ca67-965a-bef3b2131afb"><li><p id="_5a6e1193-560c-30ef-000f-01f9dd1cb95c">the original input text (the <tt>input_string</tt> after a round trip is the written form);</p>
</li>
<li><p id="_c2ada189-75d4-fe3f-e144-5f673ea52811">presentation choices that live outside the tree — display style survives, ad-hoc spacing does not;</p>
</li>
<li><p id="_86e1aa28-0282-1570-8231-8765891f2a00">constructs outside the model, which read to their closest representable content on the way in and therefore cannot survive a round trip unchanged.</p>
</li>
</ul>

<example id="_ad7284a2-26c4-4f63-3ddb-949ecd058a17"><p id="_ff669778-bfcd-8308-5883-47e8a5d18011">A tree with a concise uncertainty node round-tripped through AsciiMath, MathML, OMML, UnicodeMath and LaTeX, then read back. <strong>Expected outcome.</strong> the four lossless round trips each return an equal tree, notation concise everywhere; the LaTeX output is not read back and makes no claim.</p>
</example>
</clause>

<clause id="_6e9090f8-843c-d10b-5b43-6e821971a394" obligation="normative">
<title id="_72d5562c-b222-2ab1-36ba-e8376440faa7">A worked round trip</title>
<p id="_6008de3b-ee8a-246c-f6df-f14ab24b435e">Start from the tree of Result two of PM 1002’s Annex D: the expanded uncertainty <tt>10.3 g, U = 0.5 g (k = 2, p = 95%)</tt>.</p>

<ol id="_ef93a968-93b9-90b2-d2e6-48a8c9e28838" type="arabic"><li><p id="_92a876c2-ed75-61a6-0288-5a4b2b613e7a">Write to AsciiMath: <tt>uexp(10.3, 0.5, 2, 0.95) "unitsml(g)"</tt>.</p>
</li>
<li><p id="_c9302bce-2ebf-1ca5-f06f-69023839f4b9">Read it back: the tree, equal, <tt>input_string</tt> now the written call.</p>
</li>
<li><p id="_4d6e9ffe-6175-3f91-10eb-181ede0d19bc">Write to MathML: the intent <tt>expanded-uncertainty(10.3,0.5,2,0.95)</tt> over the fenced ± shape.</p>
</li>
<li><p id="_5bc2ad15-dc2c-3b71-ccce-d006de95ff23">Read that back: the tree, equal again.</p>
</li>
<li><p id="_37989acb-8b55-4bdb-89d0-d79740fc087b">Write to LaTeX: <tt>(10.3 \pm 0.5) g~(k = 2,~(p = 0.95))</tt>-shaped output.</p>
</li>
<li><p id="_30d56105-a3a0-b637-f752-e563fabb2c5f">Stop — LaTeX does not read back; the claim ends at the bytes.</p>
</li>
</ol>

<p id="_8be368ee-8b93-1d9e-8a3a-64afeff1e693"><strong>Expected outcome.</strong> after each lossless leg the tree is equal to the original in every field; the <tt>input_string</tt> differs at every leg, and identity is unaffected.</p>
</clause>

<clause id="_226913ec-3719-157e-0f7b-c65cec6b882c" obligation="normative">
<title id="_d3f12ca3-59ac-9de7-09b9-9158b0443555">Round trips through different formats</title>
<p id="_dc6a4069-0b26-16cd-32d0-b081fab878dc">Reading one format’s output with another format is not a round trip; it is two round trips joined by the tree. The composition works because every reader yields model trees and every writer consumes them: AsciiMath in, OMML out, OMML read, HTML out — each boundary checks per its own clause.</p>
</clause>

<clause id="_d0d63d04-0ace-5fd7-fe1f-cc4928d91ff3" obligation="normative">
<title id="_5a3358de-9ea8-f425-c0f6-2296b2dc9e96">The corpus and the claim</title>
<p id="_724dffab-376d-3f1d-5cf0-f3c0a7886b49">The round-trip corpora freeze, per format: a spread of trees covering every node family, the uncertainty categories, units, and the registry’s approximate-rendering cases. A conforming implementation replays them all; one failure is nonconformance.</p>
</clause>
</clause>

<clause id="_533a00b5-273f-5023-1e49-41e078c4b330" obligation="normative">
<title id="_38d9a667-a675-9e7d-488d-5235e796cf9d">Conformance</title>
<clause id="_d3f555e3-dd11-4bd0-ffe7-44fdd7b060f4" obligation="normative">
<title id="_a1520fdb-f7c0-a1d2-3cc3-4f2d3bb760e5">General</title>
<p id="_926fb369-f2ce-096e-7d70-e666682bea0b">Conformance to this document is claimed per interface class. Every claim is discharged by replaying frozen vectors; nothing here is satisfied by assertion.</p>
</clause>

<clause id="_f9bfd89b-0735-344b-8fda-cee4b8ff1029" obligation="normative">
<title id="_488a4dbb-1c03-c44b-726d-edc4a7fa28d0">Conformance classes</title>
<table id="_ddcbccac-964e-7656-eb10-80b0279d9fed"><colgroup><col width="14.2857%"/><col width="42.8571%"/><col width="42.8572%"/></colgroup>
<name id="_4657f873-49e3-53b7-9742-9641be881667">Conformance classes</name>
<thead><tr id="_619df1f5-6dee-66aa-0838-6fe6760a3bcc"><th id="_6da678e6-d932-8cce-72dc-9823bb5c22ef" valign="top" align="left">Class</th>
<th id="_35147c9b-1c88-94ca-c8eb-c0e65193eb26" valign="top" align="left">Licenses the implementation to claim</th>
<th id="_eaf5a509-5734-31cc-5a89-4cf5ca00ce34" valign="top" align="left">Replay requirements</th>
</tr></thead>
<tbody><tr id="_57fffceb-7ad1-8451-4c06-c26bd911c8dd"><td id="_dec01c9b-4bd1-3088-ddf8-6e971bc79d3d" valign="top" align="left">read-asciimath</td>
<td id="_59711006-60e6-3633-f484-dfdf1c745e42" valign="top" align="left">reads AsciiMath per clause 8, including the uncertainty reading rules</td>
<td id="_12ab7ce5-9c7e-5807-f300-80b5a6c85f10" valign="top" align="left">the AsciiMath reading corpus, tree-identical replay</td>
</tr><tr id="_547393fe-f9b0-899b-c273-9a9ef3b32785"><td id="_c017e5c4-5e70-edb3-df86-650f3112d44a" valign="top" align="left">read-mathml</td>
<td id="_f77f584b-1efa-4b5c-f782-fcc65da79f53" valign="top" align="left">reads MathML per clause 9</td>
<td id="_18f2728b-5aa4-56e8-e23a-b0a55d5a239f" valign="top" align="left">the MathML reading corpus</td>
</tr><tr id="_0b30e018-fb26-4bd7-17b3-06ca06e7a588"><td id="_d4cde759-9342-b766-f6dc-0e0c7af220d7" valign="top" align="left">read-omml</td>
<td id="_3dd754c1-f70d-bf14-1a49-6476c603ed22" valign="top" align="left">reads OMML per clause 10</td>
<td id="_9b0272fe-ab88-0827-c44b-1a7e59207639" valign="top" align="left">the OMML reading corpus</td>
</tr><tr id="_b53f6d50-2006-4ae4-cc7e-37afdb0d38cf"><td id="_2c539bcd-b3b7-6380-3a47-84def9ad73c7" valign="top" align="left">read-unicodemath</td>
<td id="_a9c27791-36a5-c988-e284-f26bb234b155" valign="top" align="left">reads UnicodeMath per clause 11</td>
<td id="_6a3ceb66-b35f-d4cf-fe65-857723079297" valign="top" align="left">the UnicodeMath reading corpus</td>
</tr><tr id="_cec33f5f-0973-0ae0-02bc-8f87635a4f01"><td id="_fb494333-36c4-3107-3cb7-b9bbb84cb2f2" valign="top" align="left">read-latex</td>
<td id="_8f63a393-dc85-f7cb-1840-f6bb60fe43c4" valign="top" align="left">reads LaTeX per clause 12</td>
<td id="_531c3355-1e29-0a38-a86d-3495d810c22e" valign="top" align="left">the LaTeX reading corpus</td>
</tr><tr id="_2233aa91-94fe-9d70-f2cc-6b1b288a6d94"><td id="_b837e6e7-0393-3205-a5b7-2a3cf69ca357" valign="top" align="left">write-&lt;surface&gt;</td>
<td id="_6a46ab0c-fb21-a462-664c-f5ccc1a1f420" valign="top" align="left">writes a surface per clause 7 and PM 1001/1002</td>
<td id="_4bb1c098-f593-f047-1c78-174c10f798ba" valign="top" align="left">the surface column of the render corpus, byte-identically</td>
</tr><tr id="_aa902ab6-ba74-aea1-68b1-c9fa5767ac2f"><td id="_639b0a01-7d80-aa25-3080-e6c07db1aae9" valign="top" align="left">roundtrip-&lt;format&gt;</td>
<td id="_c9a5c7c3-1cda-7037-6a0b-2d14d78ca4a8" valign="top" align="left">the lossless claim of clause 14 for a format</td>
<td id="_bd18abcc-bf9e-fba8-d29c-474fec1b1bf4" valign="top" align="left">the format’s write-then-read corpus</td>
</tr><tr id="_f406936f-1bde-821e-abfd-a25102ade306"><td id="_190f7ce7-e272-99b8-5913-6f8f1fc523f0" valign="top" align="left">render-images</td>
<td id="_f86a3ace-b5e6-dca2-b131-b929476afc2f" valign="top" align="left">image rendering per clause 13</td>
<td id="_e1855a54-9efc-87e7-5f2b-971ebbce3ccd" valign="top" align="left">the image corpus, byte-identically</td>
</tr><tr id="_4a136fc1-970d-9d66-8ddb-bc69fe1902e7"><td id="_ba97448b-7ac6-8579-77c8-9334c6a3407e" valign="top" align="left">full-interfaces</td>
<td id="_45363966-2622-ee78-3a6a-822560b7e0f4" valign="top" align="left">all of the above</td>
<td id="_3063e630-5827-1b57-5491-81c0a2611962" valign="top" align="left">all corpora</td>
</tr></tbody>
</table>

<p id="_f45066b1-98bb-2aec-cff4-a4591ba2c505">A <tt>read-&lt;format&gt;</tt> claim carries the model claim of PM 1001; a <tt>roundtrip-&lt;format&gt;</tt> claim carries both directions’ claims.</p>
</clause>

<clause id="_1e13d959-bd51-875f-0f66-09cc09f784f5" obligation="normative">
<title id="_b593ce11-deff-ab20-d6f5-0df85a893af4">The corpora</title>
<p id="_cc74ec0a-baab-537a-72be-24727004d877">The reading corpora are frozen sets of inputs with frozen trees; the round-trip corpora are frozen trees replayed through write and read. Entries state provenance and never change within an edition.</p>
</clause>

<clause id="_c8ae8b76-f4d8-797e-00e3-16d9a32b2abf" obligation="normative">
<title id="_bab34d4d-8760-3899-9a0d-880fa4485bb3">Drift</title>
<p id="_a94789a4-1fda-014b-ffbc-39bb2c696803">A reader that yields a tree differing from the corpus for the same input does not conform. A writer whose bytes differ from the render corpus does not conform at the corpus’s model version. Drift is resolved by fixing the implementation or moving the model version, and recording which moved.</p>
</clause>

<clause id="_527ec3d3-47a1-7836-0392-bf1c508c34e3" obligation="normative">
<title id="_36ed055e-7f64-29f6-58e0-1556997fe8b5">Claiming</title>
<p id="_6b3a9aa4-7cab-bb9c-3d0a-49e6beecdfd5">A conformance claim names its classes, the model version, and the corpus generation. A claim without a corpus generation is not checkable and is not a claim.</p>
</clause>

<clause id="_a999163d-e8d1-e389-4f11-8113238cfa9f" obligation="normative">
<title id="_365edfa7-4b8a-4a83-db79-968e83a64aec">Independent implementations</title>
<p id="_a287ffcd-078d-b081-e248-77e6c0c45d24">The contracts are written for more than the reference implementation: an independent reader that yields model trees per clause 6 and passes the reading corpora conforms, whatever its internals. An independent writer that passes the byte corpora conforms, whatever its codegen.</p>
</clause>

<clause id="_e865c857-dd20-2e3b-a3a4-9ca140cd0048" obligation="normative">
<title id="_5f85de3d-0d46-fcf7-c165-f29d9d777d64">The error corpus</title>
<p id="_dcdf984f-5533-0242-d33b-e8a4c8b1cdeb">The typed errors are part of the contract and carry their own vectors: each error class has corpus entries whose expected outcome is the error with its message shape. An implementation that succeeds where the corpus expects a refusal does not conform — refusals are behaviour, not friction.</p>
</clause>

<clause id="_14ba7e63-a91f-f9fb-7a56-69da6aea2e0c" obligation="normative">
<title id="_e3d5f2b4-017c-5fc2-44cb-40e10cce3682">Corpus provenance</title>
<table id="_8bd41049-e9e6-1f58-5369-5be11df67b41"><colgroup><col width="33.3333%"/><col width="66.6667%"/></colgroup>
<name id="_bf090655-3614-b325-843a-a0d0bab3287f">Evidence each corpus entry carries</name>
<thead><tr id="_707a51e6-540d-e856-4923-e5057e61ea30"><th id="_eb1a448d-bcf1-2cfe-5f98-9f13a0b566f1" valign="top" align="left">Field</th>
<th id="_35a2671f-167c-4746-6363-ba5bda8a8d57" valign="top" align="left">Content</th>
</tr></thead>
<tbody><tr id="_3cc70353-74ef-fdcd-7d68-ab53809c0625"><td id="_9233ad4a-7f18-7196-c430-57c70179a0c3" valign="top" align="left">input or tree</td>
<td id="_99d5244b-f4f5-a5a1-0cb0-46c7a18d71c5" valign="top" align="left">the frozen input text, or the frozen tree for round-trip entries</td>
</tr><tr id="_2806f61f-0711-f7b1-8f05-32b662b0ef33"><td id="_f0b6d5a5-4f61-549d-3370-6a73da6a4111" valign="top" align="left">expected</td>
<td id="_03ff039e-dc2a-e04e-a046-83f6fa68b4c0" valign="top" align="left">the frozen tree (readers), the frozen bytes (writers), or both (round trips)</td>
</tr><tr id="_60d748b8-cd7e-151a-2449-4a2eeb70957f"><td id="_fa3e7c40-b191-1c8b-ffad-31fa3815cf23" valign="top" align="left">model version</td>
<td id="_6aeb6c14-7ed8-20f8-075f-6ef926f46b96" valign="top" align="left">the version whose behaviour was frozen</td>
</tr><tr id="_bb00d3c8-433c-c25a-6ae7-dcb9430c3e0c"><td id="_8fb6d35b-7782-ca26-0e94-d002c738611d" valign="top" align="left">corpus generation</td>
<td id="_78c6d6f1-61fa-7222-9f63-8f6c55f4ef44" valign="top" align="left">the generation of the corpus set</td>
</tr><tr id="_116c8365-3802-0add-df11-06173dbeafe6"><td id="_4f9498db-f4be-96b9-9f44-73e88be5e177" valign="top" align="left">provenance note</td>
<td id="_46acbc9a-9a16-4e80-bf43-c66158ba9934" valign="top" align="left">where the entry came from: a clause of this series, a defect fix, a community report</td>
</tr></tbody>
</table>

<p id="_ced79141-0b42-35e7-8499-1293bb38c181">Claims name the generation they were checked against; a claim against generation N is void for generation N+1 until rechecked. The validator of the register build enforces the naming.</p>
</clause>
</clause>

<clause id="_63492bad-961d-0310-f14f-02640843ed09" obligation="normative">
<title id="_919dcf13-ab5e-8afa-01f7-62cdcd7f4c2f">Annex A: the typed errors</title>
<clause id="_c306dcb4-fa53-093f-fcec-3307423f847f" obligation="normative">
<title id="_634be367-f84a-64ee-f156-7cdb5dcb6113">General</title>
<p id="_0631836b-cd5c-a081-028e-958f2de2b812">These are the only errors that cross an interface boundary. Message shapes are stable within an edition; the messages carry the input, the type, or the field responsible.</p>

<table id="_2d433f7e-04aa-b5bc-752e-b0069f6d914a"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_12957523-93a5-2fc4-7a61-ada6cae20a37">Error classes</name>
<thead><tr id="_015458b6-abb3-e5f1-243a-7aa7013673c3"><th id="_b1bedcb7-fdfd-82c8-d939-ac0b36054d76" valign="top" align="left">Error</th>
<th id="_e571cc31-1c81-99aa-b53e-3932de5a02d3" valign="top" align="left">Raised by</th>
<th id="_429a9e22-ebde-fb62-ae85-f0e2bc6303ed" valign="top" align="left">Means</th>
</tr></thead>
<tbody><tr id="_1dd5bee1-47bb-4fc8-21dc-a8a963ec06a1"><td id="_93117375-3970-9150-097d-b4eacce77fa6" valign="top" align="left"><tt>InvalidTypeError</tt></td>
<td id="_d1e9f4e9-4c6c-e66c-1343-85ec05059326" valign="top" align="left">parse entry point</td>
<td id="_bb864b6b-7128-5beb-f44c-f41604c1290a" valign="top" align="left">the type key is not an accepted type</td>
</tr><tr id="_b561f18c-3cd6-7944-e366-e5606a942bf1"><td id="_9f32d86f-e6c0-a997-0a96-50f161dba941" valign="top" align="left"><tt>ParseOptionError</tt></td>
<td id="_0ccb3261-1e78-a941-0825-08028bb1f849" valign="top" align="left">parse entry point</td>
<td id="_bc324207-ffb1-a787-7b52-e7e75ea8b91f" valign="top" align="left">an unknown option, or <tt>locale</tt> for a non-localized type</td>
</tr><tr id="_80ad9014-e0f7-d9ca-6668-43dd467d0291"><td id="_9a137b1a-0f5f-6e6b-f999-f7eed9be30bc" valign="top" align="left"><tt>ParseError</tt></td>
<td id="_57dced5c-e288-34af-a2e0-7815f71cfce7" valign="top" align="left">any reader</td>
<td id="_1d982d8e-4cbb-b11a-b1d8-060c037ea413" valign="top" align="left">the input cannot be read; carries the text and the type</td>
</tr><tr id="_0da2efd7-f13b-80ba-47a2-638a28937626"><td id="_02e82568-a5e9-b9f5-ef2f-a9380b9fba89" valign="top" align="left"><tt>AmbiguousDecimalError</tt></td>
<td id="_0b5b9c07-ab19-7ee2-3522-96f379364a61" valign="top" align="left">uncertainty reading</td>
<td id="_7b1a426b-601e-830e-7d7a-3bd15a12383f" valign="top" align="left">a concise form whose decimal places cannot be reconstructed</td>
</tr><tr id="_0d1f36bc-5ab2-5364-2f50-5d971763e328"><td id="_e7289e4e-f3ff-5e1f-92b3-1e1e7ed76288" valign="top" align="left"><tt>MissingDependencyError</tt></td>
<td id="_3792be79-447b-7204-ecba-0d0a9c99f192" valign="top" align="left">a reader</td>
<td id="_2360e273-f641-d38e-b7da-7cc860286dcf" valign="top" align="left">an optional parsing dependency is absent</td>
</tr><tr id="_f7611355-736f-bf0f-34d9-e59c5751b79d"><td id="_f8eacad5-3712-679c-2d1b-766be2773538" valign="top" align="left"><tt>InvalidUncertainty</tt></td>
<td id="_bbf318ed-7f38-03f4-a99c-2cd8209b5ab0" valign="top" align="left">uncertainty construction</td>
<td id="_54c9ed37-36f8-dcfb-c677-8f6e5ce1df4b" valign="top" align="left">a field set inconsistent with the category (PM 1002)</td>
</tr><tr id="_cd927b8a-0dff-ec83-937a-68a3b3bb629d"><td id="_ce214579-8eff-3597-efc8-f108c6dcac72" valign="top" align="left"><tt>RenderingUnavailable</tt></td>
<td id="_781254d2-b647-2dc1-c7ef-b453db8bfe6a" valign="top" align="left">renderer</td>
<td id="_e999fbe0-4480-8f99-4311-468a8a3f5666" valign="top" align="left">the image library is absent</td>
</tr><tr id="_6ab47dfa-eb1d-0cb7-b697-5c1a166ccb5f"><td id="_7e228351-b5dc-94f7-7d13-8b3a87c2e865" valign="top" align="left"><tt>UnsupportedRenderFormat</tt></td>
<td id="_c74ce650-569a-15b6-434b-f5e3605e815b" valign="top" align="left">renderer</td>
<td id="_e4e9f699-f6a1-aa31-4f9a-6fc66242b287" valign="top" align="left">the requested image format is not offered</td>
</tr><tr id="_de5ce0a7-0b58-652e-32b2-f30d85b9fd78"><td id="_1da4bd6b-9660-b5da-a55d-968f2a3ebc64" valign="top" align="left"><tt>RenderingFailed</tt></td>
<td id="_1f7d72f2-ee48-1173-4a5d-b04d46c5b264" valign="top" align="left">renderer</td>
<td id="_f61af3a9-866e-3c6e-9215-a7f922438fc8" valign="top" align="left">rendering failed on a tree that parsed</td>
</tr></tbody>
</table>

<p id="_612ea5a6-cb94-b59f-9959-7fc919760b24">Specialized parse errors are subclasses of <tt>ParseError</tt>: an implementation catching <tt>ParseError</tt> catches them all, and one catching the subclass catches the specific case.</p>
</clause>

<clause id="_33193b0d-31ec-c126-84fe-42b11e5b8f18" obligation="normative">
<title id="_aff5db76-b4ec-a7c3-b6b5-6acbf0e7d423">What never escapes</title>
<p id="_4f5328d8-f976-3faa-d005-8195e19bbcbd">Parser internals, XML library exceptions, encoding errors and assertion failures never cross a boundary as themselves: a reader converts them to <tt>ParseError</tt> with cause information retained for diagnostics. A boundary that leaks a foreign exception is nonconforming.</p>

<example id="_3bdc1d65-08c9-c6e8-0d9d-d1f65c498dd8"><p id="_f1a39e56-77b4-6538-55a0-ce33e8dc31e0">A MathML reader given input that makes the XML library raise. <strong>Expected outcome.</strong> the caller sees <tt>ParseError</tt> carrying the input text and the type <tt>mathml</tt>; the original exception is the cause, not the error.</p>
</example>
</clause>
</clause>

<clause id="_2c05c5e6-a45a-cf12-63a4-046e79240eb4" obligation="normative">
<title id="_b4445970-ea32-1404-82a8-5499f88effb7">Annex B: options reference</title>
<clause id="_af4c9448-ce44-4c60-4be2-464c7fb70872" obligation="normative">
<title id="_87fb3fea-4d1f-8d82-fa85-ebabfc6e2220">Parse options</title>
<table id="_a785d089-09b9-1486-96c1-6ae976ffb43f"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_34e7b0d8-87bc-c5be-0396-734f10598100">Options of the parse entry point</name>
<thead><tr id="_4da9d89c-ab13-438c-02b8-f8344361b401"><th id="_7ab5985e-a2a0-9c7d-2eb8-8b060c110806" valign="top" align="left">Option</th>
<th id="_20537637-6232-4f23-0a41-c8ebdd4a6c0b" valign="top" align="left">Applies to</th>
<th id="_7476cef0-1b96-36cb-e433-083f4902e8cf" valign="top" align="left">Effect</th>
</tr></thead>
<tbody><tr id="_18fb4617-845b-718c-78d8-b23b8fb2f08e"><td id="_fa5d75ce-fe6c-7dd5-13fe-992589321aa0" valign="top" align="left"><tt>locale</tt></td>
<td id="_29313c2d-6d1d-827a-52e4-08c1979c6058" valign="top" align="left">asciimath, latex, html, unicode</td>
<td id="_6b5dc4c9-752f-9241-6c4d-17e2b786b989" valign="top" align="left">selects the language-specific readings of symbols and function names</td>
</tr></tbody>
</table>

<p id="_ead86d8f-1427-74e8-d6bc-09038ec81297">The locale value follows the implementation’s locale keys. A locale the implementation does not know raises <tt>ParseOptionError</tt> — silently ignoring a locale would read the wrong language and report success.</p>
</clause>

<clause id="_c5ba64fd-2c90-0cb3-d171-4beaaaabab89" obligation="normative">
<title id="_f9b38434-f7a4-7012-1eeb-8d2e23f0fb70">Write options</title>
<table id="_f0dc8781-f01f-180b-85fc-29d3f19a464d"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_35279af9-4983-56bd-fb9e-59a1928ea66b">Options of the writer entry points</name>
<thead><tr id="_054a9926-f952-23f0-bf81-6f636d2c38c0"><th id="_8933f36c-ba1a-7e19-6c6d-472a30267186" valign="top" align="left">Option</th>
<th id="_48a842af-2076-d691-1ab3-5fb5350c1c41" valign="top" align="left">Applies to</th>
<th id="_c2545a81-e535-84d4-1455-6ecc54d306f3" valign="top" align="left">Effect</th>
</tr></thead>
<tbody><tr id="_0a6a4e54-087a-b895-0087-ea55a4227dd7"><td id="_eb2ac547-5559-0dde-a713-d9b13615ebbf" valign="top" align="left">display style</td>
<td id="_6aaa9511-6397-38a6-203f-ce48f482b603" valign="top" align="left">all surfaces</td>
<td id="_99d97e8e-2882-9390-cf76-b54fbc674abd" valign="top" align="left">forces the display or inline form regardless of the root’s flag</td>
</tr></tbody>
</table>
</clause>

<clause id="_8701a42b-4763-73c1-314f-7d70db7f56be" obligation="normative">
<title id="_7a6f9090-7baa-444b-1b70-d46fc20950dc">Rendering options</title>
<table id="_800a7570-7ea2-517b-b53a-693d05016793"><colgroup><col width="25%"/><col width="37.5%"/><col width="37.5%"/></colgroup>
<name id="_4d83cf65-d5ea-e5fd-934d-811c583d348d">Options of the render entry point</name>
<thead><tr id="_415ce773-9227-c891-470f-d9ef527ad66f"><th id="_5e264dea-a90d-6959-af86-27bfcebea75b" valign="top" align="left">Option</th>
<th id="_d9c6ec79-c2e6-d02e-4533-720ca97e95a2" valign="top" align="left">Applies to</th>
<th id="_7af77499-4b84-4144-19b3-36a172c54fc3" valign="top" align="left">Effect</th>
</tr></thead>
<tbody><tr id="_ce93c4de-06a8-1c08-98c0-7e93a6f432cb"><td id="_12c352e5-4f5b-1ef6-4deb-71b2c8950395" valign="top" align="left"><tt>format</tt></td>
<td id="_570b3553-6276-65e1-27e6-1502c2953aa6" valign="top" align="left">render</td>
<td id="_2aa87009-d97e-06a4-a8b3-0958f6b04e23" valign="top" align="left">the image format: svg, png, pdf, ps</td>
</tr><tr id="_9269bb0f-0078-9b84-c4cc-af0bcc255e47"><td id="_20f312ee-eaf6-3d44-e6cd-5e768c578845" valign="top" align="left">parse options</td>
<td id="_2204e7c2-4cd6-3f7b-9fc6-11df85e9c218" valign="top" align="left">render</td>
<td id="_aefe550e-758a-ebbd-8f12-c6cc90ed89f3" valign="top" align="left">forwarded to the parse step</td>
</tr></tbody>
</table>

<p id="_c9808727-dec0-612e-298f-6bc0205aea4b">Unknown options at any boundary raise the typed option error; no boundary guesses.</p>
</clause>

<clause id="_1db6a157-c3cd-dbe2-369e-44b35f824d99" obligation="normative">
<title id="_4cd7c33f-2a2a-4b5e-764d-6806cba3c133">Worked option cases</title>
<example id="_f7d0cb64-6694-43ac-8a3f-a92822809d22"><p id="_8069de23-75fa-e337-493f-9ab5ee07dd54"><tt>parse("\\operatorname{sen} x", :latex, locale: :pt)</tt> — a Portuguese input. <strong>Expected outcome.</strong> with the locale, <tt>sen</tt> reads as the sine function; the tree is the sine of <tt>x</tt>. The same call without the locale reads <tt>sen</tt> per the default vocabulary — a symbol sequence, not the function. The corpora freeze both.</p>
</example>

<example id="_398c3781-e8c0-d905-b658-1164f63cdd1d"><p id="_a7f3570c-46ec-ce01-d057-b96a13ee8695"><tt>to_latex(display_style: true)</tt> on a tree whose root flag says inline. <strong>Expected outcome.</strong> the display form; the root’s flag is overridden for this call and unchanged on the tree.</p>
</example>

<example id="_917787b5-5882-1e07-a2e9-03dffabff6e0"><p id="_6c6d2f18-8a3a-c4ae-2720-744569640f38"><tt>render("x_1", :asciimath, format: :png)</tt> with the library present. <strong>Expected outcome.</strong> PNG bytes at the reference size; the parse options forward, the rest route to the renderer.</p>
</example>
</clause>
</clause>

<clause id="_8131d37f-3031-83d1-920f-24d2a9669603" obligation="normative">
<title id="_448c4433-56b1-268f-0cbf-0173f92fc475">Annex C: test-suite examples</title>
<p id="_b710d30a-d86c-458b-9d71-044442bcd947">Vectors illustrative of the conformance classes of clause 15; the corpora freeze them.</p>

<clause id="_ef252609-eb86-7cbf-fc30-1287215df0a2" obligation="normative">
<title id="_9f9238c6-27ef-ecf0-de6e-ce0cdae35a25">Reading (classes <tt>read-*</tt>)</title>
<example id="_2a485aad-f87e-6b43-cd1e-b2b9993a7818"><p id="_4c771907-ec01-d84d-c791-f5c9ce581524">Reading <tt>sum_(i=1)^n i^3</tt> in AsciiMath. <strong>Expected outcome.</strong> the nary tree of PM 1001’s introduction example, with <tt>input_string</tt> preserved.</p>
</example>

<example id="_dd552bfa-05ff-a13f-9453-759e9bc0ba12"><p id="_eb5030d6-1941-8a23-474a-19344dd93a2e">Reading <tt>"unitsml(kg*m/s^2)"</tt> inside an AsciiMath formula. <strong>Expected outcome.</strong> a <tt>Unitsml</tt> node with the expression <tt>kg*m/s^2</tt>; the quoted string is the channel, not text.</p>
</example>

<example id="_56cfa833-9128-6346-0f71-396be0b3c8f4"><p id="_e7353f46-c675-85e7-55f2-f8595c551e7c">Reading an AsciiMath <tt>ucov</tt> call with kind <tt>symmetric</tt>. <strong>Expected outcome.</strong> a coverage-interval node with interval kind <tt>probabilistically-symmetric</tt>; the AsciiMath spelling maps to the model value.</p>
</example>

<example id="_a7081785-2a50-f091-f5b0-146fdc395b97"><p id="_42c058b3-e4a4-fcb1-29b0-06b3fdd1af6b">Reading <tt>10.3(2)</tt>. <strong>Expected outcome.</strong> a standard uncertainty node, notation concise, magnitude <tt>0.2</tt>; <tt>input_string</tt> is <tt>10.3(2)</tt>.</p>
</example>

<example id="_32721b23-bf7c-bed8-e59e-f2c649a737c7"><p id="_14ccc0ab-f68a-e985-b27f-e8a53ba69348">Reading a MathML document whose uncertainty <tt>mrow</tt> carries a stale visible magnitude under an accurate intent marker. <strong>Expected outcome.</strong> the marker’s fields win; the stale content is discarded.</p>
</example>
</clause>

<clause id="_959e9771-0685-b382-be23-e9779917d153" obligation="normative">
<title id="_ccc34d0c-cb55-7085-144e-f32c914b25b5">Failure (all readers)</title>
<example id="_d1d265bd-9c1e-9830-9156-f240912901cc"><p id="_9100dacb-1460-34e0-c9ef-4c16bb87ee7c"><tt>parse("x^2", :fortran)</tt>. <strong>Expected outcome.</strong> <tt>InvalidTypeError</tt> before any parsing.</p>
</example>

<example id="_2313834c-85d5-7521-cdd0-6051dae28771"><p id="_f53d3a8a-83f3-3e01-9876-8ac8c46b1c4e"><tt>parse("x^2", :asciimath, locale: :fr)</tt> and <tt>parse("&lt;math/&gt;", :mathml, locale: :fr)</tt>. <strong>Expected outcome.</strong> the first parses with the French readings; the second raises <tt>ParseOptionError</tt> naming the type — MathML does not localize.</p>
</example>

<example id="_a5cefa82-aa29-0c27-c16a-d9bb93a4fe2a"><p id="_6d283e4d-9fca-1670-e98c-f6de80847dc0"><tt>parse("ustd(10.3, 0.25, notation: concise)", :asciimath)</tt> — wait, that form is not input; the input <tt>10.3(25)</tt> with the wrong place count. <strong>Expected outcome.</strong> <tt>AmbiguousDecimalError</tt>: the digit string cannot be reconstructed at the value’s decimal places.</p>
</example>

<example id="_16b46c7c-a256-0db9-3f87-c0496729e43c"><p id="_58eb2389-8755-33e8-e7aa-fa042b852125">An input that makes the XML library raise inside the MathML reader. <strong>Expected outcome.</strong> <tt>ParseError</tt> with the input and type; the foreign exception is the cause.</p>
</example>
</clause>

<clause id="_79211517-b231-e977-e36d-f0cb41f93896" obligation="normative">
<title id="_94c1297e-7dab-f989-7ac3-a6526e7f6d4f">Round trips (classes <tt>roundtrip-*</tt>)</title>
<example id="_9272e77d-e8e8-c34f-1d98-c354d4afef77"><p id="_1f334879-3bfa-c3a0-9f13-9cfc983bad3a">A tree containing every node family of PM 1001’s Annex A — one construct per class group — round-tripped through AsciiMath, MathML, OMML, UnicodeMath and LaTeX. <strong>Expected outcome.</strong> five writes, four equal read-backs, and the LaTeX output unread; the HTML column of the same corpus asserts bytes only.</p>
</example>

<example id="_afc5cb82-de50-7a72-bc4d-6eb8ec42e058"><p id="_b564d9f6-b860-9d5b-2b55-504e9dcfcf1d">A concise uncertainty node round-tripped through all four lossless formats. <strong>Expected outcome.</strong> notation concise after every read-back; the reporting form re-emitted identically each time.</p>
</example>
</clause>

<clause id="_7a7b408a-9634-6e25-7734-f44069dfd344" obligation="normative">
<title id="_447a1eaa-e3f5-3fe6-1b10-daa66e3034ca">Image rendering (class <tt>render-images</tt>)</title>
<example id="_5b926278-53ec-1703-8457-75501d29c131"><p id="_a419e4eb-0fe5-d458-633f-85e16ed41286"><tt>render("x^2", :asciimath, format: :svg)</tt> with the library present, then absent. <strong>Expected outcome.</strong> the SVG bytes frozen in the corpus; then <tt>RenderingUnavailable</tt>, raised before parsing repeats.</p>
</example>
</clause>

<clause id="_c072ae9c-0f36-018e-79df-2ed906a5f5d6" obligation="normative">
<title id="_bcbcb77f-43a2-53ef-fe94-4ff7545c143e">Boundary behaviour (all classes)</title>
<example id="_ba89f041-5e33-76b2-4219-cff5f9b8c683"><p id="_4a80582f-50d8-1fc4-062c-5e762ef5b4fe">The same call twice: <tt>parse("x^2", :asciimath)</tt> then <tt>parse("x^2", :asciimath)</tt> again. <strong>Expected outcome.</strong> two equal trees; no state carried between the calls; identical <tt>input_string</tt> on both.</p>
</example>

<example id="_b4c089d7-8b29-9d22-4347-2c20601e0bc8"><p id="_adf5e1c9-999a-d82c-2424-b862f5a72b88">A reader yielding to a writer of a different format immediately. <strong>Expected outcome.</strong> the composition works with no format-specific step; the output is a function of the tree.</p>
</example>

<example id="_cfb0dc9f-ea28-98d3-936b-5dcae11c1103"><p id="_ac2733f2-9a2a-6c8f-c0bb-e63c4d67658c"><tt>parse</tt> called with an option the boundary does not know. <strong>Expected outcome.</strong> <tt>ParseOptionError</tt> naming the option; no parsing occurred.</p>
</example>
</clause>

<clause id="_b76043fd-26e1-1814-7008-1c9570a64a3d" obligation="normative">
<title id="_232c7817-3364-ad2b-0365-3acf6d86da1e">Localization vectors (localized readers)</title>
<example id="_a78dee53-55b4-9cb9-db2e-8b113ef1de8c"><p id="_81df8fc2-d91f-06bc-bdf6-eae37257eb19">An AsciiMath input containing a locale-specific function name, read with the matching locale, then with a different one. <strong>Expected outcome.</strong> the matching locale reads the function node; the other reading treats the token per its own vocabulary — the corpora freeze both outcomes rather than leaving the difference undefined.</p>
</example>
</clause>

<clause id="_da8bf953-4a7a-ec91-e45c-b8a033a7e06e" obligation="normative">
<title id="_cb5aad0c-245a-69b6-7bca-f967df1fe23f">Uncertainty reading vectors (classes <tt>read-*</tt>)</title>
<example id="_86219968-a090-dbd6-cec7-ad736bd7bc61"><p id="_4a35fa9e-0418-dabc-442b-6621ef275bae">An AsciiMath <tt>ustd</tt> call with three arguments. <strong>Expected outcome.</strong> a reading error: the standard call takes two; arity errors are <tt>ParseError</tt> with the input.</p>
</example>

<example id="_a533c6ea-605f-2598-1f3e-673ac6a33dfb"><p id="_031558b9-68ba-537b-6c38-638160e9afdf">A UnicodeMath <tt>ⓘ</tt> wrapper whose quoted text is not a marker. <strong>Expected outcome.</strong> a reading error: the wrapper channel is reserved for markers.</p>
</example>

<example id="_51e803c8-1b54-dc30-f023-5300181560d3"><p id="_018d2f76-80d0-56f3-5855-1a9e9fbadde2">An OMML sequence whose shape runs precede a marker run. <strong>Expected outcome.</strong> the marker is positional; a late marker run is text, and the construct reads without uncertainty fields unless another marker precedes it.</p>
</example>
</clause>

<clause id="_64996cfb-a856-d54d-6397-4a115b546b41" obligation="normative">
<title id="_9e5a4942-8fec-fb93-46de-c83eed205312">Vocabulary vectors (classes <tt>read-asciimath</tt>, <tt>read-unicodemath</tt>, <tt>read-latex</tt>)</title>
<example id="_76800d18-f84e-10a7-6881-431263a435d6"><p id="_7e24dfec-7422-d337-45ca-bf1bfc33f7fd">One representative token per symbol family, read in each linear format. <strong>Expected outcome.</strong> the same <tt>Symbol</tt> node per registry entry regardless of format; each format’s token spelling is its own.</p>
</example>

<example id="_a413e481-0e3d-f949-29f9-02cdac96bb59"><p id="_99e7b7b9-3918-7aab-bc03-09492ec3ecb8">The same expression written with locale-selected function names and read under the matching and the default locale. <strong>Expected outcome.</strong> the corpora’s frozen pair: function node under the matching locale, symbol-sequence reading under the default — both documented, neither an error.</p>
</example>
</clause>

<clause id="_d944a408-d5cc-340a-b774-d9d98afce30c" obligation="normative">
<title id="_455a34d1-7bad-e820-a412-931e5f98c54d">Structure vectors (classes <tt>read-*</tt>)</title>
<example id="_65074c03-8fae-e003-e545-86a1ee5da43f"><p id="_48cdd79c-644d-659a-640b-6779314bdb28">A deeply nested expression — a fraction inside a radical inside a script inside a nary limit — read in each markup format. <strong>Expected outcome.</strong> the same tree shape at every nesting level; no depth-related divergence between readers.</p>
</example>

<example id="_79022f68-c54f-2a5d-24a5-c7c9657016ec"><p id="_583ef0ee-b3f8-b357-cd84-b649617af717">A table with a labelled row in MathML, read. <strong>Expected outcome.</strong> a <tt>Mlabeledtr</tt> in the tree; written to OMML and LaTeX as the labelled row of each surface; round-tripped equal.</p>
</example>
</clause>

<clause id="_103a22de-ad35-2f61-31d5-41e0859b0d9f" obligation="normative">
<title id="_cf8b7699-1937-6c54-a198-18678b46f049">Writer idempotence (classes <tt>write-*</tt>)</title>
<example id="_e5704155-afc8-867f-e7de-c6bd61410395"><p id="_d180b703-e89e-6427-76cb-6a5553f8caf1">Write a tree, read it back, write again — per lossless format. <strong>Expected outcome.</strong> the second write’s bytes equal the first’s, per format; the corpora assert write-read-write idempotence for every entry.</p>
</example>
</clause>
</clause>


</sections><bibliography><references id="_507fdcbe-5a58-c7f3-ecfc-be8ed61c244d" normative="true" obligation="informative">
<title id="_270c5ee6-077e-f285-ff95-287984a30140">Normative references</title><p id="_49996d2b-65c1-916b-9bbf-42b933aa0025">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>


<bibitem anchor="pm1001" id="_aecd57cb-dc94-7da2-f679-fc8f2036d5be"><formattedref format="application/x-isodoc+xml">of this series.</formattedref><docidentifier>PM 1001 (math model)</docidentifier><docnumber>1001 (math model)</docnumber><language>en</language><script>Latn</script></bibitem>
<bibitem anchor="pm1002" id="_4372d755-90da-b1ee-9826-d2be76372fe2"><formattedref format="application/x-isodoc+xml">of this series.</formattedref><docidentifier>PM 1002 (uncertainty model)</docidentifier><docnumber>1002 (uncertainty model)</docnumber><language>en</language><script>Latn</script></bibitem>
<bibitem anchor="mathml4" id="_c589ca3b-1d9d-8e5d-aa50-1db1b67bb9a5"><formattedref format="application/x-isodoc+xml">W3C Recommendation — the <tt>intent</tt> attribute and <tt>semantics</tt> element as read by the MathML interface.</formattedref><docidentifier>MathML 4</docidentifier><docnumber>4</docnumber><language>en</language><script>Latn</script></bibitem>
<bibitem anchor="ecma376" id="_c90499b0-da3f-e19f-1d00-65869a073eda"><formattedref format="application/x-isodoc+xml">Office Open XML File Formats, Part 1 — the DrawingML mathematics the OMML interface reads and writes.</formattedref><docidentifier type="ECMA">ECMA-376</docidentifier><docnumber>376</docnumber><language>en</language><script>Latn</script></bibitem>
<bibitem anchor="utr28" id="_2df654ca-bc5f-c01e-9516-ca7567141aee"><formattedref format="application/x-isodoc+xml">Unicode Support for Mathematics — the linear format the UnicodeMath interface reads and writes.</formattedref><docidentifier>Unicode Technical Report #28</docidentifier><docnumber>28</docnumber><language>en</language><script>Latn</script></bibitem>
<bibitem anchor="cc36817" id="_f92dc731-117c-fe18-95ab-75a5b6cdc829"><formattedref format="application/x-isodoc+xml">of the UnitsML series — the content of the quoted channel the AsciiMath interface reads and of the unit embedding.</formattedref><docidentifier>CalConnect 36817 (asciiunits content language)</docidentifier><docnumber>36817 (asciiunits content language)</docnumber><language>en</language><script>Latn</script></bibitem>
</references><references id="_61202b4a-2b09-0778-c74c-f52cebfb60f1" normative="false" obligation="informative">
<title id="_50ceb1e1-516f-2673-d73d-4f0c58b4d023">Bibliography</title><bibitem anchor="plurimath-repo" id="_7f4a376c-24dc-0918-6b87-18b3d6d13554">
  <formattedref format="application/x-isodoc+xml">— <link target="https://github.com/plurimath/plurimath"/></formattedref>
  <docidentifier>Plurimath repository</docidentifier>
  <language>en</language>
  <script>Latn</script>
</bibitem><bibitem anchor="pm1001-b" id="_a81aaa39-736f-8487-8661-94d927a7b940">
  <formattedref format="application/x-isodoc+xml">of this series</formattedref>
  <docidentifier>PM 1001</docidentifier>
  <docnumber>1001</docnumber>
  <language>en</language>
  <script>Latn</script>
</bibitem><bibitem anchor="pm1002-b" id="_1974483f-6c87-d00a-07c8-05846633364d">
  <formattedref format="application/x-isodoc+xml">of this series</formattedref>
  <docidentifier>PM 1002</docidentifier>
  <docnumber>1002</docnumber>
  <language>en</language>
  <script>Latn</script>
</bibitem><bibitem anchor="mathml4-b" id="_27dd2cb7-7315-ea2b-d1be-02a5b555e2d4">
  <formattedref format="application/x-isodoc+xml">— <link target="https://www.w3.org/TR/MathML4/"/></formattedref>
  <docidentifier>MathML 4</docidentifier>
  <docnumber>4</docnumber>
  <language>en</language>
  <script>Latn</script>
</bibitem><bibitem anchor="ecma376-b" id="_bb2232a0-a37b-feae-1ba6-e96a07608945">
  <formattedref format="application/x-isodoc+xml">Office Open XML File Formats</formattedref>
  <docidentifier type="ECMA">ECMA-376</docidentifier>
  <docnumber>376</docnumber>
  <language>en</language>
  <script>Latn</script>
</bibitem><bibitem anchor="utr28-b" id="_1c2930f4-5c1f-b47b-73eb-33fcc829ce85">
  <formattedref format="application/x-isodoc+xml">Unicode Support for Mathematics</formattedref>
  <docidentifier>Unicode Technical Report #28</docidentifier>
  <docnumber>28</docnumber>
  <language>en</language>
  <script>Latn</script>
</bibitem><bibitem anchor="lasem" id="_28683e18-309c-0a46-c641-a70b6f51af62">
  <formattedref format="application/x-isodoc+xml">— the rendering library behind the image surface</formattedref>
  <docidentifier>lasem</docidentifier>
  <language>en</language>
  <script>Latn</script>
</bibitem>







</references></bibliography>
</metanorma>
