A second layer of ruby text only renders correctly (to the right) in some browsers, e.g. Chrome:
FirstMatrix
∘.×
SecondMatrix
So too, many browsers do not render tags (here, a line break) inside ruby text correctly:
FirstMatrix
+.×
inner
productSecondMatrix
Most browsers recognise the fallback syntax of ruby text:
Go to gaoljail now!
Here, the fallback is emulated with styling:
Go to gaoljail now!
And for Internet Explorer users, this is how the above line should have looked:
Go to gaol [American: jail] now!
:class rubyAdvanced : MiPageSample
⍝
⍝
∇ Compose
:Access public
⍝
⍝
⍝
⍝
Add _.h3'A second layer of ruby text only renders correctly (to the right) in some browsers, e.g. Chrome:'
myp←Add _.p
myp.Add _.code'FirstMatrix'
(matmult←myp.Add _.ruby).Add _.code'∘.×'
(matmult.Add _.rt).Add¨'outer'(_.rt'product') ⍝
myp.Add _.code'SecondMatrix'
⍝
⍝
⍝
⍝
⍝
Add _.h3'So too, many browsers do not render tags (here, a line break) inside ruby text correctly:'
myp←Add _.p
myp.Add _.code'FirstMatrix'
(matmult←myp.Add _.ruby).Add _.code'+.×'
(matmult.Add _.rt).Add¨'inner'_.br'product'
myp.Add _.code'SecondMatrix'
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
⍝
Add _.h3'Most browsers recognise the fallback syntax of ruby text:'
myp←Add _.p'Go to '
myword←myp.Add _.ruby'gaol'
myword.Add¨(_.rp' [American: ')(_.rt'jail')(_.rp'] ')
myp.Add' now!'
⍝
Add _.h3'Here, the fallback is emulated with styling:'
myp←Add _.p'Go to '
myword←myp.Add _.ruby'gaol'
(⊂'style="display:inline;font-size:100%"')myword.Add¨(_.rp' [American: ')(_.rt'jail')(_.rp'] ')
myp.Add' now!'
⍝
Add _.h3'And for Internet Explorer users, this is how the above line should have looked:'
Add _.p'Go to gaol [American: jail] now!'
∇
:endclass