[Tex/LaTex] Drawing graphical model without a package


I would like to draw the following graph:
enter image description here

without using any TikZ style library. I have tried putting \phantom to make X and Y aligned, it did not work (don't know why). Additionally, putting multiple alignments &, && etc. doesn't work, although it alignes correctly, now graph spans the whole line, which makes it ugly. I would be grateful for a neat solution.

I don't want any libraries because I think of using this in Mathjax.

Best Answer

You can use an array, e.g.

X_0 & \to & X_1 & \to & X_2 & \to & \dots \\
\downarrow && \downarrow && \downarrow \\ 
Y_0 &  & Y_1 &  & Y_2 &  & \dots

Testing this on http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic.html gives

enter image description here

Related Question