Document templates now support callbacks in order to insert complex
contents.