0

There's \resizebox, but is there any other way to resize a box? Anything that resizes a character (not a box) to an arbitrary width AND height is also appreciated. One condition is that no packages outside of LaTeX Team package collection can be used (for those are official packages, I would rather prefer using them over some unreliable alternatives). Plain TeX solutions (if they exist for this problem) are welcome the most.

bp2017
  • 3,756
  • 1
  • 13
  • 33
  • 1
    the reason I flagged \resizebox on your last question is because you were asking for pure tex solutions and tex has no scaling, the expl3 scaling that Ulrike just posted is, like the graphics package scaling, using system dependent backend calls to postscript or pdf scaling operators. – David Carlisle Nov 16 '19 at 18:52
  • both expl3 and the graphics package can be used with plain tex if you need that for some reason. – David Carlisle Nov 16 '19 at 18:53
  • 1
    Of course the way of doing this is using \pdfsetmatrix (in pdfTeX at least). No packages :-) – Phelype Oleinik Nov 16 '19 at 18:55

1 Answers1

4

I don't quite see the point to avoid \resizebox, but an alternative is expl3:

\documentclass[]{article}
\usepackage{expl3}
\begin{document}
A
\ExplSyntaxOn
\hbox_set:Nn \l_tmpa_box {A}

\box_resize_to_wd_and_ht:Nnn\l_tmpa_box {2cm}{1cm}

\fbox{\box_use:N \l_tmpa_box}
\ExplSyntaxOff

\end{document}

enter image description here

Ulrike Fischer
  • 327,261