Question: Maple latex uses command that gives error

Using latest TeXLive distribution, and current Maple 2021 maple.sty file, Maple generated Latex uses command called 

             \pdfstringdefDisableCommands

which is unknown. I found this when I was trying to compile latex generated from Student:-Calculus1:-ShowSolution command.

The above latex command is called/used in maple.sty file, but it is not defined anywhere outside. It might have been defined many years ago?  I only see one reference to it in an old posting at tex stackexchange from few years ago.

This is how to reproduce this error (one needs to have latex installed on your PC to compile the file). On windows MikTeX can be used. On Linux, TeXLive.

restart;
the_output:=Student:-Calculus1:-ShowSolution(Int(x^3,x=0..1));
latex(the_output)

Then copied the latex, and pasted it in my latex file

\documentclass{article}
\usepackage{amsmath}
\usepackage{array}
\usepackage{maple}% set the path to reach this in Maple etc/ folder in its installation
\begin{document}

\[
\begin{array}{ccc}
 & {} & \textrm{Integration Steps} 
\\
 {} & {} & \int_{0}^{1}x^{3}d x  
\\
 \textrm{▫} & {} & \textrm{1. Apply the}\textrm{power}\textrm{rule to the term}\int x^{3}d x  
\\
 {} & \textrm{◦} & \textrm{Recall the definition of the}\textrm{power}\textrm{rule, for n}\textrm{≠}\textrm{-1} 
\\
 {} & {} & \int x^{n}d x =\frac{x^{n +1}}{n +1} 
\\
 {} & \textrm{◦} & \textrm{This means:} 
\\
 {} & {} & \int x^{3}d x =\frac{x^{3+1}}{3+1} 
\\
 {} & \textrm{◦} & \textrm{So,} 
\\
 {} & {} & \int x^{3}d x =\frac{x^{4}}{4} 
\\
 {} & \textrm{◦} & \textrm{Apply limits of definite integral} 
\\
 {} & {} & \frac{x^{4}}{4}{\raisebox{-0.36em}{$\Big |$}}{\mstack{}{_{x \hiderel{=}1}}}-\left(\frac{x^{4}}{4}{\raisebox{-0.36em}{$\Big |$}}{\mstack{}{_{x \hiderel{=}0}}}\right) 
\\
  & {} & \textrm{We can rewrite the integral as:} 
\\
 {} & {} & \frac{1}{4} 
\end{array}
\]

\end{document}

And now when compiling the above using the latex compiler, it gives this error

(base) >pdflatex foo5.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./foo5.tex
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-12-07> xparse <2020-03-03> (/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2020/texmf-dist/tex/latex/tools/array.sty) (/mnt/g/public_html/styles/maple.sty
Package: maple 2005/03/17 v1.16
Defining Maple Utility Macros
Defining Maple Plot Environemnts
 ...Defaults to "dvips" Driver
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/epsfig.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-def/dvips.def))))
Defining Automatic Style Generation Macros
Defining Maple Spreadsheet Environments
Maple Spreadsheet and Table Support
! Undefined control sequence.
l.3248 \pdfstringdefDisableCommands
                                   {\let\(\fakemath}    % 2.
?

The above command is on line 3248 in maple.sty file

 

I tried to workaround it, but do far could not find a way.

Is there a way to fix this problem in Maple 2021 latex?

Please Wait...