texlive[55013] Master/texmf-dist: psbao (3may20)

commits+karl at tug.org commits+karl at tug.org
Mon May 4 23:23:11 CEST 2020


Revision: 55013
          http://tug.org/svn/texlive?view=revision&revision=55013
Author:   karl
Date:     2020-05-04 23:23:10 +0200 (Mon, 04 May 2020)
Log Message:
-----------
psbao (3may20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/psbao/Changes
    trunk/Master/texmf-dist/doc/latex/psbao/README
    trunk/Master/texmf-dist/doc/latex/psbao/psbaomanual.pdf
    trunk/Master/texmf-dist/tex/latex/psbao/psbao.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex

Modified: trunk/Master/texmf-dist/doc/latex/psbao/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/psbao/Changes	2020-05-04 21:22:53 UTC (rev 55012)
+++ trunk/Master/texmf-dist/doc/latex/psbao/Changes	2020-05-04 21:23:10 UTC (rev 55013)
@@ -1,3 +1,10 @@
 psbao.sty -----------------------------------
+1.0   2020-05-02  - code cleaning
+                  - debugged
+                  - added the following command:
+                    markmt{}{}
+                  - modified commands:
+                    markxx .> markss
+
 0.11  2008-11-16  - some code cleaning
 0.1   2008-11-10  - first CTAN version

Modified: trunk/Master/texmf-dist/doc/latex/psbao/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/psbao/README	2020-05-04 21:22:53 UTC (rev 55012)
+++ trunk/Master/texmf-dist/doc/latex/psbao/README	2020-05-04 21:23:10 UTC (rev 55013)
@@ -3,7 +3,7 @@
 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.
+http://www.kibao.org
 
 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.
@@ -15,7 +15,7 @@
 
 psbao
 Copyright 2008 N. Vessella
-
+          2020 v.1.0 N. Vessella
 This program may be distributed and/or modified under the
 conditions of the LaTeX Project Public License, either version 1.2
 of this license or (at your option) any later version.

Modified: trunk/Master/texmf-dist/doc/latex/psbao/psbaomanual.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex	2020-05-04 21:22:53 UTC (rev 55012)
+++ trunk/Master/texmf-dist/doc/latex/psbao/psbaomanual.tex	2020-05-04 21:23:10 UTC (rev 55013)
@@ -1,413 +0,0 @@
-%% psbaomanual.tex
-% This program consists of the files:
-%
-%   psbao.sty
-%   psbaomanual.tex
-%
-%
-\documentclass[a4paper]{book}
-\usepackage{psbao,array,url,lettrine,float,multicol}
-\newcommand{\pstricks}{\textsf{PSTricks}}
-\newcommand{\commandname}[1]{{\ttfamily\symbol{'134}#1}}
-% The following code is taken from the doc package. It defines a global 
-% macro \bslash that produces a bslash (if present in the current font). 
-\makeatletter
-{\catcode`\|=\z@ \catcode`\\=12 |gdef|bslash{\}}
-\makeatother
-\newcommand{\cmd}[1]{\texttt{\bslash #1}}
-
-\title{\psbao\\{\normalfont\normalsize Typesetting Bao Diagrams with \pstricks}}
-\author{Nino Vessella\\web site: www.vessella.it}
-\date{October, 2008}
-
-\setbaounit{0.5cm}
-
-\begin{document}
-\maketitle
-
-\section*{Introduction}
-
-\lettrine[lines=2]{\textbf{T}}{his package} provides functionality to typeset Bao diagrams in \LaTeXe. 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 \textit{\url{http://www.swahili.it/bao}}.
-
-\section*{Download and installation}
-
-\lettrine[lines=2]{\textbf{T}}{he} \psbao{} package can be found at CTAN (mirrors) in the directory\linebreak 
-\url{graphics/pstricks/contrib/psbao/}.
-
-\noindent It is also available from
-\url{http://www.vessella.it/ghala/}.
-\medskip
-
-To install the package, download the files
-\texttt{psbao.sty} and \texttt{psbaomanual.tex} and put them in a
-directory where \LaTeX{} can find them. After that, test the
-installation by running \LaTeX{} on \texttt{psbaomanual.tex}. 
-
-Note that \textsf{psbao} uses \textsf{pstricks} to draw
-graphics. Therefore, the same things that apply to viewing and
-printing documents with \textsf{pstricks} graphics also apply to
-documents with \textsf{psbao} graphics. In particular, it is usually
-better to use a PostScript viewer (e.g., \texttt{gv} or
-\texttt{gsview}) instead of a DVI viewer (like \texttt{xdvi} or
-\texttt{yap}).
-
-\section*{Bao boards}
-
-\lettrine[lines=2]{\textbf{T}}{he} interface of \psbao{} is based on the notation used in\linebreak\url{http://www.swahili.it/bao/}. That is, the rows of the $4\times8$ board are indexed by $1,2,\ldots,8$ and the columns are indexed by $b, a, A, B$.
-
-First of all it must be set the initial position of a Bao game. For the standard initial setting is used the command \verb|\initbao|, but the board is showed by the environmnet \verb|\begin{showbaoboard}| $\dots$ \verb|\end{showbaoboard}| (Figure~\ref{fig:ko:standard}):
-
-\begin{figure}[!ht]
-\setlength{\columnsep}{20pt}\small
-\begin{multicols}{2}
-\noindent Code:\\
-\mbox{}\\
-\begin{verbatim}
-\initbao
-\begin{figure}
- \begin{center}
-  \begin{showbaoboard}
-  \end{showbaoboard}
-  \caption{...}
-  \label{fig:...}
- \end{center}
-\end{figure}
-\end{verbatim}
-\mbox{}\\
-Prints:\\
-\mbox{}\\
-    \begin{showbaoboard}
-    \end{showbaoboard}
-\mbox{}\\
-\caption{Setting up the standard initial situation: default size 0.6cm}
-\label{fig:ko:standard}
-\end{multicols}
-\end{figure}
-
-
-For the initial setting of the beginner's variant \textit{Bao la kujifunza} is used the command \verb|\initjbao| (Figure~\ref{fig:empty:jifunza}):
-
-\begin{figure}[!ht]
-\setlength{\columnsep}{20pt}\small
-\begin{multicols}{2}
-\noindent Code:\\
-\mbox{}\\
-\begin{verbatim}
-\initjbao
-\begin{figure}
- \begin{center}
-  \begin{showbaoboard}
-  \end{showbaoboard}
-  \caption{...}
-  \label{fig:...}
- \end{center}
-\end{figure}
-\end{verbatim}
-\mbox{}\\
-Prints:\\
-\mbox{}\\
-\initjbao
-  \begin{showbaoboard}
-  \end{showbaoboard}
-\mbox{}\\
-  \caption{Bao la kujifunza}
-  \label{fig:empty:jifunza}
-\end{multicols}
-\end{figure}
-
-The default horizontal unit distance is~$0.6$cm. The vertical unit distance is computed by the \psbao{} package.
-To re-size a Bao board, the command
-\verb|\setbaounit| can be used. This command takes the desired
-horizontal unit distance as an argument. It is not advisable, though possible, to set the unit distance to a value less than 0.3cm, see Figure~\ref{fig:empty:resize}(b).
-
-\initbao
-\weka{0}{n}{0}
-\weka{0}{a}{5} % 3,0
-\weka{0}{a}{6} % 2,1
-\weka{0}{a}{7} % 1,2
-\weka{0}{A}{5} % 0,3
-\weka{0}{A}{6}
-\weka{0}{A}{7}
-\weka{0}{s}{0}
-\weka{10}{b}{2} % 3,0
-\weka{27}{a}{2} % 2,1
-\weka{33}{A}{2} % 1,2
-\weka{4}{B}{2} % 0,3
-\weka{10}{A}{1}
-\begin{figure}[H]
- \begin{center}
-  \begin{tabular}{cc}
-   \setbaounit{.5cm}
-   \begin{showbaoboard}
-   \end{showbaoboard}
-&
-   \setbaounit{0.3cm}
-    \weka{10}{b}{2} % 3,0
-    \weka{27}{a}{2} % 2,1
-    \weka{33}{A}{2} % 1,2
-    \weka{4}{B}{2} % 0,3
-    \weka{10}{A}{1}
-   \begin{showbaoboard}
-   \end{showbaoboard}
-\\
-\\
-(a) Horizontal step 0.5cm.
-&
-(b) Horizontal step 0.3cm.
-\end{tabular}
-  \caption{Resized Bao boards}
-  \label{fig:empty:resize}
- \end{center}
-\end{figure}
-
-For the diagrams in this document we have set the horizontal
-unit distance to~$0.5$cm (\verb|\setbaounit{0.5cm}|).
-
-\section*{Seeds and situations}
-
-\lettrine[lines=2]{\textbf{T}}{he command} to put seeds into the holes is \verb|\weka| which takes three parameters: the number of seeds, the row and the column of the hole. For example, \verb|\weka{2}{a}{4}| puts two seeds into the hole at position~$(a,4)$. The \verb|\weka| command can be used to modify a previous situation. For instance, the situation of Figure~\ref{fig:ko:situation} is defined as follows.
-
-\begin{figure}[!ht]
-\setlength{\columnsep}{20pt}\small
-\begin{multicols}{2}
-\noindent Code:\\
-\mbox{}\\
-\begin{verbatim}
-\weka{1}{b}{2} % 3,0
-\weka{2}{a}{2} % 2,1
-\weka{3}{A}{2} % 1,2
-\weka{4}{B}{2} % 0,3
-\weka{5}{A}{1}
-\weka{9}{A}{3}
-\begin{showbaoboard}
-\end{showbaoboard}
-\end{verbatim}
-Prints:\\
-\mbox{}\\
-\weka{1}{b}{2} % 3,0
-\weka{2}{a}{2} % 2,1
-\weka{3}{A}{2} % 1,2
-\weka{4}{B}{2} % 0,3
-\weka{5}{A}{1}
-\weka{9}{A}{3}
-\begin{showbaoboard}
-\end{showbaoboard}
-\mbox{}\\
-  \caption{Example of weka}
-  \label{fig:ko:situation}
-\end{multicols}
-\end{figure}
-
-The same situation can be set by \verb|\initbao| which takes one optional parameter to indicate the number of seeds contained in all holes (Figure~\ref{fig:ko:sit}).
-
-\begin{figure}[!ht]
-\setlength{\columnsep}{20pt}\small
-\begin{multicols}{2}
-\noindent Code:\\
-\mbox{}\\
-\begin{verbatim}
-\initbao[0,%
-        0,0,0,0,0,0,1,0,%
-        0,0,0,0,0,0,1,0,%
-        5,3,0,0,0,0,0,0,%
-        0,3,9,0,0,0,0,0,%
-        0]
-\begin{figure}
-\begin{center}
- \begin{showbaoboard}
- \end{showbaoboard}
-\end{center}
-\end{figure}
-\end{verbatim}
-Prints:\\
-\mbox{}\\
-\initbao[0,%
-            0,0,0,0,0,0,1,0,%
-            0,0,0,0,0,0,1,0,%
-            5,3,0,0,0,0,0,0,%
-            0,3,9,0,0,0,0,0,%
-            0]
-  \begin{showbaoboard}
-  \end{showbaoboard}
-\mbox{}\\
-  \caption{Writing the number of seeds of all holes}
-  \label{fig:ko:sit}
-\end{multicols}
-\end{figure}
-
-To put seeds into the stores is used the same command: \verb|\weka|. In this case instead of index of the row can be used the letters $s$ or $S$ for the south store, and the letters $n$ or $N$. For example, \verb|\weka{2}{s}{4}| puts two seeds into the store of South. The third parameter must be any number.
-\begin{figure}[!ht]
-\setlength{\columnsep}{20pt}\small
-\begin{multicols}{2}
-\noindent Code:\\
-\begin{verbatim}
-\begin{showbaoboard}
-\weka{10}{n}{2}
-\weka{1}{b}{2}
-\weka{2}{a}{2}
-\weka{3}{A}{2}
-\weka{4}{B}{2}
-\weka{5}{A}{1}
-\weka{9}{A}{3}
-\weka{9}{s}{3}
-\end{showbaoboard}
-\end{verbatim}
-\mbox{}\\
-\mbox{}\\
-Prints:\\
-\mbox{}\\
-\weka{10}{n}{2}
-\weka{1}{b}{2} % 3,0
-\weka{2}{a}{2} % 2,1
-\weka{3}{A}{2} % 1,2
-\weka{4}{B}{2} % 0,3
-\weka{5}{A}{1}
-\weka{9}{A}{3}
-\weka{9}{s}{3}
-\begin{showbaoboard}
-\end{showbaoboard}
-\mbox{}\\
-\caption{Setting up a situation with stores}
-\label{fig:ko:ghala}
-\end{multicols}
-\end{figure}
-
-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| 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}|.
-
-\setbaounit{0.4cm}
-\weka{1}{b}{2}
-\weka{2}{a}{2}
-\weka{3}{A}{2}
-\weka{4}{B}{2}
-\weka{5}{A}{1}
-\weka{9}{A}{3}
-\begin{table}
-\begin{center}
-\begin{tabular}{|c|l|l|l|}
-\hline
-Diagram & Mark & Description & Command\\
-\hline\hline 
-\raisebox{0.2\height}
-{%
-\begin{showbaoboard}
-\markpos{\marksx}{a}{2}
-\end{showbaoboard}%
-} &
-\commandname{marksx} & a2\textless  &
-{\commandname{markpos}\{\commandname{marksx}\}\{a\}\{2\}}\\\hline
-%
-\raisebox{0.2\height}
-{
-\begin{showbaoboard}
-\markpos{\markdx}{A}{3}
-\end{showbaoboard}
-} &
-\commandname{markdx}& A3\textgreater &
-{\commandname{markpos}\{\commandname{markdx}\}\{A\}\{3\}}\\\hline
-%
-\raisebox{0.2\height}
-{
-\begin{showbaoboard}
-\markpos{\markss}{a}{2}
-\end{showbaoboard}} &
-\commandname{markss}& Special hole &
-{\commandname{markpos}\{\commandname{markss}\}\{a\}\{2\}}\\\hline
-%
-\raisebox{0.2\height}
-{
-\begin{showbaoboard}
-\markpos{\markdd}{A}{1}
-\end{showbaoboard}} &
-\commandname{markdd}& Special hole &
-{\commandname{markpos}\{\commandname{markdd}\}\{A\}\{1\}}\\\hline
-%
-\raisebox{0.2\height}
-{
-\begin{showbaoboard}
-\markpos{\markma}{A}{5}
-\end{showbaoboard}} &
-\commandname{markma}& Any nr of seeds &
-{\commandname{markpos}\{\commandname{markma}\}\{A\}\{5\}}\\\hline
-\end{tabular}
-\caption{Markers on holes}
-\label{tbl:markers}
-\end{center}
-\end{table}
-
-
-\end{document}

Modified: trunk/Master/texmf-dist/tex/latex/psbao/psbao.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/psbao/psbao.sty	2020-05-04 21:22:53 UTC (rev 55012)
+++ trunk/Master/texmf-dist/tex/latex/psbao/psbao.sty	2020-05-04 21:23:10 UTC (rev 55013)
@@ -25,7 +25,6 @@
 \RequirePackage{pstricks,calc,ifthen,cool,etex}
 %\RequirePackage{pstricks,pst-node,calc,ifthen,cool,etex}
 \newcommand{\psbao}{\textsf{psbao}}
-%\newsavebox{\stmarkbox}
 \newcounter{boardrow}
 \newcounter{boardcol}
 \newcounter{ghalaku} % granaio sud
@@ -134,13 +133,8 @@
 
 \initbao
 \setbaounit{0.6cm}
-%\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
 \newcounter{tmpc}
 
 \newcommand{\pointbox}[1]{%
@@ -147,12 +141,11 @@
 \raisebox{-0.5\height+0.5\depth}[0pt][0pt]{\makebox[0pt]{#1}}%
 }
 
-%\newcommand{\baolabelformat}[1]{{\sffamily #1}}
 \newcommand{\baolabelformat}[1]{%
 {\sffamily {\footnotesize{#1}}}%
 }
 
-\newcommand{\baoxposition}[1]{%
+\newcommand\baoxposition[1]{%
 	\ifx#1B 0\else%
 	\ifx#1A 1\else%
 	\ifx#1a 2\else%
@@ -307,8 +300,7 @@
  \setcounter{ghalaka}{0}
  }%
 
-\renewcommand{\seeds}[3]{%
-% \kete[\stmark]{##2}{\conx{##2}{##3}}%
+	\renewcommand\seeds[3]{%
  \def\stmark{\pointbox{##1}}%
  % Here should be used the macro \conx
  \nord=9
@@ -334,23 +326,9 @@
  \fi
 }%
 %
-\newcommand{\baoarrow}[2]
-{
-
+	\newcommand\baoarrow[2]{
 \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,
-%        arrowscale=1.5]%
-%		{>-}%
-%		(\baoyposition{\b},\baoxposition{##1})
-%		(\baoyposition{\b},\baoxposition{##1})
-%		(0.1\baoyposition{##2},\baoxposition{\b})%
-%}		
+		\psdots[dotstyle=triangle*,dotscale=1.5](\baoyposition{\thetmpc},\pscalculate{\baoxposition{##1}-.5})
 }%
 }{}%
 
@@ -409,9 +387,6 @@
 \def\psbaosetboardsizes(#1,#2)(#3,#4){%
   \def\psbaollx{#1}%
   \def\psbaolly{#2}%
-%  \ifthenelse{#3 > \value{boardcol}}
-%   {\def\psbaourx{\value{boardcol}}}
-%   {\def\psbaourx{#3}}%
   \def\psbaourx{#3}%
 %  \ifthenelse{#4 > \value{boardrow}}
 %   {\def\psbaoury{\value{boardrow}}}
@@ -422,7 +397,6 @@
 \newboolean{withindices}%
 \setboolean{withindices}{true}%
 
-% psbaopartialboard[8](0,0)(8,4)
 \newenvironment{psbaopartialboard}[2][8]
 {%
 	\setcounter{boardcol}{8}%
@@ -554,8 +528,10 @@
 {%
   \end{psbaopartialboard}%
 }
+% numero di semi indefinito
 \newcommand{\nomark}{\relax}%
 \newcommand{\factor}{0.28284271247461901}% = 2/5 * sin(1/4 * pi)
+
 \newcommand{\markma}{%
 	\psline[linewidth=1.4pt](-\factor,-\factor)(\factor,\factor)%
 	\psline[linewidth=1.4pt](-\factor,\factor)(\factor,-\factor)%
@@ -565,7 +541,6 @@
 	{%
 	\psline[linewidth=1.4pt](.5\baoxunit,-.5\baoxunit)
 	\psline[linewidth=1.4pt](.5\baoxunit,.5\baoxunit)
-	%\pstriangle(-.1\baoxunit,0.1\baoxunit)%
 	}%
 }%
 \newcommand{\markdx}{%
@@ -573,7 +548,6 @@
 	{%
 	\psline(-.5\baoxunit,-.5\baoxunit)
 	\psline(-.5\baoxunit,.5\baoxunit)
-	%\pstriangle(-.1\baoxunit,0.1\baoxunit)%
 	}%
 }%
 \newcommand{\marksl}{%
@@ -598,6 +572,18 @@
     linestyle=none]%
 	 (-0.5\baoxunit,-0.5\baoyunit)(0.5\baoxunit,0.5\baoyunit)%
 }%
+\newcommand{\markmt}{%
+	\rput(.5\baoxunit,0)%
+{%
+	\psline(-.5\baoxunit,-.5\baoxunit)
+	\psline(-.5\baoxunit,.5\baoxunit)
+}%
+	\rput(-.5\baoxunit,0)%
+{%
+	\psline[linewidth=1.4pt](.5\baoxunit,-.5\baoxunit)
+	\psline[linewidth=1.4pt](.5\baoxunit,.5\baoxunit)
+}%
+}%
 
 \newcommand{\seeds}[1]{%
   \setlength{\tmply}{-0.5\baoxunit + 0.5ex}%



More information about the tex-live-commits mailing list.