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 Answer 1

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

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

You must log in to answer this question.

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