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.
Asked
Active
Viewed 162 times
0
bp2017
- 3,756
- 1
- 13
- 33
1 Answers
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}
Ulrike Fischer
- 327,261

\pdfsetmatrix(in pdfTeX at least). No packages :-) – Phelype Oleinik Nov 16 '19 at 18:55