Beginning in the second half of the nineteenth century, as the intensified Western aggressions expedited the Qing Empire’s decline, Chinese sociocultural elites started to question the value and relevance of their traditional knowledge system. Believing knowledge to be the secret behind the rise of the Western powers, these elites avidly consumed so-called New Learning (xinxue), that is, general, mostly Western knowledge that was new and foreign for China.1 Importing, translating, and reading books containing Western knowledge were deemed urgent tasks, crucial to the survival of China. As the renowned reformer Liang Qichao (1873–1929) put it, “if a nation wants to strengthen itself, it should translate more Western books; if a student wants to stand on his own feet, he should read more Western books.”2
The earliest extant Chinese mathematical writings include two types of components of particular interest for our discussion on manuals and handbooks. On the one hand, there are mathematical problems that often evoke tasks carried out by officials working in the imperial bureaucracy. On the other hand, there are mathematical “procedures,” or “algorithms” in today’s parlance, to solve such problems. This description fits most of the mathematical books composed in China until the seventh century.
In premodern China, the population was roughly divided according to professions into four groups: literati, farmers, artisans, and merchants. During this period, artisanal knowledge was mainly transmitted in person. Most Chinese artisans were not as literate as their European counterparts, if literate at all, and written texts played a minor role in the transmission of their specialized knowledge. The master of a workshop taught the apprentices how to perform bodily actions by working alongside them and only transmitted written knowledge with brief and codified texts. Sometimes craft recipes were not even written down; they were memorized by masters and transferred verbally to designated successors in the craft. 
In the summer of 1809, the imperial kinsman Jincang (?–1828) was appointed the general of Ili (Yili jiangjun) to supervise the entire Xinjiang. Jinchang had mixed feelings about the promotion. Only distantly related to the ruling house, it was a great honor to assume such an important position, but he felt overwhelmed by the onerous duties it entailed. As head of the military government on the Qing empire’s Inner Asian frontier, the general of Ili was not only responsible for troop deployment and provisions but also had to address day-to-day administrative affairs such as the collection of taxes, budget-making, and land reclamation. Jincang’s anxiety about the new post was not alleviated until he received the Comprehensive Survey of Affairs in Ili (Yili zongtong shilue) from the current general Sungyūn (1754–1835) on his way to Ili. Finishing the twelve-volume text in his carriage, Jincang felt that he had become better informed about “mountains and rivers, cities, local customs, non-Han tribes, stationed troops, and agriculture reclamation,” and he had learned the strategies of “pacifying non-Han peoples and stabilizing the borderland.”