Format documents