### TeX formatting question

Number of replies: 15I can't figure out the formatting that works in moodle, though. I've tried:

11.15 g \break \underline{ + \thinspace 120.0 g}

but the TeX filter doesn't recognize it. any suggestions?

### Re: TeX formatting question

or add space and zeros

$$\begin{align*}

7.15\\

8.30\\

\underline{+ 9.00}\\

24.45\\

\end{align*}$$

\begin{align*}

7.15\\

8.30\\

\underline{+ 9.00}\\

24.45\\

\end{align*}

### Re: TeX formatting question

the problem is that it has to have different # of figures before and after the decimal.

$$\begin{align*}

1.201 L\\

\underline{- 0.2543 L}\\

\end{align*}

$$

\begin{align*}

1.201 L\\

\underline{- 0.2543 L}\\

\end{align*}

needs to have the decimals line up exactly.

### Re: TeX formatting question

### Re: TeX formatting question

### Re: TeX formatting question

\begin{tabular}{r@{.}l}11&15 g\\+120&0 g\\\hline131&15 g\\\end{tabular}

may render with tex live

(does not work here in moodle.org anyway - probably some blacklisted command like \line breaks tex filter code here) Edit: works ok also here:

$$\begin{tabular}{r@{.}l}11&15 g\\+120&0 g\\\hline131&15 g\\\end{tabular}$$

### Re: TeX formatting question

Bah, we don't have that upto date on TeX apparently, because it gets to **}{r@{.}l** and freaks out.

this is what I see:

### Re: TeX formatting question

Is it Mimetex?

You can get close to similar effect in Mimetex with normal array and syntax like

\begin{array}{rcl}11&.&15 g\\+\;120&.&0 g\\\hline131&.&15 g\\\end{array}

which looks like this rendered by mimetex:

### Re: TeX formatting question

### Re: TeX formatting question

$$ \begin{array}{rll} 11&.15 &g \\ +120&.0 &g \\ \hline 131&.15&g \end{array} $$

$$$ \begin{array}{rll} 11&.15 &g \\ +120&.0 &g \\ \hline 131&.15&g \end{array} $$$

hahahaaaaa!!!!! You are just too quick for me Mauno..

2nd Edit:

Well if nothing else works... just as Mauno has posted using the default TeX Notation works, not all that nicely, but it is aligned and tidier than the alternatives...

### Re: TeX formatting question

First, let me say I'm really new to moodle and just poking around the forums. So, I have no clue if this LaTeX code will work for you in moodle. I found the following example at http://www.andy-roberts.net/misc/latex/latextutorial4.html

\begin{tabular}{r@{.}l} 3&14159\\ 16&2\\ 123&456\\ \end{tabular}

### Re: TeX formatting question

\begin{tabular}{r@{.}l}

3&14159\\

16&2\\

123&456\\

\end{tabular}

$$

Nicely done, though I think dcolumn still the way to go if you are managing Tex: http://newton.ex.ac.uk/research/qsystems/people/latham/LaTeX/dcolumn.pdf

### Re: TeX formatting question

Felicia,

the problem with {tabular}{r@{.}l} was that James has Mimetex and Mimetex does not support this expression - distros like Tex Live do support it

### Re: TeX formatting question

I know I could not do it, I do not have the knowledge of TeX nor the programming skills, but could it be done?

### Re: TeX formatting question

### Re: TeX formatting question

IMHO, if you want and need all that Tex can do, do a full install of Tex Live and use CPAN via tl_mgr to pull whatever packages or macros you might need.

I continue to hope that with the work being done on STACK and MathJax that at some point we will see, as was targeted by the MathTran project, full correspondence between Tex and Mathml allowing us to go in both directions, but that is a mammoth task and while lots of educators in the US opine about the issues we have with Math education, we see record profits for companies like Pearson while we see little investment in basic tools to make Math education possible.

In the meantime, one could hack on ASCIIMathML (see e.g., http://asciimathml.com/ ) and you can play with DragMath as well (via the xml files) as far as displaying directly via MathML

MathJax may well be the future of Tex on the web, but there is a long way to go