% hvdashln.sty : h(orizontal and )v(ertical )dash(ed )l(i)n(e).sty
% Copyright (C) 1993, 1999  Hiroshi Nakashima
%			    (Kyoto Univ. / Toyohashi Univ. of Tech.)
%			    (nakasima@tutics.tut.ac.jp)
%
% This program can be redistributed and/or modified under the terms of the
% LaTeX Project Public License Distributed from CTAN archives in directory
% macros/latex/base/lppl.txt; either version 1 of the License, or any later
% version.
%
% \hdashline is a dashed counterpart of \hline and
% \vdashline is a dashed counterpart of \vline of LaTeX's "array" environment.
%
% The following parameters are available to control the shape of dashed lines.
%
% \hdashlinewidth : length of each dash segment
% \hdashlinegap   : amout of each gap between dash segments
%
% Both parameters have a common default value, 4 pt, and thus the shape of a 
% horizontal dashed line will be the following.
%
%	 4pt
%	|---   ---   ---   ---|
%	    4pt
%
% NOTE:
% \vdashline will be broken if an array contains tall rows.  This problem 
% is fixed in the advanced style named "arydshln" written by the author,
% which also has new features such as allowing `:' to specify vertical
% dashed line in preamble and \cdashline being a counterpart of \cline.
%
\newcount\hdl@columns \let\hdl@mkpream\@mkpream
\def\@mkpream{\hdl@columns\@ne \hdl@mkpream}
\def\@addamp{\if@firstamp\@firstampfalse \else\edef\@preamble{\@preamble
&}\advance\hdl@columns\@ne\fi}
\def\hdashline{\multispan{\hdl@columns}\unskip
\vrule\@height\arrayrulewidth\@width\hdashlinewidth \hskip.5\hdashlinegap
\xleaders\hbox{\hskip.5\hdashlinegap
\vrule\@height\arrayrulewidth\@width\hdashlinewidth
\hskip.5\hdashlinegap}\hfill \hskip.5\hdashlinegap
\vrule\@height\arrayrulewidth\@width\hdashlinewidth\cr
\noalign{\vskip-\arrayrulewidth}} \newdimen\hdashlinewidth
\hdashlinewidth4pt % \newdimen\hdashlinegap \hdashlinegap4pt %
\def\vdashline{\hskip\arraycolsep \@tempdima\ht\@arstrutbox
\advance\@tempdima\dp\@arstrutbox \lower\dp\@arstrutbox\vbox to\@tempdima{
\hrule\@height.5\hdashlinewidth\@width\arrayrulewidth \vskip.5\hdashlinegap
\xleaders\vbox{\vskip.5\hdashlinegap
\hrule\@height\hdashlinewidth\@width\arrayrulewidth
\vskip.5\hdashlinegap}\vfil \vskip.5\hdashlinegap
\hrule\@height.5\hdashlinewidth\@width\arrayrulewidth}% \hskip\arraycolsep}