doc: use .. only:: html tag for gif fixes pdf generation