Debian Codegraph @

texmf-dist/doc/latex/tensind/tensind.tex

raw
1 %
2 % Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
3 %
4 % This file may be distributed and/or modified under the conditions of
5 % the MIT License. A version can be found at the end of this file.
6 %
7
8 \def\fileversion{1.1}
9 \def\docdate{August 7, 2000}
10
11 \documentclass{ltxguide}
12 \usepackage{tensind}
13
14 \title{The \textsf{tensind} Package for
15 Tensorial Indexes\footnote{This
16 package is currently at version 1.1.}}
17
18 \author{Javier Bezos\footnote{For bug reports, comments and
19 suggestions go to
20 \texttt{http://www.tex-tipografia.com}.
21 English is not my strong point, so contact me when you
22 find mistakes in the manual. Other packages by the same author:
23 \textsf{accents, titlesec, dotlessi}.}}
24
25 \date{\docdate}
26
27 \newenvironment{sample}{\begin{quote}\small\begin{tabbing}%
28 \hskip12pc\=\hskip6pc\\}
29 {\end{tabbing}\end{quote}}
30
31 \tensordelimiter{?}
32 \tensorformat{lrb}
33
34 \raggedright
35
36 \begin{document}
37
38 \maketitle
39
40 This package provides typographically fine tensorial notation, with the
41 following features:
42 \begin{itemize}
43 \item Dots filling gaps.
44 \item Symbol subtitution to easy typing (if you are using greek letters, for
45 example).
46 \item Corrected position of indexes: horizontally, to compensate the small
47 displacement in letters
48 like $f$ (look carefully at $f_*^*$) and vertically, to avoid superscripts
49 too raised.
50 \item Aditional minute corrections are also allowed.
51 \end{itemize}
52
53 \section{User Interface}
54
55 \begin{decl}
56 |\tensordelimiter{<tensor-delim>}|
57 \end{decl}
58
59 Defines |<tensor-delim>| to be a tensor delimiter. In subsequent examples we will
60 assume
61 \begin{verbatim}
62 \tensordelimiter{?}
63 \end{verbatim}
64 and every instance of |?| will actually mean |<tensor-delim>|.
65
66 \begin{decl}
67 |?[<format>]{<nucleous>}{<special-index>}{<special-index>}...|\\
68 | <super-or-sub><super-or-sub>...?|
69 \end{decl}
70
71 Creates a tensor. |<super-or-sub>| is either |_{<index>}{<index>}...| or
72 |^{<index>}{<index>}|.
73 |<nucleous>| is the symbol which indexes will be add to. |<special-index>| is a
74 superscript which is neither covariant nor contravariant (dual,
75 prime...). In
76 one-letter |<index>|, |<special-index>| or |<nucleous>|, curly braces can be
77 omitted.
78 For example:
79 \begin{sample}
80 |?R_ij^kl_\alpha^\beta?| \> $?R_ij^kl_\alpha^\beta?$\\[2pt]
81 |?R^ij_kl^\alpha_\beta?| \> $?R^ij_kl^\alpha_\beta?$\\[2pt]
82 |?R**_ij^kl_\alpha^\beta?| \> $?R**_ij^kl_\alpha^\beta?$\\[2pt]
83 |?R**^ij_kl^\alpha_\beta?| \> $?R**^ij_kl^\alpha_\beta?$
84 \end{sample}
85
86 (\emph{Don't forget the closing |?|!})
87 Finally, |<format>| changes the format in a tensor. (See |\tensorformat|
88 below.)
89
90 \begin{decl}
91 |\tensorformat{<format>}|
92 \end{decl}
93
94 The following letter may be used in format.
95 \begin{itemize}
96 \item[\texttt{l}] Gaps to the left of the last index are filled with dots.
97 \item[\texttt{r}] Gaps to the right of the first index are filled.
98 \item[\texttt{e}] If there is no index (empty), gaps are filled.
99 \item[\texttt{b}] Only gaps in subscripts are filled.
100 \end{itemize}
101
102 Sensible settings are: none (no dots), |l| and |lrb|.
103 Further options are:
104 \begin{itemize}
105 \item[\texttt{c}] Brings index lines closer.
106 \item[\texttt{o}] Opens index lines.
107 \item[\texttt{s}] Styled. |o| in display style and |c| otherwise.
108 \end{itemize}
109 These options are mutually exclusive. If none of them is
110 used, then indexes behave in a similar way to standard ones.
111 This document sets
112 \begin{verbatim}
113 \tensorformat{lrb}
114 \end{verbatim}
115
116 \begin{sample}
117 |?[]f\prime_ij^kl?| \> $?[]f\prime_ij^kl?$\\[2pt]
118 |?[e]f^ij?| \> $?[e]f^ij?$ \\[2pt]
119 |?[l]f*_ij^kl?| \> $?[l]f*_ij^kl?$\\[2pt]
120 |?[c]R^ij_kl?| \> $?[c]R^ij_kl?$
121 \end{sample}
122
123 \begin{decl}
124 |\indexdot|
125 \end{decl}
126
127 This macro is the index dot. Defined to |\cdot|. You can
128 redefine it with |\renewcommand|.
129
130 \begin{decl}
131 |\whenindex{<index>}{<new-index>}{<commands>}|
132 \end{decl}
133
134 Automatically replaces |<index>| (if not enclosed in braces)
135 by |<new-index>| and the additional |<commands>| are
136 executed. For example, if you like to use greek indexes:
137 \begin{verbatim}
138 \whenindex{a}{\alpha}{}
139 \whenindex{b}{\beta}{}
140 \whenindex{g}{\gamma}{}
141 \end{verbatim}
142
143 \whenindex{a}{\alpha}{}
144 \whenindex{b}{\beta}{}
145 \whenindex{g}{\gamma}{
146 }
147 A |\whenindex{'}{\prime}{}| is performed by the package. For instance
148 \begin{sample}
149 |?R'_ijk^abg?| \> $?R'_ijk^abg?$
150 \end{sample}
151
152 In |<commands>|, two command for space fine-tuning are provided:
153 |\sbadjust{<index>}{<comma-space>}| adds |<comma-space>| times
154 |\,| before the current subscript index if the last superscript index
155 was |<index>|. Similarly, |\spadjust| adds the space before the current
156 superscript index if the last subscript index was |<index>|.
157 For instance, the normal result of |?[]R^ik_lm?| is $?[]R^ij_kl?$, but
158 with
159 \begin{verbatim}
160 \whenindex{k}{k}{\sbadjust{j}{-1}}
161 \end{verbatim}
162 \whenindex{k}{k}{\sbadjust{j}{-1}}
163 is $?[]R^ij_kl?$.
164 These commands will be ignored if dots are used.
165
166 Two further command allowed in |\whenindex|
167 are: |\omitdot| omits the dot for the current
168 index, and |\finishdots| omits as well all subsequent indexes.
169 For example
170 \begin{verbatim}
171 \whenindex{;}{\,;\,}{\finishdots}
172 \end{verbatim}
173 \whenindex{;}{\,;\,}{\finishdots}
174
175 \begin{sample}
176 |?[lr]A*_i^kl;i?| \> $?[lr]A*_i^kl;i?$
177 \end{sample}
178
179 \begin{decl}
180 |tensor|
181 \end{decl}
182
183 The environment called by |?...?|. Useful if for some reason you
184 don't want an equivalent defined with |\tensordelimiter| . Example:
185 \begin{verbatim}
186 \begin{tensor}[lr]A*_i^kl;i\end{tensor}
187 \end{verbatim}
188
189 \end{document}
190
191 MIT License
192 -----------
193
194 Permission is hereby granted, free of charge, to any person obtaining a
195 copy of this software and associated documentation files (the
196 "Software"), to deal in the Software without restriction, including
197 without limitation the rights to use, copy, modify, merge, publish,
198 distribute, sublicense, and/or sell copies of the Software, and to
199 permit persons to whom the Software is furnished to do so, subject to
200 the following conditions:
201
202 The above copyright notice and this permission notice shall be included
203 in all copies or substantial portions of the Software.
204
205 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
206 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
207 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
208 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
209 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
210 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
211 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.