Skip to content

Instantly share code, notes, and snippets.

Last active February 24, 2021 16:20
What would you like to do?
Example of LaTeX snippet that keeps text on a single line, but resizes it to fit the width, if it would otherwise wrap.
\ifthenelse{\lengthtest{\namewidth < \textwidth}}%
{#1}% do nothing if shorter than text width
{\resizebox{\textwidth}{!}{#1}}% scale down
\oneline{\Huge{The no-wrap text to scale}}
\oneline{\Huge{The quick brown fox jumped over the lazy dog, over and over and over and over again.}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment