summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2013-05-27 01:45:35 +0000
committerNorbert Preining <preining@logic.at>2013-05-27 01:45:35 +0000
commita60b23f4bbb7abb8d708e5b5b6aefd095152d536 (patch)
tree099665dfc9790b98845ff1a6c3774eecbb07533a
parentc044e50ef0f17da73341e8a04a9180f043126a54 (diff)
relsize update 5/27
git-svn-id: svn://tug.org/texlive/trunk@30707 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/relsize/README48
-rw-r--r--Master/texmf-dist/doc/latex/relsize/relsize-doc.pdfbin317217 -> 303698 bytes
-rw-r--r--Master/texmf-dist/doc/latex/relsize/relsize-doc.tex7
-rw-r--r--Master/texmf-dist/tex/latex/relsize/relsize.sty111
4 files changed, 105 insertions, 61 deletions
diff --git a/Master/texmf-dist/doc/latex/relsize/README b/Master/texmf-dist/doc/latex/relsize/README
index 722c09eab22..5cc16f9ec4d 100644
--- a/Master/texmf-dist/doc/latex/relsize/README
+++ b/Master/texmf-dist/doc/latex/relsize/README
@@ -1,33 +1,35 @@
-relsize.sty 4.0 Sept 21, 2011
-This software is contributed to the public domain.
+relsize.sty 4.1 Mar 29, 2013
-LaTex2e version by Donald Arseneau <asnd@triumf.ca> and
-Matt Swift <swift at bu.edu>.
-Original LaTex2.09 smaller.sty author: Bernie Cosell
+Setting the font size relative to the current size
+Authored by Donald Arseneau <asnd@triumf.ca> and Matt Swift <swift@bu.edu>.
+(Inspired by smaller.sty author Bernie Cosell)
-Setting the font size relative to the current size.
+This software is contributed to the public domain by its authors, who disclaim
+all copyrights. For people and jurisdictions that do not recognize contribution
+to the public domain, this software is licensed by the terms of the unlicense,
+<http://unlicense.org/>
commands are:
- \relsize{n} where n gives the number of steps ("mag-step" = factor of 1.2)
- to change the size by; n = 3 changes from \normalsize to
- \LARGE size. Negative n selects smaller fonts. n is an
- integer (or half-integer).
+\relsize{n} where n gives the number of steps ("mag-step" = factor of 1.2)
+ to change the size by; n = 3 changes from \normalsize to
+ \LARGE size. Negative n selects smaller fonts. n is an
+ integer (or half-integer).
- \smaller == \relsize{-1}, \smaller[n] == \relsize{-n}
- \larger == \relsize{1}, \larger[n] == \relsize{n}
+\smaller = \relsize{-1}, \smaller[n] = \relsize{-n}
+\larger = \relsize{1}, \larger[n] = \relsize{n}
- \textsmaller{text}, \textlarger{text} - versions that take an argument
+\textsmaller{text}, \textlarger{text} - versions that take an argument
- \relscale{f} like \relsize, but instead of scale-steps,
- the parameter is a scale factor, such as .75
- \textscale{f}{text}
+\relscale{f} like \relsize, but instead of scale-steps,
+ the parameter is a scale factor, such as .75
+\textscale{f}{text}
- The font-size command nearest the requested size will be used, and if
- the size error is more than \RSpercentTolerance, then the size will
- be adjusted more precisely using \fontsize. (The default empty
- \RSpercentTolerance signals automatic handling, choosing the tolerance
- based on the font declarations.)
+The font-size command nearest the requested size will be used, and if
+the size error is more than \RSpercentTolerance, then the size will
+be adjusted more precisely using \fontsize. (The default empty
+\RSpercentTolerance signals automatic handling, choosing the tolerance
+based on the font declarations.)
- \mathsmaller{A}, \mathlarger{B} - math versions
- (The math versions are entirely different from the text versions.)
+\mathsmaller{A}, \mathlarger{B} - math versions
+ (The math versions are entirely different from the text versions.)
diff --git a/Master/texmf-dist/doc/latex/relsize/relsize-doc.pdf b/Master/texmf-dist/doc/latex/relsize/relsize-doc.pdf
index b40a13c4ef5..31940bc74d9 100644
--- a/Master/texmf-dist/doc/latex/relsize/relsize-doc.pdf
+++ b/Master/texmf-dist/doc/latex/relsize/relsize-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/relsize/relsize-doc.tex b/Master/texmf-dist/doc/latex/relsize/relsize-doc.tex
index 5475609a5ba..6c63e7eaa78 100644
--- a/Master/texmf-dist/doc/latex/relsize/relsize-doc.tex
+++ b/Master/texmf-dist/doc/latex/relsize/relsize-doc.tex
@@ -26,15 +26,13 @@
\addtokomafont{title}{\rmfamily}
\title{The \pkg{relsize} package\thanks
- {This manual corresponds to \pkg{relsize.sty}~v4.0, dated~Sept 21, 2011.}}
+ {This manual corresponds to \pkg{relsize.sty}~v4.1, dated~March 29, 2013.}}
\author{%
by Donald Arseneau\thanks{\mail{asnd@triumf.ca}, Vancouver, Canada}%
\and originally based on \pkg{smaller.sty} by Bernie Cosell
-% \thanks{\mail{cosell@WILMA.BBN.COM}},%
\and and combined with code by Matt Swift
-%\thanks{\mail{swift@bu.edu}}.%
}
-\date{Sept 21, 2011}
+\date{March 29, 2013}
\begin{document}
@@ -129,6 +127,7 @@ enough to overflow the range of sizes, depending on \cmd{\RSsmallest},
grouping to undo relative size changes because it is unsafe to counteract
one change with an ``equal'' change in the opposite direction. Or just use
the commands that take the text as arguments, like \verb+\textsmaller{this}+.
+
\end{small}
Typically, the font-size commands do not select fonts at precise regular
diff --git a/Master/texmf-dist/tex/latex/relsize/relsize.sty b/Master/texmf-dist/tex/latex/relsize/relsize.sty
index 1962f610916..a12bbb49e61 100644
--- a/Master/texmf-dist/tex/latex/relsize/relsize.sty
+++ b/Master/texmf-dist/tex/latex/relsize/relsize.sty
@@ -1,11 +1,14 @@
-% relsize.sty 4.0 Sept 21, 2011
-% This software is contributed to the public domain.
-%
-% LaTex2e version by Donald Arseneau <asnd@triumf.ca> and
-% Matt Swift <swift@bu.edu>.
-% Original LaTex2.09 smaller.sty author: Bernie Cosell <cosell at WILMA.BBN.COM>
-%
+% relsize.sty 4.1 Mar 29, 2013
+%
% Setting the font size relative to the current size
+%
+% Authored by Donald Arseneau <asnd@triumf.ca> and Matt Swift <swift@bu.edu>.
+% (Inspired by smaller.sty author Bernie Cosell)
+%
+% This software is contributed to the public domain by its authors, who disclaim
+% all copyrights. For people and jurisdictions that do not recognize contribution
+% to the public domain, this software is licensed by the terms of the unlicense,
+% <http://unlicense.org/>
%
% commands are:
% \relsize{n} where n gives the number of steps ("mag-step" = factor of 1.2)
@@ -13,8 +16,8 @@
% \LARGE size. Negative n selects smaller fonts. n is an
% integer (or half-integer).
%
-% \smaller == \relsize{-1}, \smaller[n] == \relsize{-n}
-% \larger == \relsize{1}, \larger[n] == \relsize{n}
+% \smaller = \relsize{-1}, \smaller[n] = \relsize{-n}
+% \larger = \relsize{1}, \larger[n] = \relsize{n}
%
% \textsmaller{text}, \textlarger{text} - versions that take an argument
%
@@ -34,7 +37,7 @@
% More comments at the end of this file, and full documentation in
% relsize-doc.pdf
-\ProvidesPackage{relsize}[2011/09/21 ver 4.0]
+\ProvidesPackage{relsize}[2013/03/29 ver 4.1]
\DeclareRobustCommand\relsize[1]{%
\ifmmode \@nomath\relsize\else
@@ -73,10 +76,14 @@
% perform automatic tolerance adjustment, if requested
\ifx\RSpercentTolerance\@empty \rs@autoTol \fi
% apply limits
- \ifdim\@tempdimb<\RSsmallest \@tempdimb=\RSsmallest
- \rs@size@warning{small}{\RSsmallest}\fi
- \ifdim\@tempdimb>\RSlargest \@tempdimb=\RSlargest
- \rs@size@warning{large}{\RSlargest}\fi
+ \ifdim\@tempdimb<\RSsmallest
+ \rs@size@warning{\the\@tempdimb}{small}{\RSsmallest}%
+ \@tempdimb=\RSsmallest
+ \fi
+ \ifdim\@tempdimb>\RSlargest
+ \rs@size@warning{\the\@tempdimb}{large}{\RSlargest}%
+ \@tempdimb=\RSlargest
+ \fi
% Look up that size in list of pre-defined sizes. Put error of
% closest match in \@tempdima
\def\@tempa{\relax}\@tempdima-\@m\p@
@@ -114,7 +121,7 @@
\else
\endgroup
\fi}
-
+\def\@absVal#1{\ifnum#1<\z@-\fi#1}
% Tolerance for size mis-match (%). The empty definition triggers
% automatic selection: 5 for scalable fonts, 30 otherwise.
@@ -135,8 +142,8 @@
% Warning messages
-\newcommand\rs@size@warning[2]{\PackageWarning{relsize}{%
- Size requested is too #1.\MessageBreak Using #2 instead}}
+\newcommand\rs@size@warning[3]{\PackageWarning{relsize}{%
+ Font size #1 is too #2.\MessageBreak Using #3 instead}}
% derived commands
@@ -165,28 +172,48 @@
\def\rs@fontsizes{}
\def\@tempa#1{\ifx\@undefined#1\else
\expandafter\@tempb#1\@empty\relax\relax\delimiter{#1}\fi}
-\def\@absVal#1{\ifnum#1<\z@-\fi#1}
% parse definition of font-size command (like \large)
% #1 = \@setfontsize #2 = the command (\large) #3 = size #4 = rest
\def\@tempb#1#2#3#4\delimiter#5{%
- \let\protect\@unexpandable@protect
- \message{Examine \string#5 starts \string#1 size may be \string#3. }%
- \ifcase0\ifx\protect#1\@firstofone\relax\ifx\@empty#31\fi\fi % normal
+ \def\@tempc{\protect !\@empty}\def\@tempd{#1!#3}%
+ \ifx\@tempc\@tempd % self-protected: recurse.
+ \expandafter\@tempb#2\@empty\relax\relax\delimiter{#5}%
+ \else
\@tempdimb\z@
- \ifx\@setfontsize#1\relax\ifx#5#2\@firstofone\relax
+ \def\@tempc{\@setfontsize !#5}\def\@tempd{#1!#2}%
+ \ifx\@tempc\@tempd % Normal LaTeX2e
+ \afterassignment\strip@prefix \@tempdimb #3pt>%
+ \else
+ \def\@tempc{\@xsetfontsize !#5}\def\@tempd{#1!#2}%
+ \ifx\@tempc\@tempd % AMS (defines \@xp=\expandafter. Note: they have their own \larger/\smaller)
+ \chardef\@currsizeindex#3\relax
+ \edef\@tempc{\@xp\ifcase\@xp\@currsizeindex\@typesizes\fi}%
+ \afterassignment\strip@prefix \@tempdimb \@xp\@firstoftwo\@tempc pt>%
+ \else
+ \def\@tempc{\@setsize !#5}\def\@tempd{#1!#2}%
+ \ifx\@tempc\@tempd % 2.09 style
\afterassignment\strip@prefix \@tempdimb #3pt>%
- \fi\fi
- \ifdim\@tempdimb=\z@ % Failed to parse size
- \def\RSpercentTolerance{3}% Both a setting and a flag
- \else
- \edef\rs@fontsizes{\rs@fontsizes\rs@size#2{\the\@tempdimb}}%
+ \else
+ \def\@tempc{\slide@setsize !#5}\def\@tempd{#1!#2}%
+ \ifx\@tempc\@tempd % seminar
+ \afterassignment\strip@prefix \@tempdimb #3pt>%
+ \else
+ \def\@tempc{\fontsize}\def\@tempd{#1}%
+ \ifx\@tempc\@tempd % simple
+ \afterassignment\strip@prefix \@tempdimb #2pt>%
+ \else
+ %\message{Could not parse meaning of \string#5. }%
+ \fi\fi\fi\fi\fi
+ % Checked 5 possible definitions
+ \ifdim\@tempdimb=\z@ % Failed to parse size from definition
+ \else % Take note of this size.
+ \edef\rs@fontsizes{\rs@fontsizes\rs@size#5{\the\@tempdimb}}%
\ifdim\@tempdimb<\RSsmallest \edef\RSsmallest{\the\@tempdimb}\fi
\ifdim\@tempdimb>\RSlargest \edef\RSlargest{\the\@tempdimb}\fi
+ %\message{\string#5 has size \the\@tempdimb. ^^J}%
\fi
- \or % self-protected: recurse
- \expandafter\@tempb#2\@empty\relax\relax\delimiter{#5}%
\fi
- \let\protect\@typeset@protect}
+}
% examine each (expected) pre-defined font size
\@tempa\normalsize
@@ -199,8 +226,25 @@
\@tempa\tiny
\@tempa\huge
\@tempa\Huge
-\@tempa\HUGE % moresize.sty
+% moresize.sty
+\@tempa\HUGE
\@tempa\ssmall
+% beamer
+\@tempa\Tiny
+\@tempa\TINY
+% AMS classes
+\@tempa\SMALL
+\@tempa\Small
+
+%\show\rs@fontsizes
+
+% Check that we recorded sizes for at least two font-size commands.
+% Value of \RSpercentTolerance is both a setting and a flag
+\ifx\rs@fontsizes\@empty
+ \def\RSpercentTolerance{0}%
+\else\ifdim\RSsmallest<\RSlargest\else
+ \def\RSpercentTolerance{3}%
+\fi\fi
\ifx\RSpercentTolerance\@empty \else
@@ -210,7 +254,6 @@
\def\RSsmallest{\p@}%
\def\RSlargest{100pt}%
- \ifx\rs@fontsizes\@empty \def\RSpercentTolerance{0}\fi
\fi
@@ -269,10 +312,10 @@
\endinput
==========================================================
-R E L S I Z E . S T Y ver 4.0 Sept 21, 2011
+R E L S I Z E . S T Y ver 4.1 Mar 29, 2013
by Donald Arseneau, asnd@triumf.ca, Vancouver, Canada
-originally based on smaller.sty by Bernie Cosell, cosell@WILMA.BBN.COM,
+originally based on smaller.sty by Bernie Cosell,
and combined with the version by Matt Swift, swift@bu.edu.