[Tex/LaTex] difference between \textit and \itshape

best practicesfontsitalic

I have only ever used \textit (and \emph for emphasized text), but have noticed that in some TeX examples, \itshape is used instead of \textit. Is there a difference between \textit and \itshape? If so, what is that difference?

Best Answer

\itshape is a switch:

Not italic {\itshape Italic} Not italic

\textit takes an argument:

Not italic \textit{Italic} Not italic

Many people seem to like \itshape{...}, which is wrong (but doesn't give an error since the braces are interpreted as grouping delimiters here). \itshape doesn't automatically insert italic correction, whereas \textit does, so inside a paragraph, \textit is usually better. On the other hand, sometimes the switch commands are more handy if you already have grouping (e.g., with braces or environments):

\begin{table}
  \itshape
  Everything inside this table is italic
\end{table}
Related Question