array and multirow, looking for a Mathjax capable substitute for this equation.

316 views
Skip to first unread message

Tim Arnold

unread,
Feb 14, 2014, 10:01:37 AM2/14/14
to mathja...@googlegroups.com
hi, I know that multirow inside an array is not supported, so this isn't a request for support.

I'm going through a lot of equations from other writers, tidying them up so they look good in pdf and with Mathjax. 
I don't see a way to get a good representation of this equation though. Anyone else see an answer?
In case your browser/reader allows images, I've appended one below the LaTeX code.

thanks,
--Tim

\documentclass{book}
\usepackage{amsmath}

\begin{document}

\[
\begin{array}{*{3}{c@{\: +\: }}c@{\; =\; }c}
R_{1,1} \beta _{1} & R_{1,2} \beta _{2} & \cdots & R_{1,p} \beta _{p} & q_{1} \\
R_{2,1} \beta _{1} & R_{2,2} \beta _{2} & \cdots & R_{2,p} \beta _{p} & q_{2} \\
\multicolumn{5}{c}{\dotfill } \\
R_{r,1} \beta _{1} & R_{r,2} \beta _{2} & \cdots & R_{r,p} \beta _{p} & q_{r} \\
\end{array}
\]

\end{document}


Davide P. Cervone

unread,
Feb 14, 2014, 10:23:17 AM2/14/14
to mathja...@googlegroups.com
How about something like this:

\begin{align}
R_{1,1} \beta _{1} + R_{1,2} \beta _{2} + \cdots + R_{1,p} \beta _{p} &= q_{1} \\
R_{2,1} \beta _{1} + R_{2,2} \beta _{2} + \cdots + R_{2,p} \beta _{p} &= q_{2} \\
..............................&.....\\
R_{r,1} \beta _{1} + R_{r,2} \beta _{2} + \cdots + R_{r,p} \beta _{p} &= q_{r}
\end{align}

This seems a bit more direct that the complicated align template, and since the terms are all the same size anyway, there is no need for that.

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Tim Arnold

unread,
Feb 14, 2014, 10:43:22 AM2/14/14
to mathja...@googlegroups.com, dp...@union.edu
Beautiful solution Davide! I've noticed that making these 'wild' latex equations mathjax friendly generally makes the code and display cleaner.
Your align definitely is cleaner than the original array.

thanks very much,
--Tim

William F Hammond

unread,
Feb 14, 2014, 7:03:43 PM2/14/14
to mathja...@googlegroups.com
Alternatively, I think vertical dots would look better than the long row of fill dots.  So maybe eqnarray* instead of align with the vdots in the third row aligned with the cdots in the other rows as here:
http://www.albany.edu/~hammond/private/eqnadot.html
However, I don't consider this entirely reliable since the MathJax HTML-CSS or SVG renderings look better than the actual LaTeX rendering of the same markup.
(I don't really understand the spacing rules that go with amsmath alignment markers.)

      -- Bill

Tim Arnold

unread,
Feb 17, 2014, 9:23:36 AM2/17/14
to mathja...@googlegroups.com
hi Bill,
I tend to agree that the vdots look better. I'm attempting to fix rendering errors without changing the rendering too much since the equations aren't mine. I'm fixing up other writer's markup.

thanks for taking a look and thinking about it.
--Tim
Reply all
Reply to author
Forward
0 new messages