During the Tang dynasty, the imperial capital of Chang'an (present-day Xi'an) was unrivaled in its monumental scale, with about one million inhabitants dwelling within its walls. It was there that one of the most enduring cultural and political institutions of the empire--the civil service examinations--took shape, bringing an unprecedented influx of literati men to the city seeking recognition and official status by demonstrating their literary...