diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty | 241 |
1 files changed, 241 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty new file mode 100644 index 00000000000..27857baaedc --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/bokkusu.sty @@ -0,0 +1,241 @@ +%% +%% Copyright (C) 2013 by: +%% Josef Kleber +%% <josef.kleber@gmx.de> +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "author-maintained". +%% +%% The Current Maintainer of this work is Josef Kleber. +%% +%% This work consists of all files listed in manifest.txt. +%% +% +\ProvidesPackage{bokkusu}[2013/02/28 bokkusu.sty v1.0 - Josef Kleber (C) 2013]% +% +\RequirePackage{logicpuzzle}% +% +% options +\newcommand*\BK@width{6.7cm}% +\newcommand*\BK@fontsize\Large% +\newcommand*\BK@rows{5}% +\newcommand*\BK@columns{5}% +\newcommand*\BK@scale{1}% +\newcommand*\BK@color{black}% +\newcommand*\BK@bgcolor{}% +\newcommand*\BK@cvoffset{-23pt}% +\newcommand*\BK@title{}% +\newcommand*\BK@titleindent{0.75cm}% +\newcommand*\BK@titlewidth{5.85cm}% +% +\newcounter{BK@rows}% +\newcounter{BK@columns}% +% +\setcounter{BK@rows}{\BK@rows}% +\setcounter{BK@columns}{\BK@columns}% +\stepcounter{BK@rows}% +\stepcounter{BK@columns}% +% +\define@key{bokkusu.sty}{rows}[5]% +{% + \renewcommand*\BK@rows{#1}% +}% +% +\define@key{bokkusu.sty}{columns}[5]% +{% + \renewcommand*\BK@columns{#1}% +}% +% +\define@key{bokkusu.sty}{scale}[1]% +{% + \renewcommand*\BK@scale{#1}% +}% +% +\define@key{bokkusu.sty}{counterstyle}[none]% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@key{bokkusu.sty}{color}[black]% +{% + \renewcommand*\BK@color{#1}% +}% +% +\define@key{bokkusu.sty}{bgcolor}[]% +{% + \renewcommand*\BK@bgcolor{#1}% +}% +% +\define@choicekey*{bokkusu.sty}{fontsize}[\BK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\BK@fontsize{\tiny}% + \or% + \renewcommand*\BK@fontsize{\scriptsize}% + \or% + \renewcommand*\BK@fontsize{\footnotesize}% + \or% + \renewcommand*\BK@fontsize{\small}% + \or% + \renewcommand*\BK@fontsize{\normalsize}% + \or% + \renewcommand*\BK@fontsize{\large}% + \or% + \renewcommand*\BK@fontsize{\Large}% + \or% + \renewcommand*\BK@fontsize{\LARGE}% + \or% + \renewcommand*\BK@fontsize{\huge}% + \or% + \renewcommand*\BK@fontsize{\Huge}% + \fi% +}% +% +\define@key{bokkusu.sty}{width}[6.7cm]% +{% + \renewcommand*\BK@width{#1}% +}% +% +\define@key{bokkusu.sty}{title}[]% +{% + \renewcommand*\BK@title{#1}% +}% +% +\define@key{bokkusu.sty}{cvoffset}[-38pt]% +{% + \renewcommand*\BK@cvoffset{#1}% +}% +% +\define@key{bokkusu.sty}{titleindent}[0.75cm]% +{% + \renewcommand*\BK@titleindent{#1}% +}% +% +\define@key{bokkusu.sty}{titlewidth}[5.85cm]% +{% + \renewcommand*\BK@titlewidth{#1}% +}% +% +\define@key{bokkusu}{rows}% +{% + \renewcommand*\BK@rows{#1}% +}% +% +\define@key{bokkusu}{columns}% +{% + \renewcommand*\BK@columns{#1}% +}% +% +\define@key{bokkusu}{scale}% +{% + \renewcommand*\BK@scale{#1}% +}% +% +\define@key{bokkusu}{color}% +{% + \renewcommand*\BK@color{#1}% +}% +% +\define@key{bokkusu}{bgcolor}% +{% + \renewcommand*\BK@bgcolor{#1}% +}% +% +\define@key{bokkusu}{counterstyle}% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@choicekey*{bokkusu}{fontsize}[\BK@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\BK@fontsize{\tiny}% + \or% + \renewcommand*\BK@fontsize{\scriptsize}% + \or% + \renewcommand*\BK@fontsize{\footnotesize}% + \or% + \renewcommand*\BK@fontsize{\small}% + \or% + \renewcommand*\BK@fontsize{\normalsize}% + \or% + \renewcommand*\BK@fontsize{\large}% + \or% + \renewcommand*\BK@fontsize{\Large}% + \or% + \renewcommand*\BK@fontsize{\LARGE}% + \or% + \renewcommand*\BK@fontsize{\huge}% + \or% + \renewcommand*\BK@fontsize{\Huge}% + \fi% +}% +% +\define@key{bokkusu}{width}% +{% + \renewcommand*\BK@width{#1}% +}% +% +\define@key{bokkusu}{title}% +{% + \renewcommand*\BK@title{#1}% +}% +% +\define@key{bokkusu}{cvoffset}% +{% + \renewcommand*\BK@cvoffset{#1}% +}% +% +\define@key{bokkusu}{titleindent}% +{% + \renewcommand*\BK@titleindent{#1}% +}% +% +\define@key{bokkusu}{titlewidth}% +{% + \renewcommand*\BK@titlewidth{#1}% +}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,color,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\newcommand*\bokkususetup[1]% +{% + \setkeys{bokkusu.sty}{#1}% +}% +% +\newenvironment{bokkusu}[1][]% +{% + \setkeys{bokkusu}{#1}% + \LP@set@package{bokkusu}% + \LP@set@env@prefix{BK}% + \setcounter{BK@rows}{\BK@rows}% + \setcounter{BK@columns}{\BK@columns}% + \stepcounter{BK@rows}% + \stepcounter{BK@columns}% + \begin{minipage}[t]{\BK@width}% + \ifthenelse{\equal{\BK@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\BK@titleindent}\parbox{\BK@titlewidth}{\strut\LP@titleformat\BK@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\BK@scale]% + \LP@drawbackground{1}{1}{\BK@columns}{\BK@rows}{\BK@bgcolor}% + \LP@drawgrid{1}{1}{\BK@columns}{\BK@rows}{1cm}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +\endinput%
\ No newline at end of file |