Hefty Water
body {
font-family : verdana, sans-serif;
margin : 2em 2em 2em 2em;
}
p#fallback,
p#rubyp {
border : dotted 2px gray;
background : rgb(230, 230, 230);
padding : 2em;
}
p#rubyp {
-epub-ruby-position : under;
}
Hefty Water
This document serves to test Reading System support for the epub:switch element. There is also a little bit of ruby
markup available.
The Switch
Below is an instance of the epub:switch element, containing Chemical Markup
Language (CML). The fallback content is a chunk of plain XHTML5.
If your Reading System supports epub:switch
and
CML, it will render the CML formula natively, and ignore (a.k.a not
display) the XHTML fallback.
If your Reading System supports epub:switch
but not
CML, it will ignore (not display) the CML formula, and render the
the XHTML fallback instead.
If your Reading System does not support epub:switch at all, then
the rendering results are somewhat unpredictable, but the most likely result is
that it will display both a failed attempt to render the CML and the XHTML
fallback.
Note: the XHTML fallback is bold and enclosed in a gray dotted box with a
slightly gray background. A failed CML rendering will most likely appear above
the gray fallback box and read: "H hydrogen O oxygen hefty H O
water".
Here the switch begins...
H
hydrogen
O
oxygen
hefty
H
O
water
2H2
+
O2
⟶
2H2O
... and here the switch ends.
The Source
Below is a rendition of the source code of the switch element. Your Reading System
should display this correctly regardless of whether it supports the
switch element.
2H2
+
O2
⟶
2H2O
2H2 + O2 ⟶ 2H2O
... and the css declaration using the -epub-ruby-position property looks like this: p#rubyp { -epub-ruby-position : under; } Navigation Hefty Water The Switch The Source Hefty Ruby Water