# Question:On using textit in Latex generated by Physics

## Question:On using textit in Latex generated by Physics

Maple 2020

I'd like to suggest Physics:-Latex change its use of \textit{} and replace it with \mathit{}

\mathit is the better Latex command to use, since the Latex generated goes into math mode and \mathit is designed to be used in math mode and hence has a better spacing for this. Making the final Latex look a little better.

Here is an example showing the difference.

restart;
ode:=diff(y(x),x) = y(x)/(x^2+1);
sol:=dsolve(ode);
Physics:-Latex(sol)

Gives

y \left(x \right) = \textit{\_C1} {\rm e}^{\arctan \left(x \right)}

It will be better to generate

y \left(x \right) = \mathit{\_C1} {\rm e}^{\arctan \left(x \right)}

Here is the difference when both are compiled using latest texlive

Since all the Latex generated is meant to be used in math mode, \mathit would be better choice. It is considered wrong to use \textit in math mode actually, even though it does compile.

Here is the latex file used to generate the above pdf

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{maplestd2e}

\begin{document}

$y \left(x \right) = \textit{\_C1} {\rm e}^{\arctan \left(x \right)}$

$y \left(x \right) = \mathit{\_C1} {\rm e}^{\arctan \left(x \right)}$

\end{document}

 > interface(version);

 > Physics:-Version();

 > ode:=diff(y(x),x) = y(x)/(x^2+1); sol:=dsolve(ode); Physics:-Latex(sol)

y \left(x \right) = \textit{\_C1} {\rm e}^{\arctan \left(x \right)}

 >

thank you