1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|