@minoush82

This seems to be a problem due to encoding of the output of ShowSolution not working in command line vs. worksheet. It has nothing to with Latex. Here is screen shot of the output of just the ShowSolution command without calling Latex. Notice the bad characters showing up. This is on windows

So when you pass this output to Latex it complains as it can't parse it. Latex itself works fine on normal Maple commands:

It looks like ShowSolution output is meant to only be used/displayed in worksheet, and they do not play nice with standard output on the terminal for some reason.

with(Student[Calculus1]):
res:=ShowSolution(Diff(ln(x),x)):
lprint(res)
Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mtext("",
"mathcolor" = "black")),Typesetting:-mtd(),Typesetting:-mtd(Typesetting:-mrow(
Typesetting:-mtext("Differentiation Steps","mathcolor" = "black")))),
Typesetting:-mtr(Typesetting:-mtd(),Typesetting:-mtd(),Typesetting:-mtd(
Typesetting:-mrow(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mstyle(
Typesetting:-mo("ⅆ",Typesetting:-msemantics = "inert")),
Typesetting:-mrow(Typesetting:-mstyle(Typesetting:-mo("ⅆ",
Typesetting:-msemantics = "inert")),Typesetting:-mi("x"))),Typesetting:-mspace(
width = "0.4em"),Typesetting:-mrow(Typesetting:-mi("ln",fontstyle = "normal"),
Typesetting:-mo("⁡"),Typesetting:-mfenced(Typesetting:-mi("x"))))
))),Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mtext("▫","mathcolor" =
"black")),Typesetting:-mtd(),Typesetting:-mtd(Typesetting:-mrow(Typesetting:-
mrow(Typesetting:-mtext("1. Apply the","mathcolor" = "black"),Typesetting:-
mspace(" "," ",width = "thickmathspace"),Typesetting:-mstyle(Typesetting:-mtext
("natural logarithm","mathcolor" = "black"),"fontweight" = "bold","mathcolor" =
"black"),Typesetting:-mspace(" "," ",width = "thickmathspace"),Typesetting:-
mtext("rule","mathcolor" = "black"))))),Typesetting:-mtr(Typesetting:-mtd(),
Typesetting:-mtd(Typesetting:-mtext("◦","mathcolor" = "black")),Typesetting:-
mtd(Typesetting:-mrow(Typesetting:-mrow(Typesetting:-mtext(
"Recall the definition of the","mathcolor" = "black"),Typesetting:-mspace(" ",
" ",width = "thickmathspace"),Typesetting:-mstyle(Typesetting:-mtext(
"natural logarithm","mathcolor" = "black"),"fontweight" = "bold","mathcolor" =
"black"),Typesetting:-mspace(" "," ",width = "thickmathspace"),Typesetting:-
mtext("rule","mathcolor" = "black"))))),Typesetting:-mtr(Typesetting:-mtd(),
Typesetting:-mtd(),Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mrow(
Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mstyle(Typesetting:-mo(
"ⅆ",Typesetting:-msemantics = "inert")),Typesetting:-mrow(
Typesetting:-mstyle(Typesetting:-mo("ⅆ",Typesetting:-msemantics =
"inert")),Typesetting:-mi("x"))),Typesetting:-mspace(width = "0.4em"),
Typesetting:-mrow(Typesetting:-mi("ln",fontstyle = "normal"),Typesetting:-mo(
"⁡"),Typesetting:-mfenced(Typesetting:-mi("x")))),Typesetting:-mo
("="),Typesetting:-mfrac(Typesetting:-mn("1"),Typesetting:-mi("x")))))),
Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mtext("","mathcolor" = "black"))
,Typesetting:-mtd(),Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mtext(
"This gives:","mathcolor" = "black")))),Typesetting:-mtr(Typesetting:-mtd(),
Typesetting:-mtd(),Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mfrac(
Typesetting:-mn("1"),Typesetting:-mi("x"))))),columnalign = "left")

may be changing some settings will make it work in command line. I do not know. It looks like it is this character which causes the problems

\textrm{▫}

when displayed in standard output