Ximing 西銘 "The western inscription” is a text written by the philosopher Zhang Zai 張載 (1020-1077). The original name of the text was Dingwan 訂頑 "Settling the recalcitrant", but because it had been written in the western wing of Zhang's mansion, Cheng Yi 程頤 (1033-1107) changed the title of the book posthumously. The text was written after the commentary Hengqu Yishuo 橫渠易說 and before the book Zhengmeng 正蒙, and was usually included in the latter, as the beginning of the chapter Qiancheng 乾稱 "The hexagram (see Yijing 易經) Qian can be called". Another text of Zhang Zai is called Dongming 東銘 ""Eastern inscription" or Bianyu 砭愚 "Treating the ignorant". Both are dubbed Erming 二銘, the "two inscriptions".
The Ximing explains Zhang's theory of the universality of the characteristics of all objects and beings as based on the same matter or substance of which they are made. This substance was by nature endowed with a natural inclination to goodness. Humans therefore had all the potential to detect this original goodness in themselves, in Zhang's words "the human heart encloses the world" (xin huai tianxia 心懷天下), and "it preserves the Heavenly Way" (xin cun tiandao 心存天道).
This goodness was expressed by basic Confucian virtues like kindness, righteousness, and filialty, but also by general sympathy towards other people (jian'ai 兼愛), not just towards relatives or superiors. In other words, "all men are brothers" because they were tied to each other by their common nature. Sympathy towards all men was part of the "Heavenly Way" (tiandao 天道). Zhang even went so far to claim that all objects characterized by the power of the hexagram Qian 乾 (Yang) were one's father, and those determined by Kun 坤 (Yin) one's mother. All people were brethren (min wu tong bao 民吾同胞), and all objects and human individuals were colleagues or friends (wu wu yu ye 物吾與也). Care fore other was particularly important towards the ailing and the weak.
Zhu Xi separated the Ximing text from the Qiancheng chapter and popularized its stand-alone quality. He also commented on the text, and made it one of the core texts of early Neo-Confucianism. The early Qing-period philosopher Wang Fuzhi 王夫之 (1619-1692), who wrote the commentary Zhangzi Zhengmeng zhu 張子正蒙注, reintegrated the Ximing into the Zhengmeng. Modern editions of Zhang Zai's writings like Zhang Zai ji 張載集 follow this custom.