Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Newline in Mathjax

Tags:

mathjax

In Mathjax, how do I write this as a two-liner separated by the second =?

enter image description here

This is the Mathjax code:

$= 2[2W(k-2) + (k-1)2^{k-1}] + k2^k= 2^2W(k-2)+(k-1)2^{k-1}+ k2^k$

What do I need to change to add a new line before the second = sign?

like image 855
ThisClark Avatar asked Sep 10 '15 16:09

ThisClark


1 Answers

Use \\ for Mathjax newline.

Way easier than expected, plus this was already answered here - http://meta.math.stackexchange.com/questions/11720/new-line-within-mathjax

$= 2[2W(k-2) + (k-1)2^{k-1}] + k2^k\\= 2^2W(k-2)+(k-1)2^{k-1}+ k2^k$
                                   ^^ 
                                   slashes here
like image 135
ThisClark Avatar answered Jan 02 '23 04:01

ThisClark