diff options
author | Karl Berry <karl@freefriends.org> | 2008-11-17 01:37:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-11-17 01:37:36 +0000 |
commit | 47ba5bf6b12104310f5138e5fce3f33cf3e51049 (patch) | |
tree | 25dd692560a8f03c5f5f6510c6b643c19c1f744a /Master/texmf-dist/tex/latex/psbao | |
parent | e7fcb85cbb98b6bd0d23746493289c36d069ea2d (diff) |
psbao update (16nov08)
git-svn-id: svn://tug.org/texlive/trunk@11319 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/psbao')
-rw-r--r-- | Master/texmf-dist/tex/latex/psbao/psbao.sty | 232 |
1 files changed, 74 insertions, 158 deletions
diff --git a/Master/texmf-dist/tex/latex/psbao/psbao.sty b/Master/texmf-dist/tex/latex/psbao/psbao.sty index 3f369b5854a..ac6ff8ee3db 100644 --- a/Master/texmf-dist/tex/latex/psbao/psbao.sty +++ b/Master/texmf-dist/tex/latex/psbao/psbao.sty @@ -1,5 +1,5 @@ %% psbao.sty -%% Copyright 2004, 2003,2001 V. Bos +%% Copyright 2008 N. Vessella % % This program may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.2 @@ -9,22 +9,23 @@ % and version 1.2 or later is part of all distributions of LaTeX % version 1999/12/01 or later. % -% This program consists of the files: +% This package consists of the files: % % psbao.sty % psbaomanual.tex +% psbaomanual.pdf % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MOST OF THE FOLLOWING CODE IS COPIED FROM psgo.sty % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \NeedsTeXFormat{LaTeX2e}% -\ProvidesPackage{psbao}[2008/09/04, v0.17] -\message{`PSBAO', <2008/09/04>, v0.17} -\RequirePackage{pstricks,pst-node,calc,ifthen,cool,etex} - +\ProvidesPackage{psbao}[2008/11/01, v0.11] +\message{`PSBAO', <2008/11/01>, v0.11} +\RequirePackage{pstricks,calc,ifthen,cool,etex} +%\RequirePackage{pstricks,pst-node,calc,ifthen,cool,etex} \newcommand{\psbao}{\textsf{psbao}} -\newsavebox{\stmarkbox} +%\newsavebox{\stmarkbox} \newcounter{boardrow} \newcounter{boardcol} \newcounter{ghalaku} % granaio sud @@ -67,6 +68,10 @@ \newcounter{nvxxxiii} \newcounter{nvxxxiv} + \newcount\nord + \newcount\b + \newcount\sud + \newcommand{\setbaounit}[1]{ \setlength{\baoxunit}{#1} \setlength{\baoyunit}{1.115\baoxunit} @@ -129,13 +134,13 @@ \initbao \setbaounit{0.6cm} -\newcommand{\hatchangle}{-42.5} % non usato +%\newcommand{\hatchangle}{-42.5} % non usato \newlength{\tmplx} \newlength{\tmply} -\newlength{\tmpxa}% non usato -\newlength{\tmpxb}% non usato -\newlength{\tmpya}% non usato -\newlength{\tmpyb}% non usato +%\newlength{\tmpxa}% non usato +%\newlength{\tmpxb}% non usato +%\newlength{\tmpya}% non usato +%\newlength{\tmpyb}% non usato \newcounter{tmpc} \newcommand{\pointbox}[1]{% @@ -198,38 +203,60 @@ }% \newcommand{\redim}[1]{% -% \the\baoxunit - \ifdim \baoxunit > 24pt -% {\huge{##1}} - {\LARGE{#1}} + \ifdim \baoxunit > 24pt + {\LARGE{#1}} + \else% + \ifdim \baoxunit > 20pt + {\Large{#1}} + \else% + \ifdim \baoxunit > 17pt + {\large{#1}} \else% - \ifdim \baoxunit > 20pt - {\Large{#1}} + \ifdim \baoxunit > 14pt + {\normalsize{#1}} \else% - \ifdim \baoxunit > 17pt - {\large{#1}} + \ifdim \baoxunit > 12pt + {\small{#1}} \else% - \ifdim \baoxunit > 14pt - {\normalsize{#1}} + \ifdim \baoxunit > 10pt + {\footnotesize{#1}} \else% - \ifdim \baoxunit > 12pt - {\small{#1}} + \ifdim \baoxunit > 9pt + {\scriptsize{#1}} \else% - \ifdim \baoxunit > 10pt - {\footnotesize{#1}} - \else% - \ifdim \baoxunit > 9pt - {\scriptsize{#1}} - \else% - {\tiny{#1}}% - \fi - \fi + {\tiny{#1}}% \fi \fi - \fi% + \fi \fi \fi% - }% + \fi + \fi% +}% + +\newcommand{\conx}[2]{% + % There should be a better way to write this command! + \nord=9 + \sud=#2 + \setcounter{tmpc}{#2} + \advance \nord by -\value{tmpc} + \if #1b + \setcounter{tmpc}{\nord}% + \else + \if #1a + \setcounter{tmpc}{\nord}% + \else + \if #1A + \setcounter{tmpc}{\sud}% + \else + \if #1B + \setcounter{tmpc}{\sud}% + \fi + \fi + \fi + \fi + \b=\value{tmpc} +}% \newenvironment{baomoves}{% \newcommand{\placesymbol}[3]{% @@ -242,33 +269,11 @@ }% \newcommand{\markpos}[3] {% - % Here should be used the macro \conx - \newcount\sud - \newcount\nord - \newcount\b - \nord=9 - \sud=##3 - \b=##3 - \advance \nord by -\b - \if ##2b - \b = \nord% - \else - \if ##2a - \b = \nord% - \else - \if ##2A - \b = \sud% - \else - \if ##2B - \b = \sud% - \fi - \fi - \fi - \fi + \conx{##2}{##3} \placesymbol{\psframebox[dimen=inner,% linestyle=none,% boxsep=false,% - framesep=0.3\baoxunit]{##1}}{##2}{\b} + framesep=0.3\baoxunit]{##1}}{##2}{\value{tmpc}} }% \newcommand{\kete}[3] {% @@ -302,37 +307,14 @@ \setcounter{ghalaka}{0} }% -\newcommand{\conx}[2]{% - \newcount\sud - \newcount\nord - \newcount\b - \nord=9 - \sud=##2 - \b=##2 - \advance \nord by -\b - \if ##1b \nord% - \else - \if ##1a \nord - \else - \if ##1A \sud - \else - \if ##1B \sud - \fi - \fi - \fi - \fi -}% \renewcommand{\seeds}[3]{% % \kete[\stmark]{##2}{\conx{##2}{##3}}% + \def\stmark{\pointbox{##1}}% % Here should be used the macro \conx - \newcount\sud - \newcount\nord - \newcount\b \nord=9 \sud=##3 - \b=##3 - \advance \nord by -\b - \def\stmark{\pointbox{##1}}% +% \b=##3 + \advance \nord by -\sud \if ##2b \kete{\stmark}{##2}{\nord}% \else @@ -354,30 +336,12 @@ % \newcommand{\baoarrow}[2] { - % Here should be used the macro \conx - \newcount\sud - \newcount\nord - \newcount\b - \nord=9 - \sud=##2 - \b=##2 - \advance \nord by -\b - \if ##1b - \b = \nord% - \else - \if ##1a - \b = \nord% - \else - \if ##1A - \b = \sud% - \else - \if ##1B - \b = \sud% - \fi - \fi - \fi - \fi -\pstriangle[gangle=90](\baoyposition{\b},\baoxposition{##1})(1,.5) + +\conx{##1}{##2} +%\pstriangle[gangle=90](\baoyposition{\value{tmpc}},\baoxposition{##1})(1,.5) +% It doesn't work! It doesn't accept the multiplication of \baoxposition, +% I will be greatful for any help. +\psdots[dotstyle=triangle*,dotscale=2](\baoyposition{\value{tmpc}},.5\baoxposition{##1}) %\psline[linewidth=1.4pt, % linecolor=black, % linestyle=solid, @@ -643,56 +607,8 @@ \end{pspicture}} }% -\newcommand{\baosit}[1][22,% - 0,0,0,0,0,0,0,0,% - 0,2,2,6,0,0,0,0,% - 0,0,0,0,6,2,2,0,% - 0,0,0,0,0,0,0,0,% - 22]{% -\liststore{#1}{bc} -\begin{showbaoboard} - \ifnum \bci>0 {\seeds{\bci}{n}{1}}{}\fi% - \ifnum \bcii>0 {\seeds{\bcii}{b}{8}}{}\fi% - \ifnum \bciii>0 {\seeds{\bciii}{b}{7}}{}\fi% - \ifnum \bciv>0 {\seeds{\bciv}{b}{6}}{}\fi% - \ifnum \bcv>0 {\seeds{\bcv}{b}{5}}{}\fi% - \ifnum \bcvi>0 {\seeds{\bcvi}{b}{4}}{}\fi% - \ifnum \bcvii>0 {\seeds{\bcvii}{b}{3}}{}\fi% - \ifnum \bcviii>0 {\seeds{\bcviii}{b}{2}}{}\fi% - \ifnum \bcix>0 {\seeds{\bcix}{b}{1}}{}\fi% - \ifnum \bcx>0 {\seeds{\bcx}{a}{8}}{}\fi% - \ifnum \bcxi>0 {\seeds{\bcxi}{a}{7}}{}\fi% - \ifnum \bcxii>0 {\seeds{\bcxii}{a}{6}}{}\fi% - \ifnum \bcxiii>0 {\seeds{\bcxiii}{a}{5}}{}\fi% - \ifnum \bcxiv>0 {\seeds{\bcxiv}{a}{4}}{}\fi% - \ifnum \bcxv>0 {\seeds{\bcxv}{a}{3}}{}\fi% - \ifnum \bcxvi>0 {\seeds{\bcxvi}{a}{2}}{}\fi% - \ifnum \bcxvii>0 {\seeds{\bcxvii}{a}{1}}{}\fi% - \ifnum \bcxviii>0 {\seeds{\bcxviii}{A}{1}}{}\fi% - \ifnum \bcxix>0 {\seeds{\bcxix}{A}{2}}{}\fi% - \ifnum \bcxx>0 {\seeds{\bcxx}{A}{3}}{}\fi% - \ifnum \bcxxi>0 {\seeds{\bcxxi}{A}{4}}{}\fi% - \ifnum \bcxxii>0 {\seeds{\bcxxii}{A}{5}}{}\fi% - \ifnum \bcxxiii>0 {\seeds{\bcxxiii}{A}{6}}{}\fi% - \ifnum \bcxxiv>0 {\seeds{\bcxxiv}{A}{7}}{}\fi% - \ifnum \bcxxv>0 {\seeds{\bcxxv}{A}{8}}{}\fi% - \ifnum \bcxxvi>0 {\seeds{\bcxxvi}{B}{1}}{}\fi% - \ifnum \bcxxvii>0 {\seeds{\bcxxvii}{B}{2}}{}\fi% - \ifnum \bcxxviii>0 {\seeds{\bcxxviii}{B}{3}}{}\fi% - \ifnum \bcxxix>0 {\seeds{\bcxxix}{B}{4}}{}\fi% - \ifnum \bcxxx>0 {\seeds{\bcxxx}{B}{5}}{}\fi% - \ifnum \bcxxxi>0 {\seeds{\bcxxxi}{B}{6}}{}\fi% - \ifnum \bcxxxii>0 {\seeds{\bcxxxii}{B}{7}}{}\fi% - \ifnum \bcxxxiii>0 {\seeds{\bcxxxiii}{B}{8}}{}\fi% - \ifnum \bcxxxiv>0 {\seeds{\bcxxxiv}{s}{1}}{}\fi% -\end{showbaoboard} -} - \newcommand{\weka}[3]{% -% \kete[\stmark]{##2}{\conx{##2}{##3}}% - % Here should be used the macro \conx - \newcount\nord - \newcount\b + % \kete[\stmark]{##2}{\conx{##2}{##3}}% \b=#3 \if #2b \nord=10 |