0
$\begingroup$

I am new to this site and having a few issues with formatting my question.

I am attempting to ask a question in which I need to show 3 lines of data in 3 columns (as below) but am struggling to get them to line up. [I can get them to line up in the box where you type but this doesn't translate to what would be published to the site...]

Known Values: $X_k$ = 5 : $Y_k$ = 5 : $Z_k$ = 5
Predicted Values: $X_p$ = -95 : $Y_p$ = 5 : $Z_p$ = 105
Difference $\Delta$X = -100 : $\Delta$Y = 0 : $\Delta$Z = 100

If I use blockquotes etc. I can get the columns to line up but am unable to use the subscripts and greek letters.

Is there anyway round this such than both can happen?

$\endgroup$
5
$\begingroup$

It's a bit more work, but you could do something like

$$
\begin{array}{lccc}
\text{Known Values:} & X_k = 5 & Y_k = 5 & Z_k = 5 \\
\text{Predicted Values:} & X_p = -95 & Y_p = 5 & Z_p = 105 \\
\text{Difference:} & \Delta X = -100 & \Delta Y = 0 & \Delta Z = 100 \\
\end{array}
$$

$$ \begin{array}{llll} \text{Known Values:} & X_k = 5 & Y_k = 5 & Z_k = 5 \\ \text{Predicted Values:} & X_p = -95 & Y_p = 5 & Z_p = 105 \\ \text{Difference:} & \Delta X = -100 & \Delta Y = 0 & \Delta Z = 100 \\ \end{array} $$

Or, if you want the columns to line up at the equals signs instead,

$$
\begin{array}{llrclrclrcl}
\text{Known Values:} && X_k &=& 5 & Y_k &=& 5 & Z_k &=& 5 \\
\text{Predicted Values:} && X_p &=& -95 & Y_p &=& 5 & Z_p &=& 105 \\
\text{Difference:} && \Delta X &=& -100 & \Delta Y &=& 0 & \Delta Z &=& 100 \\
\end{array}
$$

$$ \begin{array}{llrclrclrcl} \text{Known Values:} && X_k &=& 5 & Y_k &=& 5 & Z_k &=& 5 \\ \text{Predicted Values:} && X_p &=& -95 & Y_p &=& 5 & Z_p &=& 105 \\ \text{Difference:} && \Delta X &=& -100 & \Delta Y &=& 0 & \Delta Z &=& 100 \\ \end{array} $$

Note that, of course, this also opens up the option of using more table-like formatting...

$$
\begin{array}{lccc}
&X&Y&Z\\\hline
\text{Known Values:} & 5 & 5 & 5 \\
\text{Predicted Values:} & -95 & 5 & 105 \\
\text{Difference:} &  -100 & 0 & 100 \\
\end{array}
$$

$$ \begin{array}{lccc} &X&Y&Z\\\hline \text{Known Values:} & 5 & 5 & 5 \\ \text{Predicted Values:} & -95 & 5 & 105 \\ \text{Difference:} & -100 & 0 & 100 \\ \end{array} $$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .