- Function: Canon[CanonPrint, CanonUnPrint] - printing routines for the Canon package
- Description:
- Examples:
- See Also: CanonDefine, Canonical, CanonicalOne

**Function:**
Canon[CanonPrint, CanonUnPrint] - printing routines for the Canon package

**Calling Sequence:**

CanonPrint(tensor);

CanonUnPrint(printed tensor);

**Parameters:**

tensor
- a tensor expression

printed tensor - a tensor expression as printed by CanonPrint

- CanonPrint and CanonUnPrint provide the interface for printing tensor expressions on the screen.
- CanonPrint recognizes covariant and contravariant indices, products, sums and equalities. Notice that it is only a printing routine, so free indices on both sides of equations are not checked. Internally, the product, sum or equality is broken down into single tensors and the internal procedure `print/_TENSOR` prints each of them, formally treating the indexed objects as products of the indices.
- CanonUnPrint receives as input a tensor expression as CanonPrint would output it, or equivalently an expression with the tensors written as _TENSOR calls. It is used to convert from the print friendly tensors to the internal format used for indicial manipulations.

`> `
**with(Canon):**

`> `
**CanonPrint(T[a,-b]);**

`> `
**CanonPrint(T[a,-b]*R[b,-c]);**

The following commands reveal some of the internal structure:

`> `
**lprint(CanonPrint(T[a,-b]));**

_TENSOR(T[a,-b])

`> `
**CanonUnPrint(%);**

`> `
**CanonUnPrint( _TENSOR(T[a,-b])*_TENSOR(R[b,-c]) );**

The user may employ the function _SCALAR for powering of an expression with no free indices. This function has also an associated `print/_SCALAR` procedure.

`> `
**CanonPrint(_SCALAR(V[a]*V[-a])^2);**

`> `
**lprint(%);**

_SCALAR(_TENSOR(V[a])*_TENSOR(V[-a]))^2

**See Also: **
__CanonDefine__
,
__Canonical__
,
__CanonicalOne__