add hatom formatting to templates