Fix: use "doc" instead "pdf" dir and uniformize code