text formatting according to defined formats