Which LaTeX packages can I use to center, scale, and wrap text such that the following conditions are met:
- If the text isn't a wide as the container, scale the up text to fit.
- If the text is wider than the container, scale the text down to fit.
- In the case that text is scaled down, wrap the text to prevent ending up with one tiny, unreadable paragraph.
I've tried parbox, pbox, tabular, and adjustbox, none quite meeting all three conditions.
Here's the gist:
\documentclass{article}
\usepackage[percent]{overpic}
\usepackage[outline]{contour}
\usepackage{fontspec}
\newfontfamily\headingText[Color=FFFFFF]{KnowYourProduct}
\newcommand{\myFrame}[1] {
\begin{overpic}[width=6cm,height=3cm,grid,tics=10]{Template}
\put (8,25) {
{\contourlength{0.025em}\contour{black}{\headingText #1}}
}
\end{overpic}
}
\begin{document}
\myFrame{Title}
\myFrame{This Is A Long Title}
\myFrame{This title is so long that if you're still reading it you may want to reevaluate how you are presently squandering your personal time.}
\end{document}
