For example,

```
{a,b}::Indices(vector).
\delta{#}::Accent.
ex:=\delta{A^{a b}+B^{a b}}
```

Result is not right.

0 votes

Hi Eureka.

Firstly, let me point that a semi-colon is missing at the en d of the third line. So, the correct *code* should be

```
{a,b}::Indices(vector).
\delta{#}::Accent.
ex := \delta{A^{a b}+B^{a b}};
```

Then, let me clarify that (to my understanding) accents are a way to differentiate symbols, i.e. it has no further properties. Why is this important? Perhaps your expression should be written as

`ex := \delta{A}^{a b} + \delta{B}^{a b};`

If you are expect your *accent* to have linearity property, give assign the property of `Derivative`

, i.e.

`\delta{#}::Derivative.`

If you use the `Derivative`

property instead of the `Accent`

, you could apply the `distribute`

algorithm in your original expression

```
{a,b}::Indices(vector).
\delta{#}::Derivative.
ex:=\delta{A^{a b}+B^{a b}};
distribute(ex);
```

Cheers, Dox.

Just a small comment to that: if you just want your accent to have that linear property so it behaves as in the above example using `distribute`

, then it is better to use the `Distributable`

property. So

```
{a,b}::Indices(vector).
\delta{#}::Distributable.
ex:=\delta{A^{a b}+B^{a b}};
distribute(ex);
```

The `Derivative`

property leads to other behaviour of the accented symbols which you may or may not want, while `Distributable`

just means that the accent is handled as above in `distribute`

.

Thanks @kasper & @doxrum, this is what I want. I also didn't know the `Distributable`

property, maybe a complete manual for `Cadabra2`

is necessary.

Writing good documentation is the hardest part of writing software.... I didn't even realise that `Distributable`

lacked a manual page. Will add.