diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:54:29 +0000 |
commit | ad73d498164957eb83add5ac6424b396686afdf3 (patch) | |
tree | 06773f1978cdc56fa8e801cf565c8cc20e62f205 /Master/texmf-dist/tex/latex/easy/easybmat.sty | |
parent | 9b0a12d65600c00972d9f4953249e8f4b6d31f68 (diff) |
easy
git-svn-id: svn://tug.org/texlive/trunk@842 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/easy/easybmat.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/easy/easybmat.sty | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/easy/easybmat.sty b/Master/texmf-dist/tex/latex/easy/easybmat.sty new file mode 100644 index 00000000000..3dc665be6ab --- /dev/null +++ b/Master/texmf-dist/tex/latex/easy/easybmat.sty @@ -0,0 +1,152 @@ +%%% ==================================================================== +%%% @LaTeX-style-file{ +%%% author = "Enrico Bertolazzi", +%%% version = "1.0", +%%% date = "13-JUN-2001", +%%% filename = "easybmat.sty", +%%% address = "Laboratorio di Matematica Applicata +%%% e Meccanica Strutturale, +%%% Trento University, +%%% Via Mesiano, Trento, Italy", +%%% FAX = "+39 (461) 882599", +%%% email = "enrico.bertolazzi@ing.unitn.it (Internet)", +%%% supported = "yes. Please send comments via E-mail", +%%% docstring = "package for easy typing block matrices." +%%% +%%% INSTALLATION: +%%% Put this file where your TeX looks for inputs. +%%% +%%% DOCUMENTATION: +%%% Compile docbmat.tex. +%%% +%%% Copyright 1999 Enrico Bertolazzi +%%% +%%% 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. +%%% +%%% } +%%% ====================================================================%%% +%%% ___ ____ ___ _ _ ___ ____ ___ _ _ %%% +%%% / \ / / \ \ / / \ / / \ \ / %%% +%%% /____/ /__ /____/ \/ /____/ /__ /____/ \/ %%% +%%% / \ / / \ / / \ / / \ / %%% +%%% /____/ /____ / \ / /____/ /____ / \ / %%% +%%% ====================================================================%%% +%%% v 1.0 13-JUN-2001 changed \@roman with \romannumeral (thanks to Claudio Beccari) +\def\filedate{2001/06/13} +\def\fileversion{v1.0} +\typeout{Document Style `easybmat' \fileversion\space<\filedate>.} +%% BEGIN easybmat.sty +%% + +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{easy} +\ProvidesPackage{easybmat}[\filedate\space\fileversion] + +\DeclareOption{thinlines}{% + \@bmat@size@rule=.7pt\relax + \@bmat@size@dash=.5pt\relax +} + +\DeclareOption{thiklines}{% + \@bmat@size@rule=1.5pt\relax + \@bmat@size@dash=1.2pt\relax +} + +\DeclareOption{thicklines}{% + \@bmat@size@rule=1.5pt\relax + \@bmat@size@dash=1.2pt\relax +} + +\newdimen\@bmat@size@rule\@bmat@size@rule=1pt\relax +\newdimen\@bmat@size@dash\@bmat@size@dash=.7pt\relax + +\ProcessOptions + +\@easy@disable@space + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\@bmat@addcol{\g@addto@macro\@bmat@preamble{$\displaystyle{##}$&}} +\def\@bmat@make@preamble{% + \@easy@let(@easy@align){@easy@col@align\romannumeral\@easy@level}% + \@easy@let(@easy@rules){@easy@col@rules\romannumeral\@easy@level}% + \gdef\@bmat@preamble{% + \vbox\bgroup\lineskip\z@skip% + \tabskip\z@skip% + \baselineskip\z@skip% + \everycr{}\halign\bgroup}% + \@easy@rotate\@easy@align% + \loop% + \@easy@rotate\@easy@align% + \edef\@tempa{\@easy@firstchar\@easy@align}% + \expandafter\ifx\@tempa`\relax\else% + \@bmat@addcol% + \repeat% + \g@addto@macro\@bmat@preamble{$\displaystyle{##}$\crcr} +} + + +\def\BMAT{\advance\@easy@level\@ne\@easy@ifnextchar({\@BMAT}{\@BMAT(@)}} +\def\@BMAT(#1){ + \def\@bmat@split##1,##2,##3,##4\end{ + \@easy@xdef(@bmat@balance\romannumeral\@easy@level){##1}% + \global\@nameuse{@easy@minx\romannumeral\@easy@level}=##2 + \global\@nameuse{@easy@miny\romannumeral\@easy@level}=##3 + } + \expandafter\@bmat@split#1,\z@,\z@, \end + \@@BMAT} + +\def\@@BMAT{\@easy@ifnextchar[{\@@@BMAT}{\@@@BMAT[2pt]}} + +\def\@@@BMAT[#1]#2#3{ + \def\@bmat@split##1,##2,##3,##4\end{ + \@easy@xdef(@bmat@spread\romannumeral\@easy@level){##1}% + \global\@nameuse{@easy@maxx\romannumeral\@easy@level}=##2 + \global\@nameuse{@easy@maxy\romannumeral\@easy@level}=##3 + } + \expandafter\@bmat@split#1,\z@,\z@, \end + \@easy@parse@cols{#2} + \@easy@parse@rows{#3}% + \@bmat@make@preamble% + \def\\{\crcr}% + \global\let\@easy@path\@empty% + \setbox\@nameuse{@easy@box\romannumeral\@easy@level}\@bmat@preamble% +} +\def\endBMAT{% + \crcr\egroup\egroup% + \@easy@glet(@easy@mainbox) {@easy@box\romannumeral\@easy@level}% + \@easy@glet(@easy@col@align) {@easy@col@align\romannumeral\@easy@level}% + \@easy@glet(@easy@col@rules) {@easy@col@rules\romannumeral\@easy@level}% + \@easy@glet(@easy@row@align) {@easy@row@align\romannumeral\@easy@level}% + \@easy@glet(@easy@row@rules) {@easy@row@rules\romannumeral\@easy@level}% + \@easy@glet(@easy@minx) {@easy@minx\romannumeral\@easy@level}% + \@easy@glet(@easy@miny) {@easy@miny\romannumeral\@easy@level}% + \@easy@glet(@easy@maxx) {@easy@maxx\romannumeral\@easy@level}% + \@easy@glet(@easy@maxy) {@easy@maxy\romannumeral\@easy@level}% + % + \@easy@glet(@easy@balance) {@bmat@balance\romannumeral\@easy@level}% + \@easy@glet(@easy@spread) {@bmat@spread\romannumeral\@easy@level}% + % + \global\let\@easy@size@dash\@bmat@size@dash + \global\let\@easy@size@rule\@bmat@size@rule + % + \@easy@evaldim% +% \typeout{Easybmat [row:\the\@easy@nrow,col:\the\@easy@ncol]} + \@easy@balance@row@col% + \@easy@buildbox% + \@easy@vlines% + \@easy@hlines% + \vcenter{\hbox{\rlap{\box\@ne} + \rlap{\box\tw@} + \ifx\@easy@path\@empty\else\@easy@dopath\rlap{\box\thr@@}\fi + \box\@easy@mainbox}}% + \advance\@easy@level\m@ne% +} + +\@easy@enable@space + +\endinput +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |