| 1 |
%% |
| 2 |
%% This is file `lwarp-textfit.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `textfit') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
|
| 19 |
\LWR@ProvidesPackageDrop{textfit}[1994/04/15] |
| 20 |
\newsavebox{\LWR@textfitbox} |
| 21 |
|
| 22 |
\newcommand*{\LWR@textfitscale}[2]{% |
| 23 |
\setlength{\LWR@templengthone}{#1}% |
| 24 |
\setlength{\LWR@templengthone}{% |
| 25 |
1em*\ratio{\LWR@templengthone}{\LWR@templengthtwo}% |
| 26 |
}% |
| 27 |
\InlineClass[font-size:\LWR@printlength{\LWR@templengthone}]{textfit}{#2}% |
| 28 |
} |
| 29 |
|
| 30 |
\newcommand*{\scaletowidth}[2]{% |
| 31 |
\sbox{\LWR@textfitbox}{#2}% |
| 32 |
\settowidth{\LWR@templengthtwo}{\usebox{\LWR@textfitbox}}% |
| 33 |
\LWR@textfitscale{#1}{#2}% |
| 34 |
} |
| 35 |
|
| 36 |
\newcommand*{\scaletoheight}[2]{% |
| 37 |
\sbox{\LWR@textfitbox}{#2}% |
| 38 |
\settoheight{\LWR@templengthtwo}{\usebox{\LWR@textfitbox}}% |
| 39 |
\LWR@textfitscale{#1}{#2}% |
| 40 |
} |
| 41 |
\endinput |
| 42 |
%% |
| 43 |
%% End of file `lwarp-textfit.sty'. |