add title attribute for long document names, and fix smart doc display