summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty')
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty232
1 files changed, 40 insertions, 192 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty
index 9cb2ae6bc8a..676f8537962 100644
--- a/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/skyline.sty
@@ -20,207 +20,55 @@
%% This work consists of all files listed in manifest.txt.
%%
%
-\ProvidesPackage{skyline}[2013/03/09 skyline.sty v1.0 - Josef Kleber (C) 2013]%
+\ProvidesPackage{skyline}[2013/03/27 skyline.sty v1.1 - 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}%
+\newcommand*\LP@SL@init@prefix{LP@SL}%
+\newcommand*\LP@SL@init@package{skyline}%
%
-\newcounter{SL@rows}%
-\newcounter{SL@columns}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{rows}{5}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{columns}{5}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{scale}{1}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{bgcolor}{}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{width}{6.7cm}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{cvoffset}{-38pt}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{title}{}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titleindent}{0.75cm}%
+\LP@define@key{\LP@SL@init@prefix}{\LP@SL@init@package}{titlewidth}{5.85cm}%
+\LP@define@choicekey@fontsize{\LP@SL@init@prefix}{\LP@SL@init@package}{Large}%
%
-\setcounter{SL@rows}{\SL@rows}%
-\setcounter{SL@columns}{\SL@columns}%
-\stepcounter{SL@rows}%
-\stepcounter{SL@columns}%
+\newcommand*\LP@SL@sudoku{false}%
%
-\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]%
+\define@choicekey*{skyline.sty}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]%
{%
\ifcase\nr\relax%
- \renewcommand*\SL@sudoku{true}%
- \renewcommand*\SL@rows{9}%
- \renewcommand*\SL@columns{9}%
+ \renewcommand*\LP@SL@sudoku{true}%
+ \renewcommand*\LP@SL@rows{9}%
+ \renewcommand*\LP@SL@columns{9}%
\or%
- \renewcommand*\SL@sudoku{false}%
+ \renewcommand*\LP@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]%
+\define@choicekey*{skyline}{sudoku}[\LP@SL@sudoku\nr]{true,false}[true]%
{%
\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}%
+ \renewcommand*\LP@SL@sudoku{true}%
+ \renewcommand*\LP@SL@rows{9}%
+ \renewcommand*\LP@SL@columns{9}%
\or%
- \renewcommand*\SL@fontsize{\Huge}%
+ \renewcommand*\LP@SL@sudoku{false}%
\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%
%
+\LP@init@counter{\LP@SL@init@prefix}%
+%
\let\skylineB\LP@bottomrow%
\let\skylineT\LP@toprow%
\let\skylineL\LP@leftcolumn%
@@ -236,25 +84,25 @@
{%
\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}{}}%
+ \LP@set@env@prefix{LP@SL}%
+ \setcounter{LP@SL@rows}{\LP@SL@rows}%
+ \setcounter{LP@SL@columns}{\LP@SL@columns}%
+ \stepcounter{LP@SL@rows}%
+ \stepcounter{LP@SL@columns}%
+ \begin{minipage}[t]{\LP@SL@width}%
+ \ifthenelse{\equal{\LP@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}}%
+ {\enspace\par\noindent\hspace{\LP@SL@titleindent}\parbox{\LP@SL@titlewidth}{\strut\LP@titleformat\LP@SL@title}\vspace{3mm}\par}%
+ \begin{tikzpicture}[scale=\LP@SL@scale]%
+ \LP@drawbackground{1}{1}{\LP@SL@columns}{\LP@SL@rows}{\LP@SL@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@SL@columns}{\LP@SL@rows}{1cm}%
+ \ifthenelse{\equal{\LP@SL@sudoku}{true}}%
{\LP@drawsudokugrid}%
{}%
}%
{%
\end{tikzpicture}%
- \LP@drawcounter{\LP@counterstyle}%
+ \LP@drawcounter{\LP@SL@counterstyle}%
\stepcounter{LP@puzzlecounter}%
\end{minipage}%
}%