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:

\DefineParaStyle{Maple Heading 1}
\DefineParaStyle{Maple Text Output}
\DefineParaStyle{Maple Dash Item}
\DefineParaStyle{Maple Bullet Item}
\DefineParaStyle{Maple Normal}
\DefineParaStyle{Maple Heading 4}
\DefineParaStyle{Maple Heading 3}
\DefineParaStyle{Maple Heading 2}
\DefineParaStyle{Maple Warning}
\DefineParaStyle{Maple Title}
\DefineParaStyle{Maple Error}
\DefineCharStyle{Maple Hyperlink}
\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) \]}
\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}\]}
\begin{Maple Normal}{
\begin{Maple Normal}{
\mapleinline{inert}{2d}{}{\[\displaystyle \]}
}\end{Maple Normal}
}\end{Maple Normal}

Here is the lyx output with the error procuced

Any suggestions?

Thanks in advance

  • 3
    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

For any other who faced the same problem, I managed to solve it indirect.

On LyX go to: tools->preferences->paths-> and in path prefix add the destination of the folder in which you have install maple, mathematica, or any other software.

After that, just insert into a math type mode and write the code. Let the cursor in the end of your code and then go to:

edit->math->use computer algebra system-> and choose your software of your choice.

What basically do is to replace the IDE of your CAS with that of Lyx

PS: Here is the complete tutorial https://mathematica.stackexchange.com/questions/42795/using-mathematica-in-conjunction-with-lyx-path-issues

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.