diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/psbao/Changes | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/psbao/README | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/psbao/psbaomanual.pdf | bin | 95794 -> 102767 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/psbao/psbaomanual.tex | 65 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/psbao/psbao.sty | 232 |
5 files changed, 149 insertions, 162 deletions
diff --git a/Master/texmf-dist/doc/latex/psbao/Changes b/Master/texmf-dist/doc/latex/psbao/Changes new file mode 100644 index 00000000000..eef62f4ad76 --- /dev/null +++ b/Master/texmf-dist/doc/latex/psbao/Changes @@ -0,0 +1,3 @@ +psbao.sty ----------------------------------- +0.11 2008-11-16 - some code cleaning +0.1 2008-11-10 - first CTAN version diff --git a/Master/texmf-dist/doc/latex/psbao/README b/Master/texmf-dist/doc/latex/psbao/README index 1038da6aee5..a01a5ae1f37 100644 --- a/Master/texmf-dist/doc/latex/psbao/README +++ b/Master/texmf-dist/doc/latex/psbao/README @@ -1,6 +1,9 @@ -PSBAO is a LaTeX2e package to draw Bao diagrams in LaTeX. It has been created using the Go package written by Victor Bos (September 4, 2008) as basis and it is built on top of the PSTricks package. +PSBAO is a LaTeX2e package to draw Bao diagrams in LaTeX. It has been created +using the Go package written by Victor Bos (September 4, 2008) as basis and it +is built on top of the PSTricks package. -To all the people who have never played bao I suggest to visit: http://www.swahili.it/bao. +To all the people who have never played bao I suggest to visit: +http://www.swahili.it/bao. To install the package, place the file psbao.sty in a directory where LaTeX can find it. That is, it should be somewhere on TEXINPUTS. @@ -18,7 +21,7 @@ conditions of the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX +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: @@ -26,3 +29,5 @@ This program consists of the files: psbao.sty psbaomanual.tex ---------------------------------------------------------------------- +HELP ME TO IMPROVE THIS PACKAGE! +---------------------------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/psbao/psbaomanual.pdf b/Master/texmf-dist/doc/latex/psbao/psbaomanual.pdf Binary files differindex dc2ccf7c2df..23e0b81e506 100644 --- a/Master/texmf-dist/doc/latex/psbao/psbaomanual.pdf +++ b/Master/texmf-dist/doc/latex/psbao/psbaomanual.pdf diff --git a/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex b/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex index adc637dd699..3b325c0868f 100644 --- a/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex +++ b/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex @@ -276,13 +276,76 @@ Prints:\\ The command: \verb|\weka| keeps the previous situation, so if it is necessary to set a completely new situation it must be used the command \verb|\initbao|. +\section*{Move directions} + +\lettrine[lines=2]{\textbf{T}}{o} indicate the direction of move it is possible to use the command \verb|\markpos|, which takes three parameters: the +direction marker, the column, and the row. For example, the move a3\textless\; is shown on the diagram by \verb|\markpos{marksx}{a}{3}| and A3\textgreater\; is shown on the diagram by \verb|\markpos{markdx}{A}{3}|: + +\begin{figure}[!ht] +\setlength{\columnsep}{20pt}\small +\begin{multicols}{2} +\noindent Code:\\ +\begin{verbatim} +\weka{10}{n}{2} +\weka{3}{a}{3} +\weka{3}{A}{3} +\weka{9}{s}{3} +\begin{showbaoboard} + \markpos{\marksx}{a}{3} +\end{showbaoboard} +\end{verbatim} +\mbox{}\\ +\mbox{}\\ +Prints:\\ +\weka{10}{n}{2} +\weka{3}{a}{3} +\weka{3}{A}{3} +\weka{9}{s}{3} +\begin{showbaoboard} + \markpos{\marksx}{a}{3} +\end{showbaoboard} +\mbox{}\\ +\caption{The move a3\textless} +\label{fig:ko:left} +\end{multicols} +\end{figure} + +\begin{figure}[!ht] +\setlength{\columnsep}{20pt}\small +\begin{multicols}{2} +\noindent Code:\\ +\begin{verbatim} +\weka{10}{n}{2} +\weka{3}{a}{3} +\weka{3}{A}{3} +\weka{9}{s}{3} +\begin{showbaoboard} + \markpos{\markdx}{A}{3} +\end{showbaoboard} +\end{verbatim} +\mbox{}\\ +\mbox{}\\ +Prints:\\ +\weka{10}{n}{2} +\weka{3}{a}{3} +\weka{3}{A}{3} +\weka{9}{s}{3} +\begin{showbaoboard} + \markpos{\markdx}{A}{3} +\end{showbaoboard} +\mbox{}\\ +\caption{The move A3\textgreater} +\label{fig:ko:right} +\end{multicols} +\end{figure} + \section*{Markers} \lettrine[lines=2]{\textbf{A}}{ hole} on the board can be marked with the command \verb|\markpos|. This command takes three parameters: the marker, the column, and the row. Available markers and the commands to generate them are listed in Table~\ref{tbl:markers}. -Note that to mark a non-empty hole the command \verb|\weka| have to be used together with marker command, \verb|\markpos|. +Note that to mark a non-empty hole the command \verb|\weka| has to be used together with marker command, \verb|\markpos|. Note, also, that the special holes (as \textit{kichwa} or \textit{kimbi}) can be used the marks \verb|\markdd| or \verb|\markss|, indifferently (but consistently!). Those commands must be inside the environment \verb|\begin{showboard}| $dots$ \verb|\end{showboard}|. 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 |