Document extraction of octave and R magics