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. H hydrogen O oxygen hefty H O water

2H2 + O2 2H2O

Hefty Ruby Water While the ruby element is mostly used in east-asian languages, it can also be useful in other contexts. As an example, and as you can see in the source of the CML element above, the code includes a caption element which is intended to be displayed below the formula segments. Following this paragraph is a reworked version of the XHTML fallback used above, using the ruby element. If your Reading System does not support ruby markup, then the captions will appear in parentheses on the same line as the formula segments. 2H2(hydrogen) + O2(oxygen) ⟶(hefty) 2H2O(water) If your Reading System in addition to supporting ruby markup also supports the -epub-ruby-position property, then the captions will appear under the formula segments instead of over them. The source code for the ruby version of the XHTML fallback looks as follows:

2H2(hydrogen) + O2(oxygen) (hefty) 2H2O(water)

... 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