diff options
Diffstat (limited to 'graphics/pgf/contrib/scsnowman')
-rw-r--r-- | graphics/pgf/contrib/scsnowman/LICENSE | 25 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/Makefile | 32 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/README.md | 31 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman-normal.def | 192 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman-sample.pdf | bin | 0 -> 66401 bytes | |||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman-sample.tex | 167 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman-zrtest.pdf | bin | 0 -> 27023 bytes | |||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman-zrtest.tex | 21 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman.pdf | bin | 0 -> 388258 bytes | |||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman.sty | 381 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/scsnowman.tex | 485 | ||||
-rw-r--r-- | graphics/pgf/contrib/scsnowman/sctkzsym-base.sty | 150 |
12 files changed, 1484 insertions, 0 deletions
diff --git a/graphics/pgf/contrib/scsnowman/LICENSE b/graphics/pgf/contrib/scsnowman/LICENSE new file mode 100644 index 0000000000..0d1ab85360 --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/LICENSE @@ -0,0 +1,25 @@ +(The BSD 2-Clause License) + +Copyright (c) 2015-2018 Hironobu Yamashita +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/graphics/pgf/contrib/scsnowman/Makefile b/graphics/pgf/contrib/scsnowman/Makefile new file mode 100644 index 0000000000..953a175352 --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/Makefile @@ -0,0 +1,32 @@ +KANJI = -kanji=utf8 +FONTMAP = -f ipaex.map -f ptex-ipaex.map +TEXMF = $(shell kpsewhich -var-value=TEXMFHOME) + +all: scsnowman.pdf \ + scsnowman-sample.pdf scsnowman-zrtest.pdf + +scsnowman.pdf: scsnowman.sty scsnowman.tex + lualatex scsnowman.tex + lualatex scsnowman.tex + lualatex scsnowman.tex +scsnowman-sample.pdf: scsnowman.sty scsnowman-sample.tex + platex scsnowman-sample.tex + platex scsnowman-sample.tex + dvipdfmx scsnowman-sample.dvi +scsnowman-zrtest.pdf: scsnowman.sty scsnowman-zrtest.tex + pdflatex scsnowman-zrtest.tex + pdflatex scsnowman-zrtest.tex + +.PHONY: install clean +install: + mkdir -p ${TEXMF}/doc/latex/scsnowman + cp ./Makefile ${TEXMF}/doc/latex/scsnowman/ + cp ./LICENSE ${TEXMF}/doc/latex/scsnowman/ + cp ./README.md ${TEXMF}/doc/latex/scsnowman/ + cp ./*.pdf ${TEXMF}/doc/latex/scsnowman/ + cp ./*.tex ${TEXMF}/doc/latex/scsnowman/ + mkdir -p ${TEXMF}/tex/latex/scsnowman + cp ./*.sty ${TEXMF}/tex/latex/scsnowman/ + cp ./*.def ${TEXMF}/tex/latex/scsnowman/ +clean: + rm -f *.dvi *.pdf diff --git a/graphics/pgf/contrib/scsnowman/README.md b/graphics/pgf/contrib/scsnowman/README.md new file mode 100644 index 0000000000..af14c4af46 --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/README.md @@ -0,0 +1,31 @@ +# scsnowman + +This LaTeX package provides a command `\scsnowman`, which can display many +variants of snowman ("yukidaruma" in Japanese). +This package utilizes TikZ for drawing snowman. + +The package is maintained on GitHub: +https://github.com/aminophen/scsnowman + +## Requirements + +This package requires "tikz" package. + +## Installation + +Deploy the files in an appropriate place under the TEXMF tree. + + * scsnowman.sty, sctkzsym-base.sty, scsnowman-normal.def + => $TEXMF/tex/latex/scsnowman + * scsnowman.{tex,pdf}, scsnowman-sample.{tex,pdf} + => $TEXMF/doc/latex/scsnowman + +Then, execute mktexlsr. + +## License + +This package is distributed under the BSD 2-Clause License. +See [LICENSE](./LICENSE). + +Copyright (c) 2015-2018 Hironobu Yamashita +http://acetaminophen.hatenablog.com/ diff --git a/graphics/pgf/contrib/scsnowman/scsnowman-normal.def b/graphics/pgf/contrib/scsnowman/scsnowman-normal.def new file mode 100644 index 0000000000..235f9496ec --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman-normal.def @@ -0,0 +1,192 @@ +%% +%% This is file `scsnowman-normal.def', part of scsnowman package. +%% Maintained on GitHub: +%% https://github.com/aminophen/scsnowman +%% +%% Copyright (c) 2015-2018 Hironobu Yamashita +%% Email : h.y.acetaminophen[a t]gmail.com +%% GitHub : https://github.com/aminophen +%% Blog : http://acetaminophen.hatenablog.com/ +%% Twitter : @aminophen +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{scsnowman-normal.def}[2018/06/07 v1.2d scsnowman definition (normal)] +\def\sctkzsym@snowman@shape@normal{% + \setlength{\sctkzsym@coord@baseline}{% + \ifsctkzsym@snowman@adjustbaseline + 0.144ex\relax + \else + \z@ + \fi}% + \sctkzsym@beginyokobox + \begin{tikzpicture}[x=1.8ex,y=1.8ex,line width=0.025ex*\sctkzsym@coord@scl,line join=round,line cap=round,scale=\sctkzsym@snowman@scale,baseline=\sctkzsym@coord@baseline*\sctkzsym@coord@scl] + \useasboundingbox(0,0) rectangle (1,1); + \sctkzsym@snowman@bodypath % body (IPA-like) + (0.5,0.72) .. controls (0.64,0.72) and (0.76,0.65) .. + (0.76,0.55) .. controls (0.76,0.51) and (0.72,0.47) .. + (0.67,0.44) .. controls (0.79,0.41) and (0.84,0.32) .. + (0.84,0.25) .. controls (0.84,0.13) and (0.75,0.08) .. + (0.68,0.08) -- + (0.32,0.08) .. controls (0.25,0.08) and (0.16,0.13) .. + (0.16,0.25) .. controls (0.16,0.32) and (0.21,0.41) .. + (0.33,0.44) .. controls (0.28,0.47) and (0.24,0.51) .. + (0.24,0.55) .. controls (0.24,0.65) and (0.36,0.72) .. + (0.5,0.72) -- + cycle; + \ifsctkzsym@snowman@eyes + \sctkzsym@snowman@eyepath (0.40,0.56) circle (0.02 and 0.03); + \sctkzsym@snowman@eyepath (0.60,0.56) circle (0.02 and 0.03); + \fi + \ifsctkzsym@snowman@nose + \sctkzsym@snowman@nosepath + (0.49,0.50) .. controls (0.52,0.51) and (0.51,0.54) .. + (0.48,0.54) .. controls (0.46,0.54) and (0.40,0.52) .. + (0.40,0.52) .. controls (0.39,0.51) and (0.46,0.50) .. + (0.49,0.50) -- + cycle; + \fi + \ifsctkzsym@snowman@mouth + \ifx\sctkzsym@snowman@mouthshape\sctkzsym@snowman@mouthshape@iii + \sctkzsym@snowman@mouthpath (0.40,0.47) -- (0.60,0.47); + \else\ifx\sctkzsym@snowman@mouthshape\sctkzsym@snowman@mouthshape@ii + \sctkzsym@snowman@mouthpath (0.40,0.46) .. controls (0.45,0.49) and (0.55,0.49) .. (0.60,0.46); + \else + \sctkzsym@snowman@mouthpath (0.40,0.48) .. controls (0.45,0.45) and (0.55,0.45) .. (0.60,0.48); + \fi\fi + \fi + \ifsctkzsym@snowman@sweat + \sctkzsym@snowman@sweatpath (0.70,0.56) .. controls (0.64,0.46) and (0.75,0.46) .. (0.70,0.56) -- cycle; + \fi + \ifsctkzsym@snowman@hat + \sctkzsym@snowman@hatpath % hat + (0.58,0.90) -- + (0.77,0.81) -- + (0.74,0.61) .. controls (0.66,0.60) and (0.50,0.66) .. + (0.46,0.72) -- + (0.58,0.90) -- + cycle; + \fi + \ifsctkzsym@snowman@mikan + \sctkzsym@snowman@mikanpath % mikan + (0.50,0.80) circle (0.15 and 0.12); + \ifsctkzsym@snowman@leaf + \sctkzsym@snowman@leafpath + (0.50,0.93) .. controls (0.58,0.95) .. + (0.65,0.88) .. controls (0.50,0.87) .. + (0.50,0.93) -- + cycle; + \fi + \fi + \ifsctkzsym@snowman@broom + \sctkzsym@snowman@broompath[line width=0.08ex*\sctkzsym@coord@scl,line cap=butt] + (0.03,0.06) -- (0.12,0.50); + \sctkzsym@snowman@broompath[line width=0.03ex*\sctkzsym@coord@scl,line cap=butt] + (0.11,0.50) -- (0.06,0.75) + (0.12,0.50) -- (0.12,0.72) + (0.12,0.50) -- (0.18,0.76) + (0.12,0.50) -- (0.21,0.70) + (0.13,0.50) -- (0.27,0.74); + \fi + \ifsctkzsym@snowman@arms + \sctkzsym@snowman@armspath % right arm (SourceHanSans-like) + (0.20,0.31) .. controls (0.19,0.33) and (0.14,0.41) .. + (0.13,0.42) .. controls (0.12,0.43) and (0.10,0.43) .. + (0.07,0.44) .. controls (0.04,0.46) and (0.06,0.46) .. + (0.08,0.46) .. controls (0.09,0.46) and (0.11,0.44) .. + (0.12,0.44) .. controls (0.14,0.46) and (0.14,0.47) .. + (0.15,0.49) .. controls (0.16,0.51) and (0.16,0.49) .. + (0.16,0.48) .. controls (0.16,0.46) and (0.14,0.44) .. + (0.15,0.43) .. controls (0.16,0.42) and (0.21,0.35) .. + (0.22,0.33) .. controls (0.23,0.31) and (0.21,0.30) .. + (0.20,0.31) -- + cycle; + \sctkzsym@snowman@armspath % left arm (SourceHanSans-like) + (0.80,0.31) .. controls (0.81,0.33) and (0.86,0.41) .. + (0.87,0.42) .. controls (0.88,0.43) and (0.90,0.43) .. + (0.93,0.44) .. controls (0.96,0.46) and (0.94,0.46) .. + (0.92,0.46) .. controls (0.91,0.46) and (0.89,0.44) .. + (0.88,0.44) .. controls (0.86,0.46) and (0.86,0.47) .. + (0.85,0.49) .. controls (0.84,0.51) and (0.84,0.49) .. + (0.84,0.48) .. controls (0.84,0.46) and (0.86,0.44) .. + (0.85,0.43) .. controls (0.84,0.42) and (0.79,0.35) .. + (0.78,0.33) .. controls (0.77,0.31) and (0.79,0.30) .. + (0.80,0.31) -- + cycle; + \fi + \ifsctkzsym@snowman@muffler + \sctkzsym@snowman@mufflerpath % muffler (SourceHanSans-like) + (0.27,0.48) .. controls (0.42,0.38) and (0.58,0.38) .. + (0.73,0.48) .. controls (0.75,0.46) and (0.76,0.44) .. + (0.77,0.41) .. controls (0.77,0.39) and (0.75,0.37) .. + (0.73,0.36) .. controls (0.74,0.33) and (0.74,0.31) .. + (0.76,0.26) .. controls (0.75,0.25) and (0.72,0.24) .. + (0.66,0.23) .. controls (0.66,0.27) and (0.65,0.30) .. + (0.63,0.34) .. controls (0.42,0.30) and (0.32,0.35) .. + (0.24,0.41) .. controls (0.25,0.45) and (0.26,0.47) .. + (0.27,0.48) -- + cycle; + \fi + \ifsctkzsym@snowman@buttons\ifsctkzsym@snowman@muffler + \sctkzsym@snowman@buttonpath (0.50,0.16) circle (0.03); + \sctkzsym@snowman@buttonpath (0.50,0.26) circle (0.03); + \else + \sctkzsym@snowman@buttonpath (0.50,0.17) circle (0.03); + \sctkzsym@snowman@buttonpath (0.50,0.29) circle (0.03); + \fi\fi + \ifsctkzsym@snowman@snow + \ifsctkzsym@snowman@broom + \sctkzsym@snowman@snowpath (0.13,0.81) circle (0.04); + \else + \sctkzsym@snowman@snowpath (0.07,0.28) circle (0.04); + \sctkzsym@snowman@snowpath (0.13,0.55) circle (0.04); + \ifsctkzsym@snowman@note\else + \sctkzsym@snowman@snowpath (0.08,0.68) circle (0.04); + \sctkzsym@snowman@snowpath (0.23,0.76) circle (0.04); + \fi + \fi + \sctkzsym@snowman@snowpath (0.42,0.89) circle (0.04); + \sctkzsym@snowman@snowpath (0.74,0.89) circle (0.04); + \sctkzsym@snowman@snowpath (0.88,0.73) circle (0.04); + \sctkzsym@snowman@snowpath (0.92,0.53) circle (0.04); + \sctkzsym@snowman@snowpath (0.94,0.23) circle (0.04); + \fi + \ifsctkzsym@snowman@note + \sctkzsym@snowman@notepath % musical note (eighth note, quaver) + (0.119,0.789) .. controls (0.114,0.788) and (0.114,0.788) .. + (0.115,0.781) .. controls (0.122,0.740) and (0.124,0.732) .. + (0.125,0.728) .. controls (0.127,0.717) and (0.127,0.717) .. + (0.118,0.717) .. controls (0.105,0.717) and (0.096,0.709) .. + (0.096,0.698) .. controls (0.096,0.691) and (0.100,0.686) .. + (0.106,0.683) .. controls (0.116,0.679) and (0.131,0.687) .. + (0.134,0.698) .. controls (0.135,0.700) and (0.134,0.710) .. + (0.132,0.720) .. controls (0.126,0.752) and (0.125,0.764) .. + (0.124,0.768) .. controls (0.124,0.773) and (0.124,0.773) .. + (0.132,0.773) .. controls (0.141,0.774) and (0.145,0.771) .. + (0.148,0.764) .. controls (0.150,0.760) and (0.154,0.758) .. + (0.155,0.761) .. controls (0.156,0.761) and (0.155,0.766) .. + (0.153,0.771) .. controls (0.151,0.780) and (0.146,0.785) .. + (0.139,0.789) .. controls (0.136,0.791) and (0.126,0.791) .. + (0.119,0.789) -- + cycle; + \sctkzsym@snowman@notepath % wavy line + (0.235,0.770) .. controls (0.234,0.769) and (0.232,0.765) .. + (0.231,0.761) .. controls (0.228,0.750) and (0.223,0.749) .. + (0.210,0.760) .. controls (0.203,0.766) and (0.201,0.766) .. + (0.195,0.766) .. controls (0.186,0.766) and (0.179,0.761) .. + (0.174,0.750) .. controls (0.170,0.742) and (0.169,0.738) .. + (0.172,0.735) .. controls (0.176,0.732) and (0.179,0.734) .. + (0.183,0.741) .. controls (0.187,0.750) and (0.191,0.755) .. + (0.194,0.755) .. controls (0.196,0.755) and (0.200,0.752) .. + (0.203,0.749) .. controls (0.210,0.743) and (0.220,0.738) .. + (0.225,0.738) .. controls (0.231,0.738) and (0.237,0.742) .. + (0.241,0.749) .. controls (0.245,0.757) and (0.246,0.766) .. + (0.242,0.770) .. controls (0.239,0.772) and (0.238,0.772) .. + (0.235,0.770) -- + cycle; + \fi + \end{tikzpicture}% + \sctkzsym@endyokobox +} +\endinput +%% +%% End of file `scsnowman-normal.def'. diff --git a/graphics/pgf/contrib/scsnowman/scsnowman-sample.pdf b/graphics/pgf/contrib/scsnowman/scsnowman-sample.pdf Binary files differnew file mode 100644 index 0000000000..427a331941 --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman-sample.pdf diff --git a/graphics/pgf/contrib/scsnowman/scsnowman-sample.tex b/graphics/pgf/contrib/scsnowman/scsnowman-sample.tex new file mode 100644 index 0000000000..f88f50226e --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman-sample.tex @@ -0,0 +1,167 @@ +%% +%% This is file `scsnowman-sample.tex', part of scsnowman package. +%% Maintained on GitHub: +%% https://github.com/aminophen/scsnowman +%% +%% Copyright (c) 2015-2018 Hironobu Yamashita +%% Email : h.y.acetaminophen[a t]gmail.com +%% GitHub : https://github.com/aminophen +%% Blog : http://acetaminophen.hatenablog.com/ +%% Twitter : @aminophen +%% +% platex + dvipdfmx +\documentclass[dvipdfmx,twocolumn]{jsarticle} +\usepackage{plext} +\usepackage[margin=21truemm]{geometry} +\usepackage[svgnames]{xcolor} +\usepackage{scsnowman} +\title{\textsf{scsnowman}パッケージの実用例} +\author{Hironobu Yamashita} +\begin{document} +\maketitle + +% ふつうのゆきだるま +これはゆきだるま\scsnowman です。 + +% 雪ありゆきだるま +今日の天気は\scsnowman[snow]です。 + +% 帽子をかぶったゆきだるま +ゆきだるま\scsnowman[hat]が帽子をかぶりました。 + +% 帽子をかぶったゆきだるま(帽子の色は青) +私は青い帽子をかぶった\scsnowman[hat=blue]が大好きです。 + +% 帽子とマフラー付(マフラーの色は赤) +マフラー\scsnowman[hat=true,muffler=red]を付けてあげましょう。 + +% 腕あり +腕も作って\scsnowman[hat=true,muffler=red,arms=true]あげましょう。 + +% サイズ変更 +小\scsnowman、 +中\scsnowman[scale=3]、 +大\scsnowman[scale=5]。 + +% ゆきだるま三兄弟 +\begin{table}[htb] + \begin{tabular}{ccc} + \texttt{U+2603} & \texttt{U+26C4} & \texttt{U+26C7} \\ + \texttt{\small SNOWMAN} & \texttt{\small SNOWMAN WITHOUT SNOW} & \texttt{\small BLACK SNOWMAN} \\ + \scsnowman[scale=5,body=false,snow=true] & \scsnowman[scale=5,body=false,snow=false] & \scsnowman[scale=5,body=true,snow=true] + \end{tabular} +\end{table} + +\begin{table}[htb] + \begin{tabular}{ccc} + \texttt{U+2603} & \texttt{U+26C4} & \texttt{U+26C7} \\ + \texttt{\small SNOWMAN} & \texttt{\small SNOWMAN WITHOUT SNOW} & \texttt{\small BLACK SNOWMAN} \\ + \scsnowman[scale=5,body=false,snow=true,muffler=true] & \scsnowman[scale=5,body=false,snow=false,muffler=true] & \scsnowman[scale=5,body=true,snow=true,muffler=true] + \end{tabular} +\end{table} + +\begin{table}[htb] + \begin{tabular}{ccc} + \texttt{U+2603} & \texttt{U+26C4} & \texttt{U+26C7} \\ + \texttt{\small SNOWMAN} & \texttt{\small SNOWMAN WITHOUT SNOW} & \texttt{\small BLACK SNOWMAN} \\ + \scsnowman[scale=5,body=false,snow=true,hat=true,arms=true] & \scsnowman[scale=5,body=false,snow=false,hat=true,arms=true] & \scsnowman[scale=5,body=true,snow=true,hat=true,arms=true] + \end{tabular} +\end{table} + +\begin{table}[htb] + \begin{tabular}{ccc} + \texttt{U+????} & \texttt{U+????} & \texttt{U+????} \\ + \texttt{\small RED SNOWMAN} & \texttt{\small BLUE SNOWMAN} & \texttt{\small GREEN SNOWMAN} \\ + \scsnowman[scale=5,body=red,snow=red,hat=red] & \scsnowman[scale=5,body=blue,hat=blue,arms=blue,muffler=blue] & \scsnowman[scale=5,body=green,snow=green,arms=green] + \end{tabular} +\end{table} + +% 周囲の色に追随 +テキストが黒色の場合\scsnowman[hat,muffler=red]、 +{\color{blue}テキストが青色の場合\scsnowman[hat,muffler=red]、 +{\color{green}テキストが緑色の場合\scsnowman[hat,muffler=red]}}、 +元通り\scsnowman[hat,muffler=red]。 + +\newpage + +\scsnowmandefault{body,hat,snow,muffler}% +私、黒\scsnowman 大輔は、1950年に黒\scsnowman 太郎の長男として +誕生しました。その後、黒\scsnowman 家には… + +\scsnowmandefault{hat,snow,arms}% +お隣には白\scsnowman さんが住んでいました。白\scsnowman さんは、 +宛名の文字を「\scsnowman」でなく「\scsnowman[arms=false,muffler]」 +と書いてしまうとお手紙を読まずに食べてしまうような変わった方でした。 +ただし、\scsnowman[hat=red]のように帽子に色が付いた宛名を見ると、 +白\scsnowman さんは喜んでいました。 + +\medskip +% buttons で「ボタン」(マフラーの有無で微妙に位置が変わる) +\scsnowmandefault{scale=4,hat=Green,arms=Brown,snow=SkyBlue}% +\scsnowman[buttons=RoyalBlue,muffler=Red]% +\scsnowman[buttons=RoyalBlue]% +% mouthshape で「口の形」 +\scsnowmandefault{scale=4,hat,muffler=Red}% +\scsnowman[mouthshape=smile]% にっこり +\scsnowman[mouthshape=frown]% しかめっ面 +\scsnowman[mouthshape=tight]% 真一文字 +% sweat で「汗」 +\scsnowmandefault{scale=4,hat}% +\scsnowman[mouthshape=tight,arms,buttons,sweat] + +ゆきだるまで箇条書き: +\makeitemsnowman +\begin{itemize} + \item 動物 + \begin{itemize} + \item 哺乳類 + \item 鳥類 + \item … + \end{itemize} + \item 植物 + \begin{itemize} + \item 裸子植物 + \item 被子植物 + \begin{itemize} + \item 単子葉類 + \item 双子葉類 + \begin{itemize} + \item 合弁花類 + \item 離弁花類 + \end{itemize} + \end{itemize} + \end{itemize} +\end{itemize} +\makeitemother + +\medskip +\begin{minipage}{16zw} +ベースラインの調節なし:\par +Text, +\scsnowman[scale=1]% +\scsnowman[scale=4]% +\scsnowman[scale=7], +T.\par +ベースラインの調節あり:\par +Text, +\scsnowman[adjustbaseline,scale=1]% +\scsnowman[adjustbaseline,scale=4]% +\scsnowman[adjustbaseline,scale=7], +T. +\end{minipage}\quad +\begin{minipage}<t>{12zw} +\scsnowmandefault{} +縦書ーきで\scsnowman[hat,muffler=red]のテスト。 +私の大好きな\scsnowman[scale=2,muffler]\scsnowman[scale=2,hat]がたくさん。 +{\color{red}色が\scsnowman[body]ついても、勿論大丈夫。} +\end{minipage} + +\scsnowmandefault{adjustbaseline,scale=5.5}% +お正月:\scsnowman[eyes=false,mouth=false,mikan]% +\scsnowman[eyes=false,mouth=false,mikan=DarkOrange,leaf=DarkOliveGreen] + +The World Day of Snowman: +\scsnowman[muffler=Red,arms=Brown,buttons=Green,broom=DarkGoldenrod] +\scsnowman[body,muffler=Red,arms=Brown,nose=Orange] + +\end{document} diff --git a/graphics/pgf/contrib/scsnowman/scsnowman-zrtest.pdf b/graphics/pgf/contrib/scsnowman/scsnowman-zrtest.pdf Binary files differnew file mode 100644 index 0000000000..7967d13b75 --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman-zrtest.pdf diff --git a/graphics/pgf/contrib/scsnowman/scsnowman-zrtest.tex b/graphics/pgf/contrib/scsnowman/scsnowman-zrtest.tex new file mode 100644 index 0000000000..8fa2524ecb --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman-zrtest.tex @@ -0,0 +1,21 @@ +\documentclass[a4paper]{article} +\usepackage[unicode,hidelinks,bookmarksnumbered]{hyperref} +\usepackage{scsnowman} +\scsnowmandefault{hat,arms,snow,scale=1.2,adjustbaseline} +\renewcommand{\thesection}{\enumsnowman[muffler=red]{section}} +\pagenumbering{enumsnowman} +\begin{document} +\setcounter{page}{8} +\setcounter{section}{86} + +\section{Foo}\label{sec:Foo} +Foo \scsnowmannumeral[muffler=blue]{42}. + +\section{Bar}\label{sec:Bar} +Bar \scsnowmannumeral[muffler=blue]{84}. + +\section{Gee}\label{sec:Gee} +Gee \scsnowmannumeral[muffler=blue]{168}. +See also Sections \ref{sec:Bar} and \ref{sec:Foo}. + +\end{document} diff --git a/graphics/pgf/contrib/scsnowman/scsnowman.pdf b/graphics/pgf/contrib/scsnowman/scsnowman.pdf Binary files differnew file mode 100644 index 0000000000..776f8f74e7 --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman.pdf diff --git a/graphics/pgf/contrib/scsnowman/scsnowman.sty b/graphics/pgf/contrib/scsnowman/scsnowman.sty new file mode 100644 index 0000000000..609e7c69ce --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman.sty @@ -0,0 +1,381 @@ +%% +%% This is file `scsnowman.sty', part of scsnowman package. +%% Maintained on GitHub: +%% https://github.com/aminophen/scsnowman +%% +%% Copyright (c) 2015-2018 Hironobu Yamashita +%% Email : h.y.acetaminophen[a t]gmail.com +%% GitHub : https://github.com/aminophen +%% Blog : http://acetaminophen.hatenablog.com/ +%% Twitter : @aminophen +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{scsnowman}[2018/06/07 v1.2d Snowman variants using TikZ] +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sctkzsym-base}} +\ProcessOptions\relax +\RequirePackage{sctkzsym-base}[2017/08/08] +% +% make document snowman (joke) +\ifsctkzsym@document +\def\makedocumentsnowman{% + \ifx\documentclass\@notprerr + % Already after \begin{document}, throw an error + \def\sctkzsym@documentsnowman{% + \PackageError{scsnowman}{% + Use of \noexpand\makedocumentsnowman too late!\MessageBreak + Try using before \string\begin{document}}{% + I'll try to stop processing, but + this attempt can fail.\MessageBreak\@ehc}% + % If the above error is ignored, there's no way to + % exit successfully in all cases. So, try to continue + % processing by ignoring all LaTeX errors. + % TeX errors still remain; therefore, \makedocumentsnowman + % in internal vertical mode or math mode will fail. + \let\@latex@error\@gobbletwo\par + \scsnowman[init,scale=14,hat,muffler,buttons,snow]% + \scsnowman[init,scale=14,hat,muffler,buttons,arms]% + \scsnowman[init,scale=14,body,hat,muffler,buttons,snow]% + \end{document}}% + \else\ifx\documentclass\@twoclasseserror + \ifx\AtBeginDocument\@firstofone + % In preamble, inside \AtBeginDocument; avoid infinite loop + \def\sctkzsym@documentsnowman{% + \centering + \scsnowman[init,scale=14,hat,muffler,buttons,snow]% + \scsnowman[init,scale=14,hat,muffler,buttons,arms]% + \scsnowman[init,scale=14,body,hat,muffler,buttons,snow]% + \end{document}}% + \else + % In preamble; start document + \def\sctkzsym@documentsnowman{% + \pagestyle{empty}% + \begin{document}% + \centering + \scsnowman[init,scale=14,hat,muffler,buttons,snow]% + \scsnowman[init,scale=14,hat,muffler,buttons,arms]% + \scsnowman[init,scale=14,body,hat,muffler,buttons,snow]% + \end{document}}% + \fi + \else + % Before \documentclass{...}; load class and start document + \def\sctkzsym@documentsnowman{% + \documentclass{minimal}% + \begin{document}% + \centering + \scsnowman[init,scale=18,hat,muffler,buttons,snow]% + \scsnowman[init,scale=18,hat,muffler,buttons,arms]% + \scsnowman[init,scale=18,body,hat,muffler,buttons,snow]% + \end{document}}% + \fi\fi + \sctkzsym@documentsnowman +} +\fi +% +% change QED symbol (joke) +\ifsctkzsym@qed + \def\sctkzsym@snowman@qedsymbol{\scsnowman[init,hat=true,muffler=red]} + \newcommand{\makeqedsnowman}{% + \ifx\qedsymbol\sctkzsym@snowman@qedsymbol\else + \let\sctkzsym@saved@qedsymbol\qedsymbol + \let\qedsymbol\sctkzsym@snowman@qedsymbol + \fi + } +\fi +% +% change item label (joke) +\ifsctkzsym@item + \def\sctkzsym@snowman@labelitemi{\scsnowman[init,hat=true,muffler=red]} + \def\sctkzsym@snowman@labelitemii{\scsnowman[init,hat=true,muffler=blue]} + \def\sctkzsym@snowman@labelitemiii{\scsnowman[init,hat=true,muffler=green]} + \def\sctkzsym@snowman@labelitemiv{\scsnowman[init,hat=true,muffler=yellow]} + \newcommand{\makeitemsnowman}{% + \ifx\labelitemi\sctkzsym@snowman@labelitemi\else + \let\sctkzsym@saved@labelitemi\labelitemi + \let\sctkzsym@saved@labelitemii\labelitemii + \let\sctkzsym@saved@labelitemiii\labelitemiii + \let\sctkzsym@saved@labelitemiv\labelitemiv + \let\labelitemi\sctkzsym@snowman@labelitemi + \let\labelitemii\sctkzsym@snowman@labelitemii + \let\labelitemiii\sctkzsym@snowman@labelitemiii + \let\labelitemiv\sctkzsym@snowman@labelitemiv + \fi + } +\fi +% +%------------------------------- ZR something BEGIN + +% change enumerate label using \scsnowmannumeral (joke) +% (this feature is `scsnowman'-specific, so the name-space +% is intentionally set to \scsnowman@...) + +% unique token +\def\scsnowman@end{\scsnowman@end@} + +\let\scsnowman@eight\relax + +%% \scsnowman@scan@option\CScontinue{<prologue>} +\def\scsnowman@scan@option#1#2{% + \scsnowman@scan@option@a#2[]\scsnowman@end#1% +} +\def\scsnowman@scan@option@a#1[#2]#3\scsnowman@end#4{% + #4{#2}% +} + +\def\enumsnowman#1#{% + \scsnowman@scan@option\scsnowman@enumsnowman{#1}% +} +\def\scsnowman@enumsnowman#1#2{% + \scsnowmanNumeral{#1}{\@nameuse{c@#2}}% +} + +% For use with \pagenumbering. +\def\@enumsnowman{% + \scsnowmanNumeral{}% +} + +\def\scsnowmannumeral#1#{% + \scsnowman@scan@option\scsnowmanNumeral{#1}% +} + +% \scsnowmanNumeral{<option>}{<number>} +% change 8 to snowman in counters (joke) +% (this feature is `scsnowman'-specific, so the name-space +% is intentionally set to \scsnowman@...) + +% internal entry point +\newcommand*\scsnowmanNumeral[2]{% + \expandafter\scsnowman@@numeral\number#2\relax\scsnowman@end{#1}% +} +\def\scsnowman@@numeral#1\relax#2\scsnowman@end#3{% + \scsnowman@numeral{#3}{#1}% +} +\DeclareRobustCommand*\scsnowman@numeral[2]{% + \begingroup + \def\scsnowman@eight{\scsnowman[#1]}% + \scsnowman@numeral@a#28\scsnowman@end + \endgroup +} +\def\scsnowman@numeral@a#18#2\scsnowman@end{% + \ifx\scsnowman@end#2\scsnowman@end + #1% + \else + #1\scsnowman@eight + \scsnowman@numeral@a#2\scsnowman@end + \fi +} + +\providecommand*\pdfstringdefPreHook{} +\g@addto@macro\pdfstringdefPreHook{% + \let\scsnowman@eight\scsnowman@hy@eight + \let\scsnowman@numeral\scsnowman@hy@numeral +} +\def\scsnowman@hy@numeral#1#2{% #1 is ignored + \scsnowman@numeral@a#28\scsnowman@end +} + +\DeclareTextCommand{\scsnowman@hy@eight}{PU}{\9046\003}% U+2603 +\DeclareTextCommand{\scsnowman@hy@eight}{PD1}{8}%fallback +\ifx\forcecjktoken\@undefined\else %upTeX + \begingroup + \kansujichar8="2603 + \xdef\scsnowman@hy@eight{\kansuji8} + \endgroup +\fi + +%------------------------------- ZR something END +% +% key initialization +\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@nose{false}% + \def\sctkzsym@snowman@mouthshape{smile}% + \def\sctkzsym@snowman@mouth{true}% default on + \def\sctkzsym@snowman@sweat{false}% + \def\sctkzsym@snowman@hat{false}% + \def\sctkzsym@snowman@arms{false}% + \def\sctkzsym@snowman@muffler{false}% + \def\sctkzsym@snowman@buttons{false}% + \def\sctkzsym@snowman@snow{false}% + \def\sctkzsym@snowman@note{false}% + \def\sctkzsym@snowman@adjustbaseline{false}% + \def\sctkzsym@snowman@mikan{false}% + \def\sctkzsym@snowman@leaf{false}% + \def\sctkzsym@snowman@broom{false}% +} +\newcommand{\sctkzsym@snowman@defaultkeys}{% + \sctkzsym@snowman@initkeys +} +\sctkzsym@snowman@defaultkeys +% +% 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@withbool{snowman}{nose} +\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} +\sctkzsym@define@key@withbool{snowman}{arms} +\sctkzsym@define@key@withbool{snowman}{muffler} +\sctkzsym@define@key@withbool{snowman}{buttons} +\sctkzsym@define@key@withbool{snowman}{snow} +\sctkzsym@define@key@withbool{snowman}{note} +\sctkzsym@define@key@withbool{snowman}{adjustbaseline} +\sctkzsym@define@key@withbool{snowman}{mikan} +\sctkzsym@define@key@withbool{snowman}{leaf} +\sctkzsym@define@key@withbool{snowman}{broom} +% +% definition of \scsnowman[...] +\DeclareRobustCommand\scsnowman[1][]{% + % key initialization using default + \sctkzsym@snowman@defaultkeys + % read <key>=<value> + \setkeys{sctkzsym@snowman}{#1}% + % check init; if init=true, initialize and read keys again + \sctkzsym@hndl@key@onlybool{snowman}{init}% + \ifsctkzsym@snowman@init + \sctkzsym@snowman@initkeys + \setkeys{sctkzsym@snowman}{#1,init=false}% + \fi + % + % check body; determine whether "black snowman" or "white snowman" + \sctkzsym@hndl@key@withbool{snowman}{body}% + \ifsctkzsym@snowman@body % "black snowman"; black snow; white eyes/mouth/stroke + \def\sctkzsym@snowman@bodystroke{\sctkzsym@snowman@body}% + \def\sctkzsym@snowman@bodyfill{\sctkzsym@snowman@body}% + \def\sctkzsym@snowman@bodypath{\path[draw=\sctkzsym@snowman@bodystroke,fill=\sctkzsym@snowman@bodyfill]}% + \def\sctkzsym@snowman@snowstroke{\sctkzsym@snowman@snow}% + \def\sctkzsym@snowman@snowfill{\sctkzsym@snowman@snow}% + \def\sctkzsym@snowman@snowpath{\path[draw=\sctkzsym@snowman@snowstroke,fill=\sctkzsym@snowman@snowfill]}% + \def\sctkzsym@snowman@eyefill{\sctkzsym@defaultanticolor}% + \def\sctkzsym@snowman@nosestroke{\sctkzsym@defaultanticolor}% + \def\sctkzsym@snowman@nosefill{\sctkzsym@snowman@nose}% + \def\sctkzsym@snowman@mouthstroke{\sctkzsym@defaultanticolor}% + \def\sctkzsym@snowman@sweatstroke{\sctkzsym@defaultanticolor}% + \def\sctkzsym@snowman@sweatfill{\sctkzsym@snowman@sweat}% + \def\sctkzsym@snowman@mufflerstroke{\sctkzsym@defaultanticolor}% + \def\sctkzsym@snowman@mufflerfill{\sctkzsym@snowman@muffler}% + \def\sctkzsym@snowman@buttonstroke{\sctkzsym@defaultanticolor}% + \def\sctkzsym@snowman@buttonfill{\sctkzsym@snowman@buttons}% + \else % "white snowman"; white snow; black eyes/mouth/stroke; bodystroke should be there + \def\sctkzsym@snowman@bodystroke{\sctkzsym@defaultcolor}% + \def\sctkzsym@snowman@bodyfill{}% + \def\sctkzsym@snowman@bodypath{\path[draw=\sctkzsym@snowman@bodystroke]}% + \def\sctkzsym@snowman@snowstroke{\sctkzsym@snowman@snow}% + \def\sctkzsym@snowman@snowfill{}% + \def\sctkzsym@snowman@snowpath{\path[draw=\sctkzsym@snowman@snowstroke]}% + \def\sctkzsym@snowman@eyefill{\sctkzsym@defaultcolor}% + \def\sctkzsym@snowman@nosestroke{\sctkzsym@snowman@nose}% + \def\sctkzsym@snowman@nosefill{\sctkzsym@snowman@nose}% + \def\sctkzsym@snowman@mouthstroke{\sctkzsym@defaultcolor}% + \def\sctkzsym@snowman@sweatstroke{\sctkzsym@snowman@sweat}% + \def\sctkzsym@snowman@sweatfill{\sctkzsym@defaultanticolor}% + \def\sctkzsym@snowman@mufflerstroke{\sctkzsym@snowman@muffler}% + \def\sctkzsym@snowman@mufflerfill{\sctkzsym@snowman@muffler}% + \def\sctkzsym@snowman@buttonstroke{\sctkzsym@snowman@buttons}% + \def\sctkzsym@snowman@buttonfill{\sctkzsym@snowman@buttons}% + \fi + % check eyes (currently eyes=<color> not supported; falling back to default-(anti)color) + \sctkzsym@hndl@key@withbool{snowman}{eyes}% + \def\sctkzsym@snowman@eyepath{\path[fill=\sctkzsym@snowman@eyefill]}% + % check nose + \sctkzsym@hndl@key@withbool{snowman}{nose}% + \def\sctkzsym@snowman@nosepath{\path[draw=\sctkzsym@snowman@nosestroke,fill=\sctkzsym@snowman@nosefill]}% + % check mouth (currently mouth=<color> not supported; falling back to default-(anti)color) + \sctkzsym@hndl@key@withword{snowman}{mouthshape}% + \sctkzsym@hndl@key@withbool{snowman}{mouth}% + \def\sctkzsym@snowman@mouthpath{\path[draw=\sctkzsym@snowman@mouthstroke]}% + % check sweat + \sctkzsym@hndl@key@withbool{snowman}{sweat}% + \def\sctkzsym@snowman@sweatpath{\path[draw=\sctkzsym@snowman@sweatstroke,fill=\sctkzsym@snowman@sweatfill]}% + % check hat + \sctkzsym@hndl@key@withbool{snowman}{hat}% + \def\sctkzsym@snowman@hatstroke{\sctkzsym@snowman@hat}% + \def\sctkzsym@snowman@hatfill{\sctkzsym@snowman@hat}% + \def\sctkzsym@snowman@hatpath{\path[draw=\sctkzsym@snowman@hatstroke,fill=\sctkzsym@snowman@hatfill]}% + % check arms + \sctkzsym@hndl@key@withbool{snowman}{arms}% + \def\sctkzsym@snowman@armsstroke{\sctkzsym@snowman@arms}% + \def\sctkzsym@snowman@armsfill{\sctkzsym@snowman@arms}% + \def\sctkzsym@snowman@armspath{\path[draw=\sctkzsym@snowman@armsstroke,fill=\sctkzsym@snowman@armsfill]}% + % check muffler + \sctkzsym@hndl@key@withbool{snowman}{muffler}% + \def\sctkzsym@snowman@mufflerpath{\path[draw=\sctkzsym@snowman@mufflerstroke,fill=\sctkzsym@snowman@mufflerfill]}% + % check buttons + \sctkzsym@hndl@key@withbool{snowman}{buttons}% + \def\sctkzsym@snowman@buttonpath{\path[draw=\sctkzsym@snowman@buttonstroke,fill=\sctkzsym@snowman@buttonfill]}% + % check snow + \sctkzsym@hndl@key@withbool{snowman}{snow}% + % check note + \sctkzsym@hndl@key@withbool{snowman}{note}% + \def\sctkzsym@snowman@notefill{\sctkzsym@snowman@note}% + \def\sctkzsym@snowman@notepath{\path[fill=\sctkzsym@snowman@notefill]}% + % check adjustbaseline + \sctkzsym@hndl@key@onlybool{snowman}{adjustbaseline}% + % check mikan/leaf + \sctkzsym@hndl@key@withbool{snowman}{mikan}% + \sctkzsym@hndl@key@withbool{snowman}{leaf}% + \def\sctkzsym@snowman@mikanstroke{\sctkzsym@snowman@mikan}% + \def\sctkzsym@snowman@mikanfill{\sctkzsym@snowman@mikan}% + \def\sctkzsym@snowman@mikanpath{\path[draw=\sctkzsym@snowman@mikanstroke,fill=\sctkzsym@snowman@mikanfill]}% + \def\sctkzsym@snowman@leafstroke{\sctkzsym@snowman@leaf}% + \def\sctkzsym@snowman@leaffill{\sctkzsym@snowman@leaf}% + \def\sctkzsym@snowman@leafpath{\path[draw=\sctkzsym@snowman@leafstroke,fill=\sctkzsym@snowman@leaffill]}% + % check broom + \sctkzsym@hndl@key@withbool{snowman}{broom}% + \def\sctkzsym@snowman@broomstroke{\sctkzsym@snowman@broom}% + \def\sctkzsym@snowman@broompath{\path[draw=\sctkzsym@snowman@broomstroke]}% + % + % drawing snowman + \set@sctkzsym@coord@scl{\sctkzsym@snowman@scale}% + \ifdim\sctkzsym@coord@scl<\z@\set@sctkzsym@coord@scl{-\sctkzsym@snowman@scale}\fi% + % + %%%%% input from def file + % + \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 + % + %%%%% + % + % key initialization using default + \sctkzsym@snowman@defaultkeys +} +% +% definition of \scsnowmandefault{...} +\newcommand{\scsnowmandefault}[1]{% + \renewcommand{\sctkzsym@snowman@defaultkeys}{% + % key initialization + \sctkzsym@snowman@initkeys + % read <key>=<value> (init=true is silently ignored) + \setkeys{sctkzsym@snowman}{#1,init=false}% + }% + \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 +\usescsnowmanlibrary{normal}% default +% +\endinput +%% +%% End of file `scsnowman.sty'. diff --git a/graphics/pgf/contrib/scsnowman/scsnowman.tex b/graphics/pgf/contrib/scsnowman/scsnowman.tex new file mode 100644 index 0000000000..c48931c6cd --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/scsnowman.tex @@ -0,0 +1,485 @@ +%% +%% This is the documentation of scsnowman package. +%% (Last Update: 2018/01/15) +%% Maintained on GitHub: +%% https://github.com/aminophen/scsnowman +%% +%% Copyright (c) 2015-2018 Hironobu Yamashita +%% Email : h.y.acetaminophen[a t]gmail.com +%% GitHub : https://github.com/aminophen +%% Blog : http://acetaminophen.hatenablog.com/ +%% Twitter : @aminophen +%% +\documentclass[a4paper]{article} +\usepackage{doc} +\usepackage[svgnames]{xcolor} +\usepackage{scsnowman} +\pagenumbering{enumsnowman} +\GetFileInfo{scsnowman.sty} +\usepackage{array} +\usepackage{amsthm} +\usepackage{luatexja} +\usepackage{luatexja-fontspec} +\def\BigSnowman#1{\fontsize{60pt}{60pt}\selectfont\symbol{"#1}} +\newjfontfamily\fipam{IPAexMincho} +\newjfontfamily\fhrgnm{HiraMinProN-W3} +\newjfontfamily\fkozm{KozMinPr6N-Regular} +\newjfontfamily\fmsmin{MS-Mincho} +\newjfontfamily\fvlgo{VLGothic} +\usepackage{hyperref} +% documentation +\newtheorem{theorem}{Theorem} +% misc +\def\Lpack#1{\textsf{#1}} +\def\Lopt#1{\texttt{#1}} +% scsnowman in title +\scsnowmandefault{adjustbaseline,scale=2,hat=Green,buttons=RoyalBlue} +\def\scsnowmanleft{\scsnowman[arms=Brown,muffler=Red]} +\def\scsnowmanright{\scsnowman[snow=SkyBlue]} +\title{\scsnowmanleft\ The \Lpack{scsnowman} package \fileversion\ \scsnowmanright} +\author{Hironobu Yamashita} +\date{\filedate} +\begin{document} + +\maketitle +\scsnowmandefault{} + +The \LaTeX\ package \Lpack{scsnowman} provides a command \verb+\scsnowman+, which can display +many variants of snowmen. This package utilizes Ti\emph{k}Z for drawing snowmen. +\begin{figure}[htb]\centering +\scsnowmandefault{adjustbaseline} +\scsnowman[scale=5,hat,snow,arms]\scsnowman[scale=5,hat=RoyalBlue,muffler=Green] +\scsnowman[scale=2]\scsnowman[scale=5]\scsnowman[scale=7]\par +\scsnowmandefault{scale=6,hat,muffler=Red} +\scsnowman[mouthshape=smile] +\scsnowman[mouthshape=frown] +\scsnowman[mouthshape=tight] +\scsnowman[mouthshape=tight,arms,buttons,sweat]\\[2ex] +\scsnowmandefault{scale=5} +\begin{tabular}{ccc} + \texttt{U+2603} & \texttt{U+26C4} & \texttt{U+26C7} \\ + \texttt{SNOWMAN} & \texttt{SNOWMAN WITHOUT SNOW} & \texttt{BLACK SNOWMAN} \\ + \scsnowman[body=false,snow=true] & \scsnowman[body=false,snow=false] & \scsnowman[body=true,snow=true] +\end{tabular} +\end{figure} + +The package is maintained on GitHub: +\begin{itemize} +\item \url{https://github.com/aminophen/scsnowman} +\end{itemize} + +\begin{figure}[htb]\centering +\scsnowmandefault{adjustbaseline,scale=8,buttons=RoyalBlue} +\scsnowman[hat=Green,muffler=Red,arms=Brown,buttons=Green,broom=DarkGoldenrod] +\scsnowman[hat=Green,body,muffler=Red,arms=Brown,nose=Orange,snow=SkyBlue] +\scsnowman[snow=SkyBlue,note=Red] +\scsnowman[hat=Green,muffler=RoyalBlue,arms=Brown,buttons=Green,broom=DarkGoldenrod] +\end{figure} + +\clearpage +\tableofcontents\clearpage + +\section{The History of Snowman in Unicode} + +In October 1991, the first volume of the Unicode standard was published. Since then, +there was a code point assigned to a character ``snowman''; \verb:U+2603:. +\begin{quote} + \verb:U+2603 SNOWMAN:\\ + = snowy weather +\end{quote} +It seems that the shape of its reference glyph in Unicode 1.0.0 was taken from ``Ryumin'', +which was developed by Morisawa (a famous font vendor in Japan). +\begin{figure} +%\includegraphics[width=0.3\textwidth]{} +\end{figure} +A few years later, the reference glyph has sometimes been changed to another; however, +there had been only one ``snowman'' in Unicode until 2009. +\begin{figure} +%\includegraphics[width=0.3\textwidth]{} +\end{figure} + +In October 2009, Unicode 5.2 was published. In this volume, two ``snowman'' code points +were added; \verb:U+26C4: and \verb:U+26C7:. +\begin{quote} + \verb:U+26C4 SNOWMAN WITHOUT SNOW:\\ + = light snow\\ + \verb:U+26C7 BLACK SNOWMAN:\\ + = heavy snow +\end{quote} +According to the code chart, the origin of these two characters is ARIB STD-B24 +(Data Coding and Transmission Specification for Digital Broadcasting;\footnote{% +\url{http://www.arib.or.jp/tyosakenkyu/kikaku_hoso/hoso_std-b024.html}; Abstract in PDF format +(both \href{http://www.arib.or.jp/tyosakenkyu/kikaku_sample/sample-std-b24-1-6.3.pdf}{Japanese} +and \href{http://www.arib.or.jp/english/html/overview/doc/6-STD-B24v5_2-1p3-E1.pdf}{English}) are +available.}), which was established by Association of Radio Industries and Business in +Japan. Since then, it can be said that the old code point \verb:U+2603: has been given +an implicit meaning of ``\verb:SNOWMAN WITH SNOW:''. The reference glyphs were also changed +at that time. +\begin{figure} +%\includegraphics[width=0.3\textwidth]{} +\end{figure} + +\section{Variation of Snowman among Actual Fonts} + +Since the shapes of the reference glyphs used in the Unicode code charts are not +prescriptive, the actual fonts have a wide variety of glyph designs. However, when it +comes to snowmen, the variation between fonts is enormous. This variation is very +interesting, however, on the other hand, problematic. + +Table \ref{table:actualfonts} shows the variety of ``snowman'' in actual fonts. +\begin{table}[tbp] +\caption{The variety of ``snowman'' in actual fonts}\label{table:actualfonts} +\setlength{\extrarowheight}{50pt}% +\centering +\begin{tabular}{cccc} +\hline + & \raisebox{2ex}{\Large\texttt{U+2603}} & \raisebox{2ex}{\Large\texttt{U+26C4}} & \raisebox{2ex}{\Large\texttt{U+26C7}} \\ \hline +\raisebox{4ex}{\fipam IPAex明朝} & {\fipam \BigSnowman{2603}} & & \\ +\raisebox{4ex}{\fmsmin MS 明朝} & {\fmsmin \BigSnowman{2603}} & & \\ +\raisebox{4ex}{\fkozm 小塚明朝 Pr6N Regular} & {\fkozm \BigSnowman{2603}} & & \\ +\raisebox{4ex}{\fhrgnm ヒラギノ明朝 ProN W3} & {\fhrgnm \BigSnowman{2603}} & & \\ +\raisebox{4ex}{\fvlgo VLゴシック} & {\fvlgo \BigSnowman{2603}} & {\fvlgo \BigSnowman{26C4}} & {\fvlgo \BigSnowman{26C7}} \\ +\hline +\end{tabular} +\end{table} +The snowman in ``IPA Mincho (IPA明朝)'' from Information-technology Promotion Agency is very similar +to the one in ``Ryumin (リュウミン)'' from Morisawa. However, in ``MS Mincho (MS 明朝)'' from Microsoft, +the snowman wears a black hat instead of white one. In ``Kozuka Mincho (小塚明朝)'' from Adobe Systems Inc., +he/she wears a muffler instead of a hat. Moreover, it doesn't snow in ``Hiragino Mincho (ヒラギノ明朝)'' from +SCREEN Graphic and Precision Solutions Co., Ltd. It is natural that some fonts developed before 2009 have +a ``snowman without snow'' glyph in the code point \verb:U+2603:, however, it can be a problem when we +have to transfer the exact information to others. + +\section{Introduction to \Lpack{scsnowman} Package} + +The \LaTeX\ package \Lpack{scsnowman} provides a command \verb+\scsnowman+, which can +display many variants of snowmen. This package depends on Ti\emph{k}Z package for drawing +snowman images. + +To use this package, load it in preamble: +\begin{quote}\begin{verbatim} +\usepackage{scsnowman} +\end{verbatim}\end{quote} +In the main document, use \verb+\scsnowman+ command to print a snowman: \scsnowman. +By default, the snowman is ``plain'' style, without any decoration such as snow, a hat or +a muffler. + +\section{Command Options} + +You can customize the style of a snowman using the optional argument. The syntax is +\begin{quote} +\verb+\scsnowman[+\emph{$\langle$key-value list$\rangle$}\verb+]+ +\end{quote} + +\subsection{Scaling and Adjustment Options} + +The following \emph{key}s are available: +\begin{quote} + \Lopt{scale}, \Lopt{adjustbaseline} +\end{quote} +The key \Lopt{scale} takes a scale factor. The origin of scaling is set at the lower +left corner of the bounding box. For example, \verb+\scsnowman+, +\verb+\scsnowman[scale=3]+ and \verb+\scsnowman[scale=5]+ give: +\begin{quote}\begin{minipage}{.9\textwidth} +\scsnowman\scsnowman[scale=3]\scsnowman[scale=5]\quad +with visualized bounding boxes: +\fboxsep0pt\fbox{\scsnowman}\fbox{\scsnowman[scale=3]}\fbox{\scsnowman[scale=5]} +\end{minipage}\end{quote} +When the key \Lopt{adjustbaseline} is specified (or, \Lopt{adjustbaseline=true}), +the base line of the in-line snowman will be adjusted to that of the surrounding texts. +This will be helpful when a snowman appears to be ``floating in the air.''\\[1ex] +\begin{minipage}{.55\textwidth}\begin{verbatim} + Text, + \scsnowman[scale=1]% + \scsnowman[scale=4]% + \scsnowman[scale=7], + T.\par + Text, + \scsnowman[adjustbaseline,scale=1]% + \scsnowman[adjustbaseline,scale=4]% + \scsnowman[adjustbaseline,scale=7], + T. +\end{verbatim}\end{minipage} +\begin{minipage}{.4\textwidth} + Text, + \scsnowman[scale=1]% + \scsnowman[scale=4]% + \scsnowman[scale=7], + T.\par + Text, + \scsnowman[adjustbaseline,scale=1]% + \scsnowman[adjustbaseline,scale=4]% + \scsnowman[adjustbaseline,scale=7], + T. +\end{minipage} + +\subsection{Design Options} + +Following \emph{key}s take a \emph{value} which specifies color. When the \emph{value} is omitted, +it reacts to the surrounding text color: +\begin{quote} + \Lopt{body}, \Lopt{eyes}, \Lopt{mouth}, \Lopt{nose}, \Lopt{sweat}, \Lopt{arms}, + \Lopt{hat}, \Lopt{muffler}, \Lopt{buttons}, \Lopt{snow}, \Lopt{note}, \Lopt{broom} +\end{quote} +The following \emph{key}s require one specific \emph{value}: +\begin{quote} + \Lopt{shape}, \Lopt{mouthshape} +\end{quote} + +The key \Lopt{shape} specifies the outline shape of the snowman body. +Currently, only \Lopt{shape=normal} is officially available, but you can define and use other shapes +using \verb+\usescsnowmanlibrary+ command (described later, section \ref{usescsnowmanlibrary}). + +The key \Lopt{mouthshape} takes one of the followings: \Lopt{smile}, \Lopt{tight} or \Lopt{frown}. + +Here are some examples:\\[1ex] +\begin{minipage}{.7\textwidth}\begin{verbatim} + \scsnowman[scale=2,body,hat=red,muffler=blue] + \scsnowman[scale=3,hat,snow,arms,buttons,note] + \scsnowman[scale=2,muffler=red,arms,broom=brown] + \scsnowman[scale=2,mouthshape=frown,hat=green] +\end{verbatim}\end{minipage} +\begin{minipage}{.25\textwidth} + \scsnowman[scale=2,body,hat=red,muffler=blue] + \scsnowman[scale=3,hat,snow,arms,buttons,note] + \scsnowman[scale=2,muffler=red,arms,broom=brown] + \scsnowman[scale=2,mouthshape=frown,hat=green] +\end{minipage}\\[1ex] +\begin{minipage}{.7\textwidth}\begin{verbatim} + {\color{blue} + \scsnowman[scale=2,body,hat=red,muffler=blue] + \scsnowman[scale=2,hat,snow,arms,buttons,note] + \scsnowman[scale=3,muffler=red,arms,broom=brown] + \scsnowman[scale=2,mouthshape=frown,hat=green]} +\end{verbatim}\end{minipage} +\begin{minipage}{.25\textwidth} + {\color{blue} + \scsnowman[scale=2,body,hat=red,muffler=blue] + \scsnowman[scale=2,hat,snow,arms,buttons,note] + \scsnowman[scale=3,muffler=red,arms,broom=brown] + \scsnowman[scale=2,mouthshape=frown,hat=green]} +\end{minipage} + +\section{Changing the Default} + +The package default is the ``plain'' style snowman. This default can be changed by using +\verb+\scsnowmandefault+ command. The syntax is +\begin{quote} +\verb+\scsnowmandefault{+\emph{$\langle$key-value list$\rangle$}\verb+}+ +\end{quote} +The available \emph{key}s are the same as those in \verb+\scsnowman+. + +Here are some examples:\\[1ex] +\begin{minipage}{.6\textwidth}\begin{verbatim} + \scsnowmandefault{scale=5,hat=red} + \scsnowman + \scsnowman[body,muffler=blue,arms] + \scsnowman[hat=green,snow,nose=orange] +\end{verbatim}\end{minipage} +\begin{minipage}{.35\textwidth} + \scsnowmandefault{scale=5,hat=red} + \scsnowman + \scsnowman[body,muffler=blue,arms] + \scsnowman[hat=green,snow,nose=orange] +\end{minipage} + +\section{Adding User-defined Snowman Shapes}\label{usescsnowmanlibrary} + +Any users can define and use custom snowman shape definitions. +Here is a description of adding a shape named \Lopt{myfavorite}. +\begin{enumerate} + \item Prepare a snowman definition file \texttt{scsnowman-myfavorite.def} + and put it into \verb+$TEXMF+ tree (e.g. \verb+texmf-local/tex/latex/scsnowman/+). + For the format of snowman definition files, please refer to \texttt{scsnowman-normal.def}. + \item Use \verb+\usescsnowmanlibrary+ command (don't forget \emph{sc}!) to load it. +\begin{verbatim} + \usepackage{scsnowman} + \usescsnowmanlibrary{myfavorite} +\end{verbatim} + \item You can use the shape by \verb+\scsnowman[shape=myfavorite]+ command. +\end{enumerate} +If you have created a fancy snowman, please contact me, so that I can incorporate it +into the official release! + +\section{Funny Usages} + +\subsection{Changing Item Labels and QED Symbols} + +For those who want more snowmen in the documents, currently \Lpack{scsnowman} provides +the following additional commands: +\begin{quote} +\verb+\makeitemsnowman+:\\ + \makeitemsnowman + Change item labels in \Lopt{itemize} environment to snowmen + {\labelitemi\labelitemii\labelitemiii\labelitemiv}. + \makeitemother + The command \verb+\makeitemother+ restores the default, + usually {\labelitemi\labelitemii\labelitemiii\labelitemiv}.\par +\verb+\makeqedsnowman+:\\ + \makeqedsnowman + Change the QED symbol in \Lopt{proof} environment to a snowman {\qedsymbol}. + The package \Lpack{amsthm} is required. + \makeqedother + The command \verb+\makeqedother+ restores the default, usually {\qedsymbol}. +\end{quote} +These commands can be used wherever you want, and are effective within the current group. + +Here are some examples:\\[1ex] +\begin{minipage}{.5\textwidth}\begin{verbatim} + \begin{itemize} + \makeitemsnowman + \item Foo X. + \begin{itemize} + \item Bar A. + \begin{itemize} + \item Baz P. \item Baz Q. + \end{itemize} + \item Bar B. \item Bar C. + \end{itemize} + \end{itemize} +\end{verbatim}\end{minipage} +\begin{minipage}{.45\textwidth} + \begin{itemize} + \makeitemsnowman + \item Foo X. + \begin{itemize} + \item Bar A. + \begin{itemize} + \item Baz P. \item Baz Q. + \end{itemize} + \item Bar B. \item Bar C. + \end{itemize} + \end{itemize} +\end{minipage}\\[1ex] +\begin{minipage}{.55\textwidth}\begin{verbatim} + \makeqedsnowman + \begin{theorem} + Given two line segments whose + lengths are $a$ and $b$ respectively, + there is a real number $r$ such that + $b=ra$. + \end{theorem} + \begin{proof} + To prove it by contradiction try and + asuume that the statement is false, + proceed from there and at some point + you will arrive to a contradiction. + \end{proof} +\end{verbatim}\end{minipage} +\begin{minipage}{.45\textwidth} + \makeqedsnowman + \begin{theorem} + Given two line segments whose + lengths are $a$ and $b$ respectively, + there is a real number $r$ such that + $b=ra$. + \end{theorem} + \begin{proof} + To prove it by contradiction try and + asuume that the statement is false, + proceed from there and at some point + you will arrive to a contradiction. + \end{proof} +\end{minipage}\medskip + +The names of these commands are, of course, named after the \LaTeX\ \verb+\makeatletter+ +and \verb+\makeatother+;-) + +\subsection{Drawing ``\emph{Kagami-mochi}''} + +Using \Lpack{scsnowman} package, you can also draw ``\emph{kagami-mochi}'' +(mirror rice cake). It is a traditional Japanese New Year decoration, +which usually consists of two round ``\emph{mochi}'' (rice cakes), the smaller +placed atop the larger, and a ``\emph{daidai}'' (a Japanese bitter orange) +with an attached leaf on top. + +Following \emph{key}s are implemented for this usage:\footnote{Strictly speaking, +the orange on top of rice cakes should be ``\emph{daidai}''; however, +a ``\emph{mikan}'' is often substituted for the original ``\emph{daidai}''.} +\begin{quote} + \Lopt{mikan}, \Lopt{leaf} +\end{quote} +The \emph{key} \Lopt{leaf} is effective only when \Lopt{mikan} is specified. +Here is an example:\\[1ex] +\begin{minipage}{.85\textwidth}\begin{verbatim} + \scsnowmandefault{scale=5.5} + \scsnowman[eyes=false,mouth=false,mikan=orange,leaf=green] +\end{verbatim}\end{minipage} +\begin{minipage}{.1\textwidth} + \scsnowmandefault{scale=5.5} + \scsnowman[eyes=false,mouth=false,mikan=orange,leaf=green] +\end{minipage} + +\subsection{Replacing All ``8'' with Snowmen} + +You can replace all ``8'' inside an arabic number expression with snowmen +\scsnowman\ by using \verb+\scsnowmannumeral+. +Here is an example:\\[1ex] +\begin{minipage}{.85\textwidth}\begin{verbatim} + \scsnowmandefault{adjustbaseline}\scsnowmannumeral{18882} + \scsnowmannumeral[muffler=blue,scale=1.5]{4283859} +\end{verbatim}\end{minipage} +\begin{minipage}{.1\textwidth} + \scsnowmandefault{adjustbaseline}\scsnowmannumeral{18882} + \scsnowmannumeral[muffler=blue,scale=1.5]{4283859} +\end{minipage}\medskip + +You can also replace all ``8'' inside the page numbering with snowmen +\scsnowman\ by adding \verb+\pagenumbering{enumsnowman}+. +This documentation itself is an example! + +\clearpage + +\section*{Version History} + +This is the summary of changes. For more detail, see GitHub repository. +\begin{table}[h] +\centering +\begin{tabular}{lll} +Version 0.1 & 2015-12-13 & First public version on GitHub \\ +Version 0.8 & 2016-08-08 & Second public version on GitHub: \\ + & & new variants \Lopt{buttons}, \Lopt{mouthshape}, \Lopt{sweat} are added \\ +Version 1.0 & 2016-12-22 & First CTAN release \\ +Version 1.1 & 2017-01-22 & Add a new key \Lopt{adjustbaseline} \\ + & & Update documentation \\ +Version 1.2 & 2017-08-08 & Default color reacts to surrounding text color \\ + & & Support vertical writing on (u)p\TeX\ and Lua\TeX-ja \\ + & & Add a new key \Lopt{shape} \\ + & & Add a new command \verb+\usescsnowmanlibrary+ \\ +Version 1.2a & 2017-11-25 & Fix a bug in scaling with \Lopt{adjustbaseline} \\ +Version 1.2b & 2018-01-05 & Add new keys \Lopt{mikan}, \Lopt{leaf} for drawing `kagami-mochi' \\ + & & Stopped loading \Lpack{amsthm} by default \\ +Version 1.2c & 2018-01-15 & Add a new key \Lopt{broom} \\ +Version 1.2d & 2018-06-07 & Add new keys \Lopt{nose}, \Lopt{note} \\ + & & Add a new command \verb+\scsnowmannumeral+ \\ +\end{tabular} +\end{table} + +\begin{thebibliography}{9} +\bibitem{NAOI1} +\href{http://d.hatena.ne.jp/NAOI/20080623/1214211959}{雪だるまの親子関係} +\ --- Mac OS Xの文字コード問題に関するメモ +\bibitem{NAOI2} +\href{http://d.hatena.ne.jp/NAOI/20110707/1310031226}{ヒラギノの雪だるまは、なぜ寂しそうなのか} +\ --- Mac OS Xの文字コード問題に関するメモ +\bibitem{DORA1} +\href{http://doratex.hatenablog.jp/entry/20140327/1395878814}{いろいろなゆきだるま} +\ --- TeX Alchemist Online +\bibitem{ACE1} +\href{http://acetaminophen.hatenablog.com/entry/2014/09/05/090313}{「\TeX{}でゆきだるま」をもっとたくさん} +\ --- Acetaminophen's diary +\bibitem{ZR1} +\href{http://d.hatena.ne.jp/zrbabbler/20140911/1410439004}{Unicodeの例の雪だるまは多分アレ} +\ --- マクロツイーター +\bibitem{ACE2} +\href{http://acetaminophen.hatenablog.com/entry/2015/12/13/080226}{\TeX{}でゆきだるまを“もっともっと”たくさん} +\ --- Acetaminophen's diary +\bibitem{ACE3} +\href{http://acetaminophen.hatenablog.com/entry/2016/08/08/080800}{夏といえば、やっぱり「ゆきだるま」!} +\ --- Acetaminophen's diary +\bibitem{SX229957} +\href{http://tex.stackexchange.com/questions/229957/}{How do I redefine the QED symbol to be a Unicode character?} +\ --- \TeX\ -- \LaTeX\ Stack Exchange +\end{thebibliography} + +\end{document} diff --git a/graphics/pgf/contrib/scsnowman/sctkzsym-base.sty b/graphics/pgf/contrib/scsnowman/sctkzsym-base.sty new file mode 100644 index 0000000000..9bb904b40f --- /dev/null +++ b/graphics/pgf/contrib/scsnowman/sctkzsym-base.sty @@ -0,0 +1,150 @@ +%% +%% This is file `sctkzsym-base.sty', part of scsnowman package. +%% Maintained on GitHub: +%% https://github.com/aminophen/scsnowman +%% +%% Copyright (c) 2015-2018 Hironobu Yamashita +%% Email : h.y.acetaminophen[a t]gmail.com +%% GitHub : https://github.com/aminophen +%% Blog : http://acetaminophen.hatenablog.com/ +%% Twitter : @aminophen +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{sctkzsym-base}[2018/01/15 v1.2c Base for emoji variants using TikZ] +\RequirePackage{tikz} +\RequirePackage{keyval} +% +\ifx\kanjiskip\@undefined\else + \IfFileExists{pxeveryshi.sty}{\RequirePackage{pxeveryshi}}{} +\fi +% +% prepare for options +\newif\ifsctkzsym@document +\newif\ifsctkzsym@qed +\newif\ifsctkzsym@item +% +% options +\DeclareOption{documentX}{\sctkzsym@documenttrue} +\DeclareOption{nodocumentX}{\sctkzsym@documentfalse} +\DeclareOption{qedX}{\sctkzsym@qedtrue} +\DeclareOption{noqedX}{\sctkzsym@qedfalse} +\DeclareOption{itemX}{\sctkzsym@itemtrue} +\DeclareOption{noitemX}{\sctkzsym@itemfalse} +\ExecuteOptions{documentX,qedX,itemX} +\ProcessOptions\relax +% +% save QED symbol before change (joke) +\ifsctkzsym@qed + \def\sctkzsym@saving@qedsymbol{% + \ifx\qedsymbol\@undefined\else + \let\sctkzsym@saved@qedsymbol\qedsymbol + \fi + } + % if `amsthm' is already loaded, save it now + \sctkzsym@saving@qedsymbol + % otherwise, saving is delayed till \begin{document} + % (hope \makeqed... is not already executed...) + \ifx\sctkzsym@saved@qedsymbol\@undefined + \AtBeginDocument{\sctkzsym@saving@qedsymbol} + \fi + \newcommand{\makeqedother}{% + \let\qedsymbol\sctkzsym@saved@qedsymbol + } +\fi +% +% save item label before change (joke) +\ifsctkzsym@item + \let\sctkzsym@saved@labelitemi\labelitemi + \let\sctkzsym@saved@labelitemii\labelitemii + \let\sctkzsym@saved@labelitemiii\labelitemiii + \let\sctkzsym@saved@labelitemiv\labelitemiv + \newcommand{\makeitemother}{% + \let\labelitemi\sctkzsym@saved@labelitemi + \let\labelitemii\sctkzsym@saved@labelitemii + \let\labelitemiii\sctkzsym@saved@labelitemiii + \let\labelitemiv\sctkzsym@saved@labelitemiv + } +\fi +% +% key definitions +% * any value; if none, 'true' is assumed +\newcommand{\sctkzsym@define@key@withbool}[2]{% + \define@key{sctkzsym@#1}{#2}[true]{\expandafter\def\csname sctkzsym@#1@#2\endcsname{##1}}% + \expandafter\newif\csname ifsctkzsym@#1@#2\endcsname +} +% * any value; if none, an error will be raised +\newcommand{\sctkzsym@define@key@wodefault}[2]{% + \define@key{sctkzsym@#1}{#2}{\expandafter\def\csname sctkzsym@#1@#2\endcsname{##1}}% +} +% * one from arg #3; arg #3 should be comma-separated list of candidates +\newcommand{\sctkzsym@define@key@withword}[3]{% + \define@key{sctkzsym@#1}{#2}{\expandafter\def\csname sctkzsym@#1@#2\endcsname{##1}}% + % register known values (used in key handling) + \sctkzsym@hndlcnt\z@ + \edef\@tempa{\zap@space#3 \@empty}% + \@for\@tempa:=\@tempa\do{% + \advance\sctkzsym@hndlcnt\@ne + \expandafter\let\csname sctkzsym@#1@#2@\romannumeral\sctkzsym@hndlcnt\endcsname\@tempa}% +} +% other known values (used in key handling) +\def\sctkzsym@true{true} % for bool strcmp +\def\sctkzsym@false{false} % for bool strcmp +% +% key handling +\newcount\sctkzsym@hndlcnt % for withword loop +\let\sctkzsym@status\relax % for withword status +\newcommand{\sctkzsym@hndl@key@withbool}[2]{% + \expandafter\ifx\csname sctkzsym@#1@#2\endcsname\sctkzsym@false\relax + \csname sctkzsym@#1@#2false\endcsname % <key>=false + \else + \csname sctkzsym@#1@#2true\endcsname % <key>=true/<color> + \expandafter\ifx\csname sctkzsym@#1@#2\endcsname\sctkzsym@true\relax + % <key>=true; <default-color> + \expandafter\def\csname sctkzsym@#1@#2\endcsname{\sctkzsym@defaultcolor}% + \fi + \fi +} +\newcommand{\sctkzsym@hndl@key@onlybool}[2]{% + \expandafter\ifx\csname sctkzsym@#1@#2\endcsname\sctkzsym@false\relax + \csname sctkzsym@#1@#2false\endcsname % <key>=false + \else + \expandafter\ifx\csname sctkzsym@#1@#2\endcsname\sctkzsym@true\relax + \csname sctkzsym@#1@#2true\endcsname % <key>=true + \else + \PackageError{sc#1}{Only true/false allowed for key `#2'}\@ehc + \csname sctkzsym@#1@#2false\endcsname % <key>=false + \fi + \fi +} +\newcommand{\sctkzsym@hndl@key@withword}[2]{% + % initialize + \@tempcnta\@ne + \let\sctkzsym@status\relax + % check through the registered candidate values + \loop\expandafter\ifx\csname sctkzsym@#1@#2@\romannumeral\@tempcnta\endcsname\relax\else + \ifx\sctkzsym@status\relax + \expandafter\ifx\csname sctkzsym@#1@#2\expandafter\endcsname + \csname sctkzsym@#1@#2@\romannumeral\@tempcnta\endcsname\relax + \def\sctkzsym@status{0}% + \fi + \fi + \advance\@tempcnta\@ne + \repeat + % if the status is still not zero, user-specified value is invalid; throw an error + \ifx\sctkzsym@status\relax + \PackageError{sc#1}{Unsupported value `\csname sctkzsym@#1@#2\endcsname' for #2}\@ehc + \fi +} +% +% setup for tikzpicture +\newlength{\sctkzsym@coord@baseline} +\newlength{\sctkzsym@coord@scl} +\newcommand*{\set@sctkzsym@coord@scl}[1]{\pgfmathsetlength{\sctkzsym@coord@scl}{#1\p@}} +\newcommand{\sctkzsym@beginyokobox}{\ifx\tate\@undefined\else\leavevmode\hbox\bgroup\yoko\fi} +\newcommand{\sctkzsym@endyokobox}{\ifx\tate\@undefined\else\egroup\fi} +\newcommand{\sctkzsym@defaultcolor}{} +\newcommand{\sctkzsym@defaultanticolor}{white} +% +\endinput +%% +%% End of file `sctkzsym-base.sty'. |