Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 345
1
%%
2
%% This is file `vector.sty',
3
%% generated with the docstrip utility.
4
%%
5
%% The original source files were:
6
%%
7
%% vector.dtx (with options: `package')
8
%%
9
%% Copyright (C) 1994 by Nick Efford
10
%%
11
%% This file is distributed in the hope that it will be useful,
12
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
13
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
%%
15
\NeedsTeXFormat{LaTeX2e}
16
\ProvidesPackage{vector}[1994/09/16 v1.0 vector macros for LaTeX2e (nde)]
17
\RequirePackage{ifthen}
18
\RequirePackage{calc}
19
\newboolean{@wavy}
20
\DeclareOption{wavy}{\setboolean{@wavy}{true}}
21
\ProcessOptions
22
\newcommand{\bvec}[1]{\ensuremath{\mathbf{#1}}}
23
\newcommand{\buvec}[1]{\ensuremath{\mathbf{\hat{#1}}}}
24
\newcommand{\svec}[1]{\ensuremath{\mathsf{#1}}}
25
\newcommand{\suvec}[1]{\ensuremath{\mathsf{\hat{#1}}}}
26
\ifthenelse{\boolean{@wavy}}{%
27
\PackageInfo{vector}{wavy underlining selected}
28
\newcommand{\undertilde}[1]{\mathord{\vtop{\ialign{##\crcr
29
$\hfil\displaystyle{#1}\hfil$\crcr\noalign{\kern1.5pt\nointerlineskip}
30
$\hfil\tilde{}\hfil$\crcr\noalign{\kern1.5pt}}}}}
31
\newcommand{\uvec}[1]{\ensuremath{\undertilde{#1}}}
32
\newcommand{\uuvec}[1]{\ensuremath{\hat{\undertilde{#1}}}}}{%
33
\newcommand{\uvec}[1]{\ensuremath{\underline{#1}}}
34
\newcommand{\uuvec}[1]{\ensuremath{\hat{\underline{#1}}}}}
35
\def\first@element{1}
36
\newcommand{\firstelement}[1]{\def\first@element{#1}}
37
\newcommand{\irvec}[2][n]{\ensuremath{{#2}_{\first@element},\ldots,{#2}_{#1}}}
38
\newcommand{\icvec}[2][n]{%
39
\begin{array}{c}
40
{#2}_{\first@element}\\ \vdots\\ {#2}_{#1}
41
\end{array}}
42
\newcounter{vec@elem}
43
\newcommand{\rvec}[3]{%
44
\ensuremath{%
45
\ifthenelse{#3 > #2}{%
46
\setcounter{vec@elem}{#2}
47
\whiledo{\value{vec@elem} < #3}%
48
{{#1}_{\thevec@elem}, \stepcounter{vec@elem}}%
49
{#1}_{#3}}{{#1}_{#2}}}}
50
\newcommand{\cvec}[3]{%
51
\ifthenelse{#3 > #2}{%
52
\setcounter{vec@elem}{#2}
53
\begin{array}{c}
54
\whiledo{\value{vec@elem} < #3}%
55
{{#1}_{\thevec@elem} \\ \stepcounter{vec@elem}}%
56
{#1}_{#3}
57
\end{array}}{{#1}_{#2}}}
58
\endinput
59
%%
60
%% End of file `vector.sty'.
61