| 1 |
# Named tensor notation in LaTeX |
| 2 |
|
| 3 |
This style file provides macros for named tensor notation. Please see |
| 4 |
the paper [Named Tensor Notation](https://arxiv.org/abs/2102.13196) |
| 5 |
for background on this notation. |
| 6 |
|
| 7 |
To use the style file, put |
| 8 |
|
| 9 |
\usepackage{namedtensor} |
| 10 |
|
| 11 |
into the preamble of your LaTeX source file (after |
| 12 |
`\documentclass{article}` but before `\begin{document}`). |
| 13 |
|
| 14 |
We write axis names in sans-serif font. To make this easier, |
| 15 |
`\name{axis}` prints the axis name "axis", and `\ndef{\ax}{axis}` |
| 16 |
defines a macro `\ax` that prints the axis name "axis". |
| 17 |
|
| 18 |
Binary operators |
| 19 |
|
| 20 |
- Use `A \ndot{\ax} B` for contractions. You can use `\\` to stack up |
| 21 |
several names. |
| 22 |
|
| 23 |
- You can use `\nbin` to make new binary operators. For example, `A |
| 24 |
\nbin{\ax}{\star} B` gives you a star operator with "axis" written |
| 25 |
under it. |
| 26 |
|
| 27 |
Functions |
| 28 |
|
| 29 |
- Use `\nsum{\ax} A` for summation over a named axis. |
| 30 |
|
| 31 |
- You can use `\nfun` to make new functions. For example, |
| 32 |
`\nfun{\ax}{qux} A` defines a function "qux" with "axis" written |
| 33 |
under it. |
| 34 |
|
| 35 |
## Credits |
| 36 |
|
| 37 |
- David Chiang, University of Notre Dame, [email protected] |
| 38 |
- Alexander M. Rush, Cornell University, [email protected] |
| 39 |
- Boaz Barak, Harvard University, [email protected] |
| 40 |
|
| 41 |
## License |
| 42 |
|
| 43 |
This software is licensed under the MIT License. Please see LICENSE.md |
| 44 |
for copyright notice. |