From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- graphics/pgf/contrib/scsnowman/LICENSE | 25 ++ graphics/pgf/contrib/scsnowman/Makefile | 32 ++ graphics/pgf/contrib/scsnowman/README.md | 31 ++ .../pgf/contrib/scsnowman/scsnowman-normal.def | 192 ++++++++ .../pgf/contrib/scsnowman/scsnowman-sample.pdf | Bin 0 -> 66401 bytes .../pgf/contrib/scsnowman/scsnowman-sample.tex | 167 +++++++ .../pgf/contrib/scsnowman/scsnowman-zrtest.pdf | Bin 0 -> 27023 bytes .../pgf/contrib/scsnowman/scsnowman-zrtest.tex | 21 + graphics/pgf/contrib/scsnowman/scsnowman.pdf | Bin 0 -> 388258 bytes graphics/pgf/contrib/scsnowman/scsnowman.sty | 381 ++++++++++++++++ graphics/pgf/contrib/scsnowman/scsnowman.tex | 485 +++++++++++++++++++++ graphics/pgf/contrib/scsnowman/sctkzsym-base.sty | 150 +++++++ 12 files changed, 1484 insertions(+) create mode 100644 graphics/pgf/contrib/scsnowman/LICENSE create mode 100644 graphics/pgf/contrib/scsnowman/Makefile create mode 100644 graphics/pgf/contrib/scsnowman/README.md create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman-normal.def create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman-sample.pdf create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman-sample.tex create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman-zrtest.pdf create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman-zrtest.tex create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman.pdf create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman.sty create mode 100644 graphics/pgf/contrib/scsnowman/scsnowman.tex create mode 100644 graphics/pgf/contrib/scsnowman/sctkzsym-base.sty (limited to 'graphics/pgf/contrib/scsnowman') 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 new file mode 100644 index 0000000000..427a331941 Binary files /dev/null and b/graphics/pgf/contrib/scsnowman/scsnowman-sample.pdf differ 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}{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 new file mode 100644 index 0000000000..7967d13b75 Binary files /dev/null and b/graphics/pgf/contrib/scsnowman/scsnowman-zrtest.pdf differ 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 new file mode 100644 index 0000000000..776f8f74e7 Binary files /dev/null and b/graphics/pgf/contrib/scsnowman/scsnowman.pdf differ 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{} +\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{