Add indent as document attribute

Resolves #1169