# D12712: Fix maxima LaTeX output for matrics

Sun May 6 16:45:55 UTC 2018

In D12712#258591 <https://phabricator.kde.org/D12712#258591>, @sirgienko wrote:

> In D12712#258590 <https://phabricator.kde.org/D12712#258590>, @asemke wrote:
>
> > In D12712#258582 <https://phabricator.kde.org/D12712#258582>, @sirgienko wrote:
> >
> > > @asemke, I'm confused: https://bugs.kde.org/show_bug.cgi?id=387303 in general component, but I found pmatrix only in maxima backend (and it maxima bug). So, I don't sure, that this fix 387303 bug.
> >
> >
> > my understanding of BUG 387303 is that during the "Export to LaTeX" (available in the main menu "File") wrong/old latex syntax is used for matrices. Here src/xslt/latex.xsl is used and my first guess was to add here a proper transformation rule. But you have also a valid point here with rendering of matrix(...) in maxima and most probably in Sage. I'll check your patch.
>
>
> As I understad, latex.xsl is template file for html worksheet output, right? But we don't have special html output for matrixs, aren't it? As I see, matrixs from different backends returned as plain text with '\n' (octave, python2, maybe python3 (import bug, can't test), qalqulate (not sure, that output is valid, but it still plain text), scilab) or latexentry (maxima). I haven't tested sage (broken for me), R (haven't output for matrix), Julia (broken too, after upgrade to 18.04), KAlgebra (don't know, how write matrix).
>  So, if we haven't special tags, we can't specify rule for matrixs, right?

This xsl file is used in Worksheet::saveLatex(). So, it's used when the user exports the xml-content of the worksheet to a tex file. Let's check this feature later. Your fix addresses another issue and with this fix I see now nicely formatted matrices in the output. Please help me to understand your comment "Fix bug with old matrix tex output in maxima, until it is fixed". Until what is fixed? Where does this tex-matrix function come from? Do you expect this to be fixed somewhere in maxima and to produce the output always with \begin{pmatrix} ... \end{pmatrix}?

REPOSITORY
R55 Cantor

REVISION DETAIL
https://phabricator.kde.org/D12712

To: sirgienko, #cantor, asemke
Cc: #cantor, #kde_edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180506/7432edc8/attachment-0001.html>