The idea of compiling a collection of Chinese official histories have existed as the Three Kingdoms era, when the
Three Histories consisted of
Shiji,
Book of Han, and
Dongguan Hanji.
Book of the Later Han would later gradually replace the
Dongguan Hanji. After the
Records of the Three Kingdoms appeared, it was soon tacked on to produce the
Early Four Historiographies (). By the
Tang dynasty, the ten official histories starting from
Records of the Three Kingdoms and ending with
Book of Sui were collectively called the
Ten Histories. Combined with the earlier three, they make the
Thirteen Histories. Two Tang scholars have written works based on the
Thirteen Histories:
Criticism of the Thirteen Histories by (20 volumes) and
Index of the Thirteen Histories by Song Jian (10 volumes). During the
Song dynasty, on top of on the
Thirteen Histories,
History of the Southern Dynasties,
History of the Northern Dynasties,
New Book of Tang, and
New History of the Five Dynasties were added to form the
Seventeen Histories. Northern Song's wrote ''Master Wang's Enlightenment on the Seventeen Histories'', and Southern Song's
Lü Zuqian wrote
Detailed Excerpts of the Seventeen Histories. The
Twenty-One Histories was formed during the
Ming dynasty. Qing dynasty's
Gu Yanwu wrote in
Daily Knowledge Records: Official Edition of Twenty-One Histories (): "In Song times there were only seventeen histories, now with the addition of the histories of Song, Liao, Jin, and Yuan, there are twenty-one histories." During the
Yongzheng period of the
Qing dynasty, after the completion of the
History of Ming, they were collectively known as the
Twenty-Two Histories, and Zhao Yi's
Notes on the Twenty-Two Histories was named accordingly. Later, with the addition of the
Old Book of Tang, it became the
Twenty-Three Histories. When compiling the
Complete Library in Four Sections, the
Old History of the Five Dynasties, which was extracted from the
Yongle Encyclopedia, was also included, making it the
Twenty-Four Histories. == Collection ==