Remove unused filter, add extention for exported file, if it not setted, set correct xml attribute for latexresult and add decoding HTML '&', '>', '<' characters to valid for LaTeX characters
BUG: 387304
FIXED-IN: 18.04.2
asemke |
Cantor |
Remove unused filter, add extention for exported file, if it not setted, set correct xml attribute for latexresult and add decoding HTML '&', '>', '<' characters to valid for LaTeX characters
BUG: 387304
FIXED-IN: 18.04.2
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
I'm not familiar with XQuery. Do you understand where those html-tags come from? Isn't it better to adjust the xls transformation file and to avoid the generation of these tags completely?
Xm, I don't sure, that fully understand your question. Do you ask about src/worksheet.cpp:952? XML don't keep '&', '<', '>' as '&', '<', '>' because, this is special symbols, using in tags, so XML keep they as '&', '<', '>'. And as i see, QDomText don't decode them to origin form (maybe bug), when is convertes to QString, so we need do it by hands.
Ok, I think this is not related to xls. I created now a maxima worksheet and did a simple matrix([1,2],[3,4]). The result xml content is
<!DOCTYPE CantorWorksheet> <Worksheet backend="Maxima"> <Expression> <Command>matrix([1,2],[3,4])</Command> <Result type="latex" filename="cantor_tex-SiCiCb.eps">\begin{eqnarray*} \begin{pmatrix}1&2\\ 3&4\\ \end{pmatrix} \end{eqnarray*}</Result> </Expression> <Expression> <Command></Command> </Expression> </Worksheet>
Out of this Cantor generates without your fix
\documentclass[a4paper,10pt,fleqn]{article} \usepackage{fullpage} \usepackage{graphicx} \usepackage[utf8]{inputenc} \usepackage{amsmath,amssymb} \begin{document} \begin{verbatim} matrix([1,2],[3,4]) \end{verbatim} \begin{eqnarray*} \begin{pmatrix}1&2\\ 3&4\\ \end{pmatrix} \end{eqnarray*} \begin{verbatim} \end{verbatim} \end{document}
Do you see where those &'s in the XML-content come from? They are not part of maxima output.
Sorry. I didn't read you reply carefully. The patch is ok.
18.04.1 is probably too late. 18.04.1 was tagged already... Let's bring this into 18.04.2.
@asemke, Should I continue to use phabricator commit message, when I land the patches? I tired of long commit messages of my patches in git log, so I want to use only title and summary part. No problem with it?