  We present {\it ab initio} calculations of the magnetic susceptibility and of
the $^{13}$C chemical shift for carbon nanotubes, both isolated and in bundles.
These calculations are performed using the recently proposed gauge-including
projector augmented-wave approach for the calculation of magnetic response in
periodic insulating systems. We have focused on the semiconducting zigzag
nanotubes with diameters ranging from 0.6 to 1.6 nm. Both the susceptibility
and the isotropic shift exhibit a dependence with the diameter (D) and the
chirality of the tube (although this dependence is stronger for the
susceptibility). The isotropic shift behaves asymptotically as $\alpha/D +
116.0$, where $\alpha$ is a different constant for each family of nanotubes.
For a tube diameter of around 1.2 nm, a value normally found in experimental
samples, our results are in excellent agreement with experiments. Moreover, we
calculated the chemical shift of a double-wall tube. We found a diamagnetic
shift of the isotropic lines corresponding to the atoms of the inner tube due
to the effect of the outer tube. This shift is in good agreement with recent
experiments, and can be easily explained by demagnetizing currents circulating
the outer tube.
