make link/style paths relative to main document