% ---- start of the style file ---- % hvdashln.sty : h(orizontal and )v(ertical )dash(ed )l(i)n(e).sty % % By nakasima@kuis.kyoto-u.ac.jp % % \hdashline is for the horizontal dashed line % \vdashline is for the vertical one % % parameters : % % \hdashlinewidth (w) % \hdashlinegap (g) % % w=4pt % |--- --- --- ---| % g=4pt % \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} \endinput % sample \documentstyle[hvdashln]{article} \title{Usage of {\tt hvdashln.sty}} \author{Nakashima} \date{Nov. 16, 1992} \hdashlinewidth=2pt \hdashlinegap=2pt \begin{document} \maketitle\thispagestyle{empty} Definitions of horizontal and vertical dashed lines for {\tt array} and {\tt tabular} environment. Instead of partial horizontal dashed line by the \verb+\cline{2-3}+ by Isozaki, \verb+\hdashline+ fills the full width. The proportion of the dashed line is defined by the two parameters: \verb+\hdashlinewidth=2pt+ and \verb+\hdashlinegap=2pt+, where the former defines the width of the dash and the latter sets their gap. The default values of these are {\tt 4pt} while {\tt 2pt} is employed in the examples below. \medskip \[ \left[ \begin{array}{c @{\vdashline} cc} A & B & C \\ \hdashline D & E & F \\ G & H & I \end{array} \right] \] \bigskip \begin{minipage}[t]{.48\textwidth} \begin{center} \begin{tabular}{|c|c|c|} \hline a & b & c \\ \hline a & b & c \\ \hline a & b & c \\ \hline \end{tabular} \end{center} \end{minipage} \begin{minipage}[t]{.48\textwidth} \begin{center} \begin{tabular}{|c @{\vdashline} c|c|} \hdashline a & b & c \\ \hdashline a & b & c \\ \hline a & b & c \\ \hdashline \end{tabular} \end{center} \end{minipage} \end{document} % (Mitsuo Hirata) % (hirata@nssun.te.chiba-u.ac.jp) % ---- end of the style file ----