Closed siwelwerd closed 4 years ago
Maybe this is why?
Added lin-alg/V9 to this project, which exhibits the error.
Yeah &
is a reserved character in XML. I think the correct thing is to have seeds.json contain valid XML snippets, so use &
.
I forget my hacky implementation of XML->LaTeX
so it's quite likely that will cause errors in the LaTeX output.
Oh I see. The Sagemath code is producing &
, so I need to figure out how to clean that up. Or maybe I'm mistaken: seeds.json should contain valid LaTeX snippets, which I'll need to handle.
Yeah. Compare the following two lines:
v1="\\begin{bmatrix}"+ latex(vec1[0])+" & "+ latex(vec1[1]) +" \\\\ "+ latex(vec1[2]) +" & "+latex(vec1[3]) +"\\end{bmatrix}" v2=latex(matrix([[vec2[0],vec2[1]],[vec2[2],vec2[3]]]))
v1 prints okay now, v2 is obviously more elegant but the latex() call throws a plain & that gets eaten.
Drew reopen if this doesn't address the issue.
I believe Mastr is eating ampersands. They appear in the seeds.json file, but then do not appear in the xml or latex output.