summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/scalerel
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-21 23:23:45 +0000
committerKarl Berry <karl@freefriends.org>2013-03-21 23:23:45 +0000
commitcc6a974dc0c0e376fea2434265b38e70a55ad562 (patch)
treeaf90ad840794081feb19a49e277a0e6dcab926b5 /Master/texmf-dist/tex/latex/scalerel
parent98b8c4f7f2824b0dc06866cb6ccb2668088c9a27 (diff)
scalerel (21mar13)
git-svn-id: svn://tug.org/texlive/trunk@29465 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/scalerel')
-rw-r--r--Master/texmf-dist/tex/latex/scalerel/scalerel.sty12
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