diff options
author | Karl Berry <karl@freefriends.org> | 2010-10-24 23:46:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-10-24 23:46:12 +0000 |
commit | e5d25989ee337ac9399ae9e50bed87559488814f (patch) | |
tree | e08fa9fe408fbbd07d82226b3fd8a059c8d39d7b /Master/texmf-dist/tex/latex/gmutils/gmrelsize.sty | |
parent | 5d35798dc0ca224df75f912f020c70024e1a1169 (diff) |
gmutils (24oct10)
git-svn-id: svn://tug.org/texlive/trunk@20183 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/gmutils/gmrelsize.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/gmutils/gmrelsize.sty | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/gmutils/gmrelsize.sty b/Master/texmf-dist/tex/latex/gmutils/gmrelsize.sty new file mode 100644 index 00000000000..b32a63c38f4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/gmutils/gmrelsize.sty @@ -0,0 +1,84 @@ +%% +%% \iffalse ^^A we skip the debug setting +\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{} +%% \fi +%% ^^A $Id: TheUltimateMaster.gmd,v 0.250 2010/10/24 14:42:35 natror Exp natror $ +%% This is file “gmrelsize.sty” generated with the DocStrip utility. +%% +%% +%% The original source files were: +%% +%% gmutils/gmutils.gmd (with options: `relsize') +%% +%% +%% Copyright © +%% by Grzegorz ‘Natror’ Murzynowski +%% natror (at) o2 (dot) pl +%% +%% This program is subject to the LaTeX Project Public License. +%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html +%% for the details of that license. +%% +%% LPPL status: "author-maintained". +%% +%% +%% +%% For the documentation please refer to the file(s) +%% gmutils.{gmd,pdf}. +%% +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{gmrelsize} + [2010/04/09 v0.993 chosen macros from the relsize package and mine (GM)] + + +%% +%% +%% ^^A\typeout{\unexpanded{#4}}%% +\protected\def\relsize#1{% + \ifmmode \@nomath\relsize\else + \begingroup + \@tempcnta % assign number representing current font size + \ifx\@currsize\normalsize 4\else % funny order is to have most … + \ifx\@currsize\small 3\else % …likely sizes checked first + \ifx\@currsize\footnotesize 2\else + \ifx\@currsize\large 5\else + \ifx\@currsize\Large 6\else + \ifx\@currsize\LARGE 7\else + \ifx\@currsize\scriptsize 1\else + \ifx\@currsize\tiny 0\else + \ifx\@currsize\huge 8\else + \ifx\@currsize\Huge 9\else + 4\rs@unknown@warning % unknown state: |\normalsize| as starting point + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \advance\@tempcnta#1\relax + \ifnum\@tempcnta<\z@ \rs@size@warning{small}{\string\tiny}\@tempcnta\z@ \fi + \@xa\endgroup + \ifcase\@tempcnta % set new size based on altered number + \tiny \or \scriptsize \or \footnotesize \or \small \or \normalsize \or + \large \or \Large \or \LARGE \or \huge \or \Huge \else + \rs@size@warning{large}{\string\Huge}\Huge +\fi\fi}% end of |\relsize|. + +\providecommand*\rs@size@warning[2]{\PackageWarning{gmutils (relsize)}{% + Size requested is too #1.\MessageBreak Using #2 instead}} + +\providecommand*\rs@unknown@warning{\PackageWarning{gmutils (relsize)}{Current font size + is unknown! (Why?!?)\MessageBreak Assuming \string\normalsize}} + +\DeclareRobustCommand*\larger[1][\@ne]{\relsize{+#1}} +\DeclareRobustCommand*\smaller[1][\@ne]{\relsize{-#1}} +\DeclareRobustCommand*\textlarger[2][\@ne]{{\relsize{+#1}#2}} +\DeclareRobustCommand*\textsmaller[2][\@ne]{{\relsize{-#1}#2}} +\protected\def\largerr{\relsize{+2}} +\protected\def\smallerr{\relsize{-2}} + + +%%% (For my GNU Emacs:) +%%% Local Variables: +%%% mode: doctex +%%% coding: utf-8 +%%% End: +\endinput +%% +%% End of file `gmrelsize.sty'. |