find the finest toc ticks by sorting out the largest one

This should fix #1202.