MathML Demo: <mtable> - tables and matrices 编辑

As a visual aid, the examples deliberately draw attention to the math axis and the baseline:
----------------------- this is the math axis
..................... this is the baseline

  1. External vertical align is center ---...1223334444x55555666666abc777777711...--- , cols arg is "|r|c|l|", \hline's above and below. When align="center" or align="baseline", the middle of the table coincides with the baseline.
  2. External vertical align is axis ---...1223334444x55555limnf-1i=1nAirowspan=2 herexn+ynncolumnspan=2 here777777711...---, columnlines="solid", rowlines="dashed solid dashed". By default -- when the align attribute is not set, or when align="axis", the middle of the table coincides with the math axis.
  3. External vertical align is top ---...122333444455555x+1666666abc777777711 cols arg is"r|c:l".
  4. External vertical align is bottom ---...122333444455555666666x2abc777777711 cols arg is "r|cl". MathML doesn't specify how to only display certain sides of the table border, as in "|rcl", but these can be obtained in Mozilla using the 'border' property of CSS, e.g., "|rcl" can be achieved with the CSS declaration "mtable { border-left: solid thin }".
  5. Math axis test, using externally aligned arrays inside symmetric fences. ---...[1666666x2caxis][1666666x2ccenter]+155555x+1cbottom+14444xctop+1444444444444xcenter post text.
  6. Now for a display ---...1444444444444x7777777 text after displayed math. Do you see which vertical alignment is set on that table?
  7. Example of \begin{matrix} ---...0110 with 3 \hline's.
  8. Example of \begin{smallmatrix} ---...12345 obtained with scriptlevel="+1".
  9. Example of \begin{pmatrix} ---...(0-ii0) with an \hline after the first row.
  10. Example of \begin{bmatrix} ---...[100-1]
  11. Example of \begin{vmatrix} ---...|abcd|
  12. Example of \begin{Vmatrix} ---...010110111011110
  13. Example of \begin{Bmatrix} ---...{101011}
  14. A fenced matrix and the equivalent \begin{bmatrix} ---...[abbcccdddd][abbcccdddd] .
  15. A table with align="axis2" to anchor the table externally w.r.t. the axis of the second row ---...abαβabxyabγδab...---, but this is subject to variances due to style changes, e.g., from the scriptlevel. ---...abαβabxyabγδab...---. Anyway, this is buggy in Mozilla because what you see above is a fallback to the rendering code used for the baseline case (see below).
  16. A table with align="baseline -1" to anchor the table externally w.r.t. the baseline of the last row ---...d+p(αβγδ)...---, neat isn't it? This would be pretty hard to obtain otherwise. Contrast it with the following which has align="bottom" ---...d+p(αβγδ)...---, and with this one which has align="center -1" ---...d+p(αβγδ)...---, but note that setting the baseline relative to a particular row is meaningless if the row doesn't have at least one cell with "rowalign=baseline" where to anchor the baseline (in which case Mozilla will behave as if it was align="center#rownumber").
  17. These may sound like gimmicks until you want to get a damping effect such as this ---...abababababab, or perhaps the reverse ---...abababababab, modulo pixel roundoff errors. Here 'a' and 'b' can be other combinations of possibly irregular boxes.
  18. And making floating elements do a multiplication such as the following one which is anchored at a baseline is made simple by using align="baseline1" on both tables [abcd][abcd]
  19. To multiply a matrix A by a vector x, each row of the matrix has to be multiplied to the vector. So at the i-th step, it proceeds thus: i-th row[a11a12a13a1nai1ai2ai3ainan1an2an3ann][x1x2x3xn]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:125 次

字数:20149

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文