I had no problem getting maple code into latex, the issue I am having is that the equations are running off page. I was wondering if anyone had suggestions to fix this.
\documentclass{article}
\usepackage{maplestd2e}
\def\emptyline{\vspace{12pt}}
\usepackage{lscape}
\newcommand{\maplebreak}{\hfill\break}
\allowdisplaybreaks
\begin{document}
\pagestyle{empty}
\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}{U := m[1]m[2]/[(u[1]-u[2])^2+(v[1]-v[2])^2+(w[1]-w[2])^2]^(1/2)+m[1]M[1]/[(u[1]+aM[2]/M)^2+v[1]^2+w[1]^2]^(1/2)+m[1]M[2]/[(u[1]-aM[1]/M)^2+v[1]^2+w[1]^2]^(1/2)+m[2]M[1]/[(u[2]+aM[2]/M)^2+v[2]^2+w[2]^2]^(1/2)+m[2]M[2]/[(u[2]-a*M[1]/M)^2+v[2]^2+w[2]^2]^(1/2); 1}{[\displaystyle ]}
\mapleinline{inert}{2d}{U := m[1]m[2]/[(u[1]-u[2])^2+(v[1]-v[2])^2+(w[1]-w[2])^2]^(1/2)+m[1]M[1]/[(u[1]+aM[2]/M)^2+v[1]^2+w[1]^2]^(1/2)+m[1]M[2]/[(u[1]-aM[1]/M)^2+v[1]^2+w[1]^2]^(1/2)+m[2]M[1]/[(u[2]+aM[2]/M)^2+v[2]^2+w[2]^2]^(1/2)+m[2]M[2]/[(u[2]-aM[1]/M)^2+v[2]^2+w[2]^2]^(1/2); 1}{[\displaystyle ]}
\begin{maplegroup}
\mapleresult
\begin{maplelatex}
\mapleinline{inert}{2d}{m[1]m[2]/sqrt([(u[1]-u[2])^2+(v[1]-v[2])^2+(w[1]-w[2])^2])+m[1]M[1]/sqrt([(u[1]+aM[2]/M)^2+v[1]^2+w[1]^2])+m[1]M[2]/sqrt([(u[1]-aM[1]/M)^2+v[1]^2+w[1]^2])+m[2]M[1]/sqrt([(u[2]+aM[2]/M)^2+v[2]^2+w[2]^2])+m[2]M[2]/sqrt([(u[2]-aM[1]/M)^2+v[2]^2+w[2]^2])}{[\displaystyle {\frac {m_{{1}}m_{{2}}}{ \sqrt{[ \left( u_{{1}}-u_{{2}} \right) ^{2}+ \left( v_{{1}}-v_{{2}} \right) ^{2}+ \left( w_{{1}}-w_{{2}} \right) ^{2}\
\mbox{}]}}}+m_{{1}}M_{{1}} \left( \sqrt{[ \left( u_{{1}}+{\frac {aM_{{2}}}{M}} \right) ^{2}+{v_{{1}}}^{2}+{w_{{1}}}^{2}]} \right) ^{-1}+m_{{1}}M_{{2}} \left( \sqrt{[ \left( u_{{1}}-{\frac {aM_{{1}}}{M}} \right) ^{2}+{v_{{1}}}^{2}+{w_{{1}}}^{2}]} \right) ^{-1}\
\mbox{}+m_{{2}}M_{{1}} \left( \sqrt{[ \left( u_{{2}}+{\frac {aM_{{2}}}{M}} \right) ^{2}+{v_{{2}}}^{2}+{w_{{2}}}^{2}]} \right) ^{-1}+m_{{2}}M_{{2}} \left( \sqrt{[ \left( u_{{2}}-{\frac {aM_{{1}}}{M}} \right) ^{2}+{v_{{2}}}^{2}+{w_{{2}}}^{2}]} \right) ^{-1}]}
\end{maplelatex}
\end{maplegroup}
\end{document}
This is a section of the code that I am using that was imported from Maple. Minus the fact that the other latex files needed to run it have not been included, it should run.
Any tips would be appreciated.
maplestd2edoesn't seem to be a standard TeX file, so that's a pretty big "minus the fact" that keeps me from being able to see what you're talking about. – Teepeemm Sep 10 '21 at 20:17\mapleinlineto break formulas across lines. The output is awful anyway. – egreg Sep 10 '21 at 20:23\sqrtbut others are just as textsqrtwhich wil be set as a product of variables s q r t – David Carlisle Sep 10 '21 at 20:32