[texhax] Command to find optimum font size of text.

Ulrike Fischer news3 at nililand.de
Thu Nov 12 14:37:50 CET 2015

Am Thu, 12 Nov 2015 07:19:35 -0500 schrieb Gerard E. Seibert:

> I seriously doubt that this can be done; however, I thought I would ask
> anyway.
> We have commands like "\vfill" and "\hrulefill", etcetera that fill a space
> to its maximum capacity. Now, I would like to know if something like that
> exists that can take a "text" phase and and enlarge or decrease its font size
> to fill a predefined space.
> Example, I have a table that has a cell that is 3 inches wide. I want the
> text I enter in that cell to appear as large as possible in that space. I
> can, of course, experiment until I find the optimum size; however, a function
> that did it automatically would be a time saver.
> As I stated, I don't believe anything like that exists, but it doesn't hurt
> to ask.


For longer text you can also e.g. use tcolorbox:

\begin{tcbraster}[raster columns=3,raster valign=bottom]

See also

Ulrike Fischer 

More information about the texhax mailing list