diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty | 262 |
1 files changed, 262 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty new file mode 100644 index 00000000000..9cb2ae6bc8a --- /dev/null +++ b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty @@ -0,0 +1,262 @@ +%% +%% 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{skyline}[2013/03/09 skyline.sty v1.0 - Josef Kleber (C) 2013]% +% +\RequirePackage{logicpuzzle}% +% +% options +\newcommand*\SL@width{6.7cm}% +\newcommand*\SL@fontsize\Large% +\newcommand*\SL@rows{5}% +\newcommand*\SL@columns{5}% +\newcommand*\SL@scale{1}% +\newcommand*\SL@bgcolor{}% +\newcommand*\SL@sudoku{false}% +\newcommand*\SL@cvoffset{-39pt}% +\newcommand*\SL@title{}% +\newcommand*\SL@titleindent{0.75cm}% +\newcommand*\SL@titlewidth{5.85cm}% +% +\newcounter{SL@rows}% +\newcounter{SL@columns}% +% +\setcounter{SL@rows}{\SL@rows}% +\setcounter{SL@columns}{\SL@columns}% +\stepcounter{SL@rows}% +\stepcounter{SL@columns}% +% +\define@key{skyline.sty}{rows}[5]% +{% + \renewcommand*\SL@rows{#1}% +}% +% +\define@key{skyline.sty}{columns}[5]% +{% + \renewcommand*\SL@columns{#1}% +}% +% +\define@choicekey*{skyline.sty}{sudoku}[\SL@sudoku\nr]{true,false}[true]% +{% + \ifcase\nr\relax% + \renewcommand*\SL@sudoku{true}% + \renewcommand*\SL@rows{9}% + \renewcommand*\SL@columns{9}% + \or% + \renewcommand*\SL@sudoku{false}% + \fi% +}% +% +\define@key{skyline.sty}{scale}[1]% +{% + \renewcommand*\SL@scale{#1}% +}% +% +\define@key{skyline.sty}{counterstyle}[none]% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@key{skyline.sty}{bgcolor}[]% +{% + \renewcommand*\SL@bgcolor{#1}% +}% +% +\define@choicekey*{skyline.sty}{fontsize}[\SL@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\SL@fontsize{\tiny}% + \or% + \renewcommand*\SL@fontsize{\scriptsize}% + \or% + \renewcommand*\SL@fontsize{\footnotesize}% + \or% + \renewcommand*\SL@fontsize{\small}% + \or% + \renewcommand*\SL@fontsize{\normalsize}% + \or% + \renewcommand*\SL@fontsize{\large}% + \or% + \renewcommand*\SL@fontsize{\Large}% + \or% + \renewcommand*\SL@fontsize{\LARGE}% + \or% + \renewcommand*\SL@fontsize{\huge}% + \or% + \renewcommand*\SL@fontsize{\Huge}% + \fi% +}% +% +\define@key{skyline.sty}{width}[6.7cm]% +{% + \renewcommand*\SL@width{#1}% +}% +% +\define@key{skyline.sty}{title}[]% +{% + \renewcommand*\SL@title{#1}% +}% +% +\define@key{skyline.sty}{cvoffset}[-39pt]% +{% + \renewcommand*\SL@cvoffset{#1}% +}% +% +\define@key{skyline.sty}{titleindent}[0.75cm]% +{% + \renewcommand*\SL@titleindent{#1}% +}% +% +\define@key{skyline.sty}{titlewidth}[5.85cm]% +{% + \renewcommand*\SL@titlewidth{#1}% +}% +% +\define@key{skyline}{rows}% +{% + \renewcommand*\SL@rows{#1}% +}% +% +\define@key{skyline}{columns}% +{% + \renewcommand*\SL@columns{#1}% +}% +% +\define@choicekey*{skyline}{sudoku}[\SL@sudoku\nr]{true,false}[true]% +{% + \ifcase\nr\relax% + \renewcommand*\SL@sudoku{true}% + \renewcommand*\SL@rows{9}% + \renewcommand*\SL@columns{9}% + \or% + \renewcommand*\SL@sudoku{false}% + \fi% +}% +% +\define@key{skyline}{scale}% +{% + \renewcommand*\SL@scale{#1}% +}% +% +\define@key{skyline}{bgcolor}% +{% + \renewcommand*\SL@bgcolor{#1}% +}% +% +\define@key{skyline}{counterstyle}% +{% + \renewcommand*\LP@counterstyle{#1}% +}% +% +\define@choicekey*{skyline}{fontsize}[\SL@fontsize\nr]{tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge}[Large]% +{% + \ifcase\nr\relax% + \renewcommand*\SL@fontsize{\tiny}% + \or% + \renewcommand*\SL@fontsize{\scriptsize}% + \or% + \renewcommand*\SL@fontsize{\footnotesize}% + \or% + \renewcommand*\SL@fontsize{\small}% + \or% + \renewcommand*\SL@fontsize{\normalsize}% + \or% + \renewcommand*\SL@fontsize{\large}% + \or% + \renewcommand*\SL@fontsize{\Large}% + \or% + \renewcommand*\SL@fontsize{\LARGE}% + \or% + \renewcommand*\SL@fontsize{\huge}% + \or% + \renewcommand*\SL@fontsize{\Huge}% + \fi% +}% +% +\define@key{skyline}{width}% +{% + \renewcommand*\SL@width{#1}% +}% +% +\define@key{skyline}{title}% +{% + \renewcommand*\SL@title{#1}% +}% +% +\define@key{skyline}{cvoffset}% +{% + \renewcommand*\SL@cvoffset{#1}% +}% +% +\define@key{skyline}{titleindent}% +{% + \renewcommand*\SL@titleindent{#1}% +}% +% +\define@key{skyline}{titlewidth}% +{% + \renewcommand*\SL@titlewidth{#1}% +}% +% +\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}% +% +\ProcessOptionsX\relax% +% +\let\skylineB\LP@bottomrow% +\let\skylineT\LP@toprow% +\let\skylineL\LP@leftcolumn% +\let\skylineR\LP@rightcolumn% +\let\skylinecell\setcell% +% +\newcommand*\skylinesetup[1]% +{% + \setkeys{skyline.sty}{#1}% +}% +% +\newenvironment{skyline}[1][]% +{% + \setkeys{skyline}{#1}% + \LP@set@package{skyline}% + \LP@set@env@prefix{SL}% + \setcounter{SL@rows}{\SL@rows}% + \setcounter{SL@columns}{\SL@columns}% + \stepcounter{SL@rows}% + \stepcounter{SL@columns}% + \begin{minipage}[t]{\SL@width}% + \ifthenelse{\equal{\SL@title}{}}% + {\par\enspace\par}% empty + {\enspace\par\noindent\hspace{\SL@titleindent}\parbox{\SL@titlewidth}{\strut\LP@titleformat\SL@title}\vspace{3mm}\par}% + \begin{tikzpicture}[scale=\SL@scale]% + \LP@drawbackground{1}{1}{\SL@columns}{\SL@rows}{\SL@bgcolor}% + \LP@drawgrid{1}{1}{\SL@columns}{\SL@rows}{1cm}% + \ifthenelse{\equal{\SL@sudoku}{true}}% + {\LP@drawsudokugrid}% + {}% +}% +{% + \end{tikzpicture}% + \LP@drawcounter{\LP@counterstyle}% + \stepcounter{LP@puzzlecounter}% + \end{minipage}% +}% +% +\endinput%
\ No newline at end of file |