Ampersand in latex mode

  • Unknown's avatar

    I am having trouble with the ampersands needed to separate the columns of a matrix. The WordPress editor turns them into & which latex doesn’t recognize. My expressions is $latex mbox{LCS}(i,j) = left{begin{array}{ll}0,&mbox{if}~i=0~mbox{or}~j=0\ mbox{LCS}(i-1, j-1),&mbox{if}~X_i = Y_j\ mbox{max}(mbox{LCS}(i-1,j), mbox{LCS}(i,j-1),&mbox{otherwise} end{array}$. I know that is correct because it works properly at mathbin.net. But with WordPress I get a “Formula does not parse” error. Searching on the forums led to a topic where a responder suggested that writing the ampersand without surrounding spaces would solve the problem, but that doesn’t work for me. Any suggestions?

    Many thanks,

    Phil

    The blog I need help with is: (visible only to logged in users)

  • The topic ‘Ampersand in latex mode’ is closed to new replies.