# Maple 18 output in LyX

I have the following problem: I want to import the outcome of solve(b^4-(2-d)*b^2-2*d*b+d+1 > 0, [b], parametric), which is a maple code, into Lyx.

Even though I managed to export the solution of this inequality into .tex, however I cannot compile it through lyx.

I verified that .tex file works perfectly at Texworks, but when I come to lyx I face multiple error :( (I just imported the plain latex file into lyx)

Here is the .tex file:

\documentclass{article}
\usepackage{maplestd2e}
\def\emptyline{\vspace{12pt}}
\begin{document}
\pagestyle{empty}
\DefineParaStyle{Maple Text Output}
\DefineParaStyle{Maple Dash Item}
\DefineParaStyle{Maple Bullet Item}
\DefineParaStyle{Maple Normal}
\DefineParaStyle{Maple Warning}
\DefineParaStyle{Maple Title}
\DefineParaStyle{Maple Error}
\DefineCharStyle{Maple 2D Math}
\DefineCharStyle{Maple Maple Input}
\DefineCharStyle{Maple 2D Output}
\DefineCharStyle{Maple 2D Input}
\mapleinline{inert}{2d}{solve(b^4-(2-d)*b^2-2*d*b+d+1 > 0, [b], parametric)}{$\displaystyle {\it solve} \left( 0<{b}^{4}- \left( 2-d \right) {b}^{2}-2\,db+d+1,[b],{\it parametric}\\ \mbox{} \right)$}
\begin{maplegroup}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{piecewise(d < -4, [[b < -1-sqrt(-d)], [-1+sqrt(-d) < b]], d = -4, [[1 < b], [b < -3]], d <= 0, [[1 < b], [b < -1-sqrt(-d)], [-1+sqrt(-d) < b, b < 1]], 0 < d, [[1 < b], [b < 1]])}{$\displaystyle \cases{[[b<-1- \sqrt{-d}],[-1+ \sqrt{-d}<b]]&d<-4\cr [[1<b],[b<-3]]&d=-4\cr [[1<b],[b<-1- \sqrt{-d}],[-1+ \sqrt{-d}<b,b<1]]&d\leq 0\cr [[1<b],[b<1]]&0<d\cr}$}
\end{maplelatex}
\end{maplegroup}
\begin{Maple Normal}{
\begin{Maple Normal}{
\mapleinline{inert}{2d}{}{$\displaystyle$}
}\end{Maple Normal}
}\end{Maple Normal}
\end{document}


Any suggestions?

• Well, no. For me at least it is completely impossible to answer, as I don't know anything about the code produced by Maple, what you do in LyX, or which errors you get. Can you reduce your .tex file to the minimum needed to reproduce the errors in LyX, and edit your question to include it, and a description of how you use it in LyX? – Torbjørn T. Mar 21 '15 at 13:48
• I don't have Maple, so your edit doesn't help me help you. Please add the contents of the .tex file produced by Maple. – Torbjørn T. Mar 21 '15 at 15:12
• Also (in addition to the .tex file as requested above), please state which error exactly you are given (what does the error state?). It's hard to help without this information. – scottkosty Mar 21 '15 at 16:26
• I would also like to add that lyx runs on Windows 7, so it might work in lyx on linux – Yorgos Mar 22 '15 at 12:27
• @George I can reproduce. This seems like a bug in LyX's .tex import. I created a bug report for you: lyx.org/trac/ticket/9476 – scottkosty Mar 22 '15 at 16:21