6

I'm wondering if there is any difference between \textsc{ciao} and \text{\scshape ciao}. I wrote them in Texmaker and it seems that the effect is the same.

0

1 Answer 1

11

Two differences:

  1. the \text construction in text mode is the same as \mbox, so its argument cannot be split across lines or hyphenated;
  2. no italic correction is added at the end.

Of course, there's no difference in math mode. Indeed, a command such as \textsc{...} in math mode becomes \text{\scshape ...}.

Speaking of text mode, the first outlined difference might be what you're actually looking for, but in that case why not using \mbox directly?

About the latter outlined difference, it doesn't really show with small caps, but the similar situation with italics should be considered

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\text{\itshape if} test

\textit{if} test

\end{document}

enter image description here

Perhaps less impressive, but important, with \bfseries and \textbf you get

enter image description here

1
  • Hello @egreg thank you very much for your detailed answer Commented Apr 5, 2021 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .