force document functions to wrap in gallery view