diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/scalerel/scalerel.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/scalerel/scalerel.sty | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/scalerel/scalerel.sty b/Master/texmf-dist/tex/latex/scalerel/scalerel.sty index 998095a2a45..54beb15dce2 100644 --- a/Master/texmf-dist/tex/latex/scalerel/scalerel.sty +++ b/Master/texmf-dist/tex/latex/scalerel/scalerel.sty @@ -1,5 +1,5 @@ \ProvidesPackage{scalerel} -[2013/03/11 v1.1 +[2013/03/20 v1.3 Routines for constrained scaling and stretching of objects, relative to a reference object or in absolute terms] %% Copyright 2013 Steven B. Segletes @@ -19,6 +19,8 @@ % V1.01 Correct typos in documentation % V1.1 Corrected usepackage dependencies; Significant doc rewrite. % V1.2 Added \scaleleftright and \stretchleftright; revised docs. +% V1.3 Corrected missing % in stretch routines, added \hstretch and +% \vstretch commands; fixed version number in .sty file \usepackage{calc} \usepackage{graphicx} \global\newlength\thesrwidth @@ -55,7 +57,7 @@ \setbox0\hbox{$#2$}% \setlength\thesrwidth{\wd0}% \setlength\thesrheight{\ht0*\ratio{\srblobheight}{\ht0+\dp0}}% - \setlength\mnxsrwidth{\thesrheight*100/#1} + \setlength\mnxsrwidth{\thesrheight*100/#1}% \ifdim\thesrwidth<\mnxsrwidth\setlength\thesrwidth{\mnxsrwidth}\fi% \raisebox{-\srblobdepth+\dp0*\ratio{\srblobheight}{\ht0+\dp0}}% {\resizebox{\thesrwidth}{\thesrheight}{\usebox{\prebox}}}% @@ -84,7 +86,7 @@ \setbox0\hbox{$#2$}% \setlength\thesrwidth{\wd0}% \setlength\thesrheight{\ht0*\ratio{\srblobheight}{\ht0+\dp0}}% - \setlength\mnxsrwidth{\thesrheight*100/#1} + \setlength\mnxsrwidth{\thesrheight*100/#1}% \ifdim\thesrwidth<\mnxsrwidth\setlength\thesrwidth{\mnxsrwidth}\fi% \setlength\srblobdepth{\dp0*\ratio{\srblobheight}{\ht0+\dp0}}% \raisebox{-\srblobdepth+\dp0*\ratio{\srblobheight}{\ht0+\dp0}}% @@ -104,4 +106,8 @@ \stretchrel[#1]{\leftarg}{#3}\stretchrel*[#1]{\rightarg}{#3}% } +\newcommand\hstretch[2]{\stretchrel*{\scalebox{#1}{$#2$}}{#2}} + +\newcommand\vstretch[2]{\stretchrel*{#2}{\scalebox{#1}{$#2$}}} + \endinput |