summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hhtensor/hhtensor.sty
blob: 196d6f06962cb92ea81836bb82002f2d230b2faa (plain)
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
%%
%% This is file `hhtensor.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hhtensor.dtx  (with options: `package')
%% 
%%   hhtensor package
%% 
%%   Copyright 2003-2011 Harald Harders
%% 
%%   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.
%% 
%%   harald.harders@gmx.de
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hhtensor}
  [2011/12/29  v0.61  Print vectors and tensors]
\RequirePackage{ushort}
\RequirePackage{amsmath}
\newif\iftensor@bold
\newif\iftensor@uline
\DeclareOption{bold}{\tensor@boldtrue\tensor@ulinefalse}
\DeclareOption{uline}{\tensor@boldfalse\tensor@ulinetrue}
\DeclareOption{arrow}{\tensor@boldfalse\tensor@ulinefalse}
\ExecuteOptions{arrow}
\ProcessOptions\relax
\newcommand\origvec{}
\let\origvec=\vec
\iftensor@bold
  \DeclareRobustCommand*\vec[1]{\ensuremath{\boldsymbol{#1}}}
  \DeclareRobustCommand*\matr[1]{\ensuremath{\boldsymbol{#1}}}
  \DeclareRobustCommand*\tens[2]{\ensuremath{\boldsymbol{#1}}}
\else
  \iftensor@uline
    \DeclareRobustCommand*\vec[1]{\ushort{#1}}
    \DeclareRobustCommand*\matr[1]{\ushortd{#1}}
    \DeclareRobustCommand*\tens[2]{%
      \begingroup
        \setlength{\arraycolsep}{0pt}
        \begin{array}[t]{c}%
          #1 \\[-2.05ex]
          {\scriptstyle \sim} \\[-2.1ex]
          {\scriptscriptstyle #2}\\[-0.7ex]
        \end{array}%
      \endgroup
    }
  \else
    \DeclareRobustCommand*\matr[1]{\ensuremath{\vec{\vec{#1}}}}
    \DeclareRobustCommand*\tens[2]{%
      \begingroup
        \setlength{\arraycolsep}{0pt}
        \begin{array}[t]{c}%
          #1 \\[-2.05ex]
          {\scriptstyle \sim} \\[-2.1ex]
          {\scriptscriptstyle #2}\\[-0.7ex]
        \end{array}%
      \endgroup
    }
  \fi
\fi
\DeclareRobustCommand*\dcdot{\mathrel{\cdot\mkern 0.0mu \cdot}}%
\DeclareRobustCommand*\trans{^{\mathrm{T}}}

\endinput
%%
%% End of file `hhtensor.sty'.