The book Nanhanshu 南漢書 is a kind of semi-official history of the Southern Han dynasty 南漢 (917-971) that ruled over one of the Ten States 十國 (902-979) in China's south during the 10th century. Because the Ten States were never officially accepted as imperial dynasties the "Book of the Southern Han dynasty" is therefore not included among the official dynastic histories.
The author, Liang Tingnan 梁廷楠 (1796-1861), nevertheless modeled them after the official histories that are written in a biographical-thematical style (jizhuanti 紀傳體), but without providing treatises (zhi 志). The book includes 6 imperial biographies (benji 本紀) and 12 normal and collective biographies (liezhuan 列傳). For a large part of the biographies Liang wrote a personal critique.
Liang himself hailed from Guangdong and wrote a lot of books about the history of southern China, like Nanyue wuzhu zhuan 南越五主傳 "The biographies of the five rulers of Yue in the south", Yue haiguan zhi 粵海關志 "The maritime customs of Canton", or Haifang huilan 海防匯覽 "An overview of maritime defence".
There were some precursors of Liang's history of 10th-century Guangdong, like the lost book Liushi xingwang lu 劉氏興亡錄 "Rise and fall of the Liu family (the ruling dynasty)" by the Song-period 宋 (960-1269) scholar Hu Binwang 胡賓王, or Liu Yinglin's 劉應麟 Nan-Han chunqiu 南漢春秋 "Spring and Autumn of the Southern Han dynasty" from 1827. The latter relied on Wu Renchen's 吳任臣 (1628-1689) Shiguo chunqiu 十國春秋, but abbreviated the information from this book so rigidly that in some points facts even were distorted. Liang therefore decided to rewrite the history of the Southern Han dynasty and chose the style of writing like Ma Ling 馬令 and Lu You 陸游 (1125-1210) had done in their books with the same title of Nantangshu 南唐書 "The book of the Southern Tang dynasty" (937-975).
Liang completed his book in 1829. The Nanhanshu is noteworthy because Liang made use not only of a vast array of widespread and known histories, like the Jiu Wudaishi 舊五代史, Xin Wudaishi 新五代史 and the Zizhi tongjian 資治通鑑 or less known books like the Jiuguozhi 九國志 or the anonymous Song-period book Wuguo gushi 五國故事, but also used sources from the local gazetteers.
For the publication in the "Southern Han series" (Nanhan congshu 南漢叢書), Liang Tingnan added a series of supplements: a textual critique (Kaoyi 考異 in 18 juan, Wenzilüe 文字略 in 4 juan) and 2-juan long essay called Nanhan conglu 南漢叢錄. The book is part of the Tenghuating Pavillon 藤花亭 collection.