1

In this example:

\documentclass{report}
\usepackage{graphicx} %for \resizebox
\begin{document}

ABC

\resizebox{0.3\textwidth}{!}{ABC}

\end{document}

I use \resizebox to scale textual material. The output looks rather pleasing:

enter image description here

However, I have heard critique of using the \resizebox command (it leads to inconsistent fonts) and even regrets of ever having released this command.

How would a versed Latex expert tackle this problem?

1

For text, use a scalable font and just resize the font.

\documentclass{report}
\usepackage{lmodern}
\usepackage{graphicx} %for \resizebox
\begin{document}

ABC

\resizebox{0.3\textwidth}{!}{ABC} (NOT THIS)

{\fontsize{48}{52}\selectfont ABC} (BUT THIS)

\end{document}

enter image description here

The size was selected, not calculated. If one needed the result precisely as .3\textwidth, I would suggest using \resizebox, but on something that is close to the final result.

\documentclass{report}
\usepackage{lmodern}
\usepackage{graphicx} %for \resizebox
\begin{document}
ABC

\resizebox{0.3\textwidth}{!}{ABC} (NOT THIS)

{\fontsize{48}{52}\selectfont ABC} (BUT THIS)

\resizebox{0.3\textwidth}{!}{\fontsize{48}{52}\selectfont ABC} (PRECISELY, THIS)
\end{document}

enter image description here

  • How did you calculate 48 and 52? – Viesturs May 2 at 12:57
  • 1
    @Viesturs I didn't calculate them. I selected them to desired size. – Steven B. Segletes May 2 at 12:58
  • @Viesturs See my edit, for the case where a precise width is a requirement. – Steven B. Segletes May 2 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.