| Copyright | (C) 2016-2026 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.Mathml.Element
Contents
Description
Overview
Miso.Mathml.Element provides smart constructors for every element in the
MathML Core
vocabulary. Each constructor produces a View node in the
MATHML namespace:
tagName_ :: [Attributeaction] -> [Viewmodel action] ->Viewmodel action
All names are suffixed with _. The module is re-exported by Miso.Mathml.
Quick start
Embed a fraction inside a paragraph using p_ and math_:
import Miso import Miso.Mathml.Element import Miso.Mathml.Property (display_) formula ::Viewmodel action formula =p_[] [math_[display_"block" ] [mfrac_[] [mn_[] [text"1" ] ,msqrt_[] [mn_[] [text"2" ] ] ] ] ]
Element groups
- Top-level:
math_ - Token elements (leaves):
mi_(identifier),mn_(number),mo_(operator),ms_(string literal),mtext_,mspace_ - General layout:
mrow_,mfrac_,msqrt_,mroot_,mpadded_,mphantom_,merror_,mstyle_,mfenced_ - Script & limit:
msub_,msup_,msubsup_,mover_,munder_,munderover_,mmultiscripts_,mprescripts_ - Tabular:
mtable_,mtr_,mtd_ - Semantics:
semantics_,annotation_,annotationXml_ - Custom:
nodeMathmlfor any MathML tag not listed above
See also
- Miso.Mathml.Property — MathML attribute combinators
- Miso.Mathml — re-export hub for the full MathML DSL
- Miso.Html.Element — HTML element constructors
- Miso.Svg.Element — SVG element constructors
Synopsis
- nodeMathml :: MisoString -> [Attribute action] -> [View model action] -> View model action
- math_ :: [Attribute action] -> [View model action] -> View model action
- annotationXml_ :: [Attribute action] -> [View model action] -> View model action
- annotation_ :: [Attribute action] -> [View model action] -> View model action
- merror_ :: [Attribute action] -> [View model action] -> View model action
- mfrac_ :: [Attribute action] -> [View model action] -> View model action
- mi_ :: [Attribute action] -> [View model action] -> View model action
- mmultiscripts_ :: [Attribute action] -> [View model action] -> View model action
- mn_ :: [Attribute action] -> [View model action] -> View model action
- mo_ :: [Attribute action] -> [View model action] -> View model action
- mover_ :: [Attribute action] -> [View model action] -> View model action
- mpadded_ :: [Attribute action] -> [View model action] -> View model action
- mphantom_ :: [Attribute action] -> [View model action] -> View model action
- mprescripts_ :: [Attribute action] -> [View model action] -> View model action
- mroot_ :: [Attribute action] -> [View model action] -> View model action
- mrow_ :: [Attribute action] -> [View model action] -> View model action
- ms_ :: [Attribute action] -> [View model action] -> View model action
- mspace_ :: [Attribute action] -> [View model action] -> View model action
- msqrt_ :: [Attribute action] -> [View model action] -> View model action
- mstyle_ :: [Attribute action] -> [View model action] -> View model action
- msub_ :: [Attribute action] -> [View model action] -> View model action
- msubsup_ :: [Attribute action] -> [View model action] -> View model action
- msup_ :: [Attribute action] -> [View model action] -> View model action
- mtable_ :: [Attribute action] -> [View model action] -> View model action
- mtd_ :: [Attribute action] -> [View model action] -> View model action
- mtext_ :: [Attribute action] -> [View model action] -> View model action
- mtr_ :: [Attribute action] -> [View model action] -> View model action
- munder_ :: [Attribute action] -> [View model action] -> View model action
- munderover_ :: [Attribute action] -> [View model action] -> View model action
- semantics_ :: [Attribute action] -> [View model action] -> View model action
- mfenced_ :: [Attribute action] -> [View model action] -> View model action
Combinator
nodeMathml :: MisoString -> [Attribute action] -> [View model action] -> View model action Source #
Elements
annotationXml_ :: [Attribute action] -> [View model action] -> View model action Source #
Since: 1.9.0.0
annotation_ :: [Attribute action] -> [View model action] -> View model action Source #
Since: 1.9.0.0
mmultiscripts_ :: [Attribute action] -> [View model action] -> View model action Source #
Since: 1.9.0.0
mprescripts_ :: [Attribute action] -> [View model action] -> View model action Source #
Since: 1.9.0.0
munderover_ :: [Attribute action] -> [View model action] -> View model action Source #
Since: 1.9.0.0