diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/scsnowman/scsnowman.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/scsnowman/scsnowman.sty | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/scsnowman/scsnowman.sty b/Master/texmf-dist/tex/latex/scsnowman/scsnowman.sty index 77d2ab22d3c..1c38d12474f 100644 --- a/Master/texmf-dist/tex/latex/scsnowman/scsnowman.sty +++ b/Master/texmf-dist/tex/latex/scsnowman/scsnowman.sty @@ -10,10 +10,10 @@ %% Twitter : @aminophen %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{scsnowman}[2017/01/22 v1.1 Snowman variants using TikZ] +\ProvidesPackage{scsnowman}[2017/08/08 v1.2 Snowman variants using TikZ] \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sctkzsym-base}} \ProcessOptions\relax -\RequirePackage{sctkzsym-base}[2017/01/22] +\RequirePackage{sctkzsym-base}[2017/08/08] % % make document snowman (joke) \ifsctkzsym@document @@ -106,6 +106,7 @@ \newcommand\sctkzsym@snowman@initkeys{% \def\sctkzsym@snowman@init{false}% \def\sctkzsym@snowman@scale{1}% + \def\sctkzsym@snowman@shape{normal}% \def\sctkzsym@snowman@body{false}% \def\sctkzsym@snowman@eyes{true}% default on \def\sctkzsym@snowman@mouthshape{smile}% @@ -126,9 +127,10 @@ % key definitions \sctkzsym@define@key@withbool{snowman}{init} \sctkzsym@define@key@wodefault{snowman}{scale} +\sctkzsym@define@key@wodefault{snowman}{shape} \sctkzsym@define@key@withbool{snowman}{body} \sctkzsym@define@key@withbool{snowman}{eyes} -\sctkzsym@define@key@wodefault{snowman}{mouthshape} +\sctkzsym@define@key@withword{snowman}{mouthshape}{smile,frown,tight} \sctkzsym@define@key@withbool{snowman}{mouth} \sctkzsym@define@key@withbool{snowman}{sweat} \sctkzsym@define@key@withbool{snowman}{hat} @@ -138,9 +140,6 @@ \sctkzsym@define@key@withbool{snowman}{snow} \sctkzsym@define@key@withbool{snowman}{adjustbaseline} % -% count definitions for \sctkzsym@hndl@key@wodefault -\newcount\sctkzsym@snowman@mouthshape@c -% % definition of \scsnowman[...] \DeclareRobustCommand\scsnowman[1][]{% % key initialization using default @@ -191,7 +190,7 @@ \sctkzsym@hndl@key@withbool{snowman}{eyes}% \def\sctkzsym@snowman@eyepath{\path[fill=\sctkzsym@snowman@eyefill]}% % check mouth (currently mouth=<color> not supported; falling back to default-(anti)color) - \sctkzsym@hndl@key@wodefault{snowman}{mouthshape}{smile}{frown}{tight}% + \sctkzsym@hndl@key@withword{snowman}{mouthshape}% \sctkzsym@hndl@key@withbool{snowman}{mouth}% \def\sctkzsym@snowman@mouthpath{\path[draw=\sctkzsym@snowman@mouthstroke]}% % check sweat @@ -220,11 +219,16 @@ % % drawing snowman \set@sctkzsym@coord@scl{\sctkzsym@snowman@scale}% - \ifdim\sctkzsym@coord@scl<0pt\set@sctkzsym@coord@scl{-\sctkzsym@snowman@scale}\fi% + \ifdim\sctkzsym@coord@scl<\z@\set@sctkzsym@coord@scl{-\sctkzsym@snowman@scale}\fi% % %%%%% input from def file % - \sctkzsym@snowman@normal + \expandafter\ifx\csname sctkzsym@snowman@shape@\sctkzsym@snowman@shape\endcsname\relax + \PackageError{scsnowman}{% + Unsupported value `\sctkzsym@snowman@shape' for shape}\@ehc + \else + \csname sctkzsym@snowman@shape@\sctkzsym@snowman@shape\endcsname + \fi % %%%%% % @@ -243,8 +247,18 @@ \sctkzsym@snowman@defaultkeys } % +% definition of \usescsnowmanlibrary{...} +\newcommand{\usescsnowmanlibrary}[1]{% + \edef\@tempa{\zap@space#1 \@empty}% + \@for\@tempa:=\@tempa\do{% + \chardef\sctkzsym@catcode=\catcode`\@\relax + \makeatletter\input{scsnowman-\@tempa.def}% + \catcode`\@=\sctkzsym@catcode\relax}% +} +\@onlypreamble\usescsnowmanlibrary +% % load shape definitions -\input{scsnowman-normal.def} +\usescsnowmanlibrary{normal}% default % \endinput %% |