summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty')
-rw-r--r--Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty89
1 files changed, 89 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty b/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty
new file mode 100644
index 00000000000..9053cabca72
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/logicpuzzle/laserbeam.sty
@@ -0,0 +1,89 @@
+%%
+%% 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{laserbeam}[2013/04/20 laserbeam.sty v1.0 - Josef Kleber (C) 2013]%
+%
+\RequirePackage{logicpuzzle}%
+%
+\newcommand*\LP@LB@init@prefix{LP@LB}%
+\newcommand*\LP@LB@init@package{laserbeam}%
+%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{rows}{5}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{columns}{5}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{scale}{1}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{counterstyle}{none}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{bgcolor}{}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{width}{6.5cm}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{cvoffset}{-38pt}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{title}{}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titleindent}{0cm}%
+\LP@define@key{\LP@LB@init@prefix}{\LP@LB@init@package}{titlewidth}{6.5cm}%
+\LP@define@choicekey@fontsize{\LP@LB@init@prefix}{\LP@LB@init@package}{Large}%
+%
+\ExecuteOptionsX{rows,columns,width,fontsize,scale,bgcolor,cvoffset,counterstyle,title,titleindent,titlewidth}%
+%
+\ProcessOptionsX\relax%
+%
+\LP@init@counter{\LP@LB@init@prefix}%
+%
+\let\laserH\LP@toprow%
+\let\laserV\LP@leftcolumn%
+\let\mirrorH\LP@bottomrow@edge%
+\let\mirrorV\LP@rightcolumn@edge%
+%
+\newcommand*\laser[2][red]%
+{%
+ % avoid little laser peaks outside grid
+ \clip (1,1) rectangle (\arabic{LP@LB@columns},\arabic{LP@LB@rows});
+ \framearea{#1}{#2}%
+}%
+%
+\newcommand*\laserbeamsetup[1]%
+{%
+ \setkeys{laserbeam.sty}{#1}%
+}%
+%
+\newenvironment{laserbeam}[1][]%
+{%
+ \setkeys{laserbeam}{#1}%
+ \LP@set@package{laserbeam}%
+ \LP@set@env@prefix{LP@LB}%
+ \setcounter{LP@LB@rows}{\LP@LB@rows}%
+ \setcounter{LP@LB@columns}{\LP@LB@columns}%
+ \stepcounter{LP@LB@rows}%
+ \stepcounter{LP@LB@columns}%
+ \begin{minipage}[t]{\LP@LB@width}%
+ \ifthenelse{\equal{\LP@LB@title}{}}%
+ {\par\enspace\par}% empty
+ {\enspace\par\noindent\hspace{\LP@LB@titleindent}\parbox{\LP@LB@titlewidth}{\strut\LP@titleformat\LP@LB@title}\vspace{3mm}\par}%
+ \begin{tikzpicture}[scale=\LP@LB@scale]%
+ \LP@drawbackground{1}{1}{\LP@LB@columns}{\LP@LB@rows}{\LP@LB@bgcolor}%
+ \LP@drawgrid{1}{1}{\LP@LB@columns}{\LP@LB@rows}{1cm}%
+}%
+{%
+ \end{tikzpicture}%
+ \LP@drawcounter{\LP@LB@counterstyle}%
+ \stepcounter{LP@puzzlecounter}%
+ \end{minipage}%
+}%
+%
+\endinput% \ No newline at end of file