From b872b0b1c8ceb9cbe770c7edd859c23e3e828958 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 10 Aug 2022 20:36:18 +0000 Subject: customdice (10aug22) git-svn-id: svn://tug.org/texlive/trunk@64089 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/customdice/customdice.sty | 124 ++++++++++++++------- 1 file changed, 82 insertions(+), 42 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/customdice/customdice.sty b/Master/texmf-dist/tex/latex/customdice/customdice.sty index 870fb3ff141..04f9c3d5737 100644 --- a/Master/texmf-dist/tex/latex/customdice/customdice.sty +++ b/Master/texmf-dist/tex/latex/customdice/customdice.sty @@ -134,11 +134,24 @@ {\PackageWarning{customdice}{command `hugetextdicebot' already defined}} \@ifundefined{Hugetextdicebot}{} {\PackageWarning{customdice}{command `Hugetextdicebot' already defined}} +\@ifundefined{dicefaceoutlinecol}{} +{\PackageWarning{customdice}{command `dicefaceoutlinecol' already defined}} +\@ifundefined{setdicefaceoutlinecol}{} +{\PackageWarning{customdice}{command `setdicefaceoutlinecol' already defined}} +\@ifundefined{defaultdicefaceoutlinecol}{} +{\PackageWarning{customdice}{command `defaultdicefaceoutlinecol' already defined}} \makeatother \newcommand{\customdicecoldefault}{f40fc2340eb940fc8a170db0f81d7139} % using a UUID so we are extremely unlikely to clash with any user-specified colour name \global\let\customdicebg\customdicecoldefault \global\let\customdicefg\customdicecoldefault +\newcommand{\dicefaceoutlinecol}{darkgray} +\newcommand{\setdicefaceoutlinecol}[1]{% + \renewcommand{\dicefaceoutlinecol}{#1}% +} +\newcommand{\defaultdicefaceoutlinecol}{% + \renewcommand{\dicefaceoutlinecol}{darkgray}% +} \newcommand{\customdicebaseline}{0.02} \newcommand{\setdicebaseline}[1]{% \renewcommand{\customdicebaseline}{#1}% @@ -169,7 +182,7 @@ \ifdefequal{\customdicebg}{\customdicecoldefault}{\global\let\customdicebg\colour}{\global\let\customdicefg\colour}% }% \begin{tikzpicture}[baseline=\customdicebaseline ex] - \draw[rounded corners=\customdicecornerrounding ex,darkgray,fill=\customdicebg,line width=\customdiceborderthickness ex] (0ex,0ex) rectangle (\customdicefacesize ex,\customdicefacesize ex); + \draw[rounded corners=\customdicecornerrounding ex,\dicefaceoutlinecol,fill=\customdicebg,line width=\customdiceborderthickness ex] (0ex,0ex) rectangle (\customdicefacesize ex,\customdicefacesize ex); }{\end{tikzpicture}% \global\let\customdicebg\customdicecoldefault% \global\let\customdicefg\customdicecoldefault% @@ -204,7 +217,34 @@ \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicelower ex) {}; \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicehalfway ex) {}; \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdiceupper ex) {}; - }{}}}}}} + }{\ifnumequal{#2}{7}{ + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdiceupper ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicehalfway ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdiceupper ex) {}; + }{\ifnumequal{#2}{8}{ + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdiceupper ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicehalfway ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicehalfway ex,\customdiceupper ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdiceupper ex) {}; + }{\ifnumequal{#2}{9}{ + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicelower ex,\customdiceupper ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicehalfway ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicehalfway ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdicehalfway ex,\customdiceupper ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicelower ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdicehalfway ex) {}; + \node[circle,fill=\customdicefg,inner sep=\customdicedotsize ex] at (\customdiceupper ex,\customdiceupper ex) {}; + }{}}}}}}}}} \end{customdiceenv}% } @@ -239,124 +279,124 @@ } \newcommand{\tinydice}[2][white,black]{% - {\tiny\dice[#1]{#2}} + {\tiny\dice[#1]{#2}}% } \newcommand{\scriptsizedice}[2][white,black]{% - {\scriptsize\dice[#1]{#2}} + {\scriptsize\dice[#1]{#2}}% } \newcommand{\footnotesizedice}[2][white,black]{% - {\footnotesize\dice[#1]{#2}} + {\footnotesize\dice[#1]{#2}}% } \newcommand{\smalldice}[2][white,black]{% - {\small\dice[#1]{#2}} + {\small\dice[#1]{#2}}% } \newcommand{\normalsizedice}[2][white,black]{% - {\normalsize\dice[#1]{#2}} + {\normalsize\dice[#1]{#2}}% } \newcommand{\largedice}[2][white,black]{% - {\large\dice[#1]{#2}} + {\large\dice[#1]{#2}}% } \newcommand{\Largedice}[2][white,black]{% - {\Large\dice[#1]{#2}} + {\Large\dice[#1]{#2}}% } \newcommand{\LARGEdice}[2][white,black]{% - {\LARGE\dice[#1]{#2}} + {\LARGE\dice[#1]{#2}}% } \newcommand{\hugedice}[2][white,black]{% - {\huge\dice[#1]{#2}} + {\huge\dice[#1]{#2}}% } \newcommand{\Hugedice}[2][white,black]{% - {\Huge\dice[#1]{#2}} + {\Huge\dice[#1]{#2}}% } \newcommand{\tinybigdotdice}[1][white,black]{% - {\tiny\bigdotdice[#1]} + {\tiny\bigdotdice[#1]}% } \newcommand{\scriptsizebigdotdice}[1][white,black]{% - {\scriptsize\bigdotdice[#1]} + {\scriptsize\bigdotdice[#1]}% } \newcommand{\footnotesizebigdotdice}[1][white,black]{% - {\footnotesize\bigdotdice[#1]} + {\footnotesize\bigdotdice[#1]}% } \newcommand{\smallbigdotdice}[1][white,black]{% - {\small\bigdotdice[#1]} + {\small\bigdotdice[#1]}% } \newcommand{\normalsizebigdotdice}[1][white,black]{% - {\normalsize\bigdotdice[#1]} + {\normalsize\bigdotdice[#1]}% } \newcommand{\largebigdotdice}[1][white,black]{% - {\large\bigdotdice[#1]} + {\large\bigdotdice[#1]}% } \newcommand{\LARGEbigdotdice}[1][white,black]{% - {\LARGE\bigdotdice[#1]} + {\LARGE\bigdotdice[#1]}% } \newcommand{\Largebigdotdice}[1][white,black]{% - {\Large\bigdotdice[#1]} + {\Large\bigdotdice[#1]}% } \newcommand{\hugebigdotdice}[1][white,black]{% - {\huge\bigdotdice[#1]} + {\huge\bigdotdice[#1]}% } \newcommand{\Hugebigdotdice}[1][white,black]{% - {\Huge\bigdotdice[#1]} + {\Huge\bigdotdice[#1]}% } \newcommand{\tinytextdice}[2][white,black]{% - {\tiny\textdice[#1]{#2}} + {\tiny\textdice[#1]{#2}}% } \newcommand{\scriptsizetextdice}[2][white,black]{% - {\scriptsize\textdice[#1]{#2}} + {\scriptsize\textdice[#1]{#2}}% } \newcommand{\footnotesizetextdice}[2][white,black]{% - {\footnotesize\textdice[#1]{#2}} + {\footnotesize\textdice[#1]{#2}}% } \newcommand{\smalltextdice}[2][white,black]{% - {\small\textdice[#1]{#2}} + {\small\textdice[#1]{#2}}% } \newcommand{\normalsizetextdice}[2][white,black]{% - {\normalsize\textdice[#1]{#2}} + {\normalsize\textdice[#1]{#2}}% } \newcommand{\largetextdice}[2][white,black]{% - {\large\textdice[#1]{#2}} + {\large\textdice[#1]{#2}}% } \newcommand{\Largetextdice}[2][white,black]{% - {\Large\textdice[#1]{#2}} + {\Large\textdice[#1]{#2}}% } \newcommand{\LARGEtextdice}[2][white,black]{% - {\LARGE\textdice[#1]{#2}} + {\LARGE\textdice[#1]{#2}}% } \newcommand{\hugetextdice}[2][white,black]{% - {\huge\textdice[#1]{#2}} + {\huge\textdice[#1]{#2}}% } \newcommand{\Hugetextdice}[2][white,black]{% - {\Huge\textdice[#1]{#2}} + {\Huge\textdice[#1]{#2}}% } \newcommand{\tinytextdicebot}[2][white,black]{% - {\tiny\textdicebot[#1]{#2}} + {\tiny\textdicebot[#1]{#2}}% } \newcommand{\scriptsizetextdicebot}[2][white,black]{% - {\scriptsize\textdicebot[#1]{#2}} + {\scriptsize\textdicebot[#1]{#2}}% } \newcommand{\footnotesizetextdicebot}[2][white,black]{% - {\footnotesize\textdicebot[#1]{#2}} + {\footnotesize\textdicebot[#1]{#2}}% } \newcommand{\smalltextdicebot}[2][white,black]{% - {\small\textdicebot[#1]{#2}} + {\small\textdicebot[#1]{#2}}% } \newcommand{\normalsizetextdicebot}[2][white,black]{% - {\normalsize\textdicebot[#1]{#2}} + {\normalsize\textdicebot[#1]{#2}}% } \newcommand{\largetextdicebot}[2][white,black]{% - {\large\textdicebot[#1]{#2}} + {\large\textdicebot[#1]{#2}}% } \newcommand{\Largetextdicebot}[2][white,black]{% - {\Large\textdicebot[#1]{#2}} + {\Large\textdicebot[#1]{#2}}% } \newcommand{\LARGEtextdicebot}[2][white,black]{% - {\LARGE\textdicebot[#1]{#2}} + {\LARGE\textdicebot[#1]{#2}}% } \newcommand{\hugetextdicebot}[2][white,black]{% - {\huge\textdicebot[#1]{#2}} + {\huge\textdicebot[#1]{#2}}% } \newcommand{\Hugetextdicebot}[2][white,black]{% - {\Huge\textdicebot[#1]{#2}} + {\Huge\textdicebot[#1]{#2}}% } \endinput %% -- cgit v1.2.3