D12767: Improve LaTeX worksheet export
Alexander Semke
noreply at phabricator.kde.org
Wed May 9 21:09:29 UTC 2018
asemke added a comment.
In D12767#260325 <https://phabricator.kde.org/D12767#260325>, @sirgienko wrote:
> In D12767#260323 <https://phabricator.kde.org/D12767#260323>, @asemke wrote:
>
> > 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.
REPOSITORY
R55 Cantor
REVISION DETAIL
https://phabricator.kde.org/D12767
To: sirgienko, #cantor, asemke
Cc: kde-edu, asemke, #cantor, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180509/694a7768/attachment.html>
More information about the kde-edu
mailing list