noun
Chinese classical writing; Chinese classics
Refers to classical Chinese texts and the literary language used in them, as studied in Japan. Often contrasted with 和文 (Japanese-style writing).
高校で漢文を習った。
I studied Chinese classics in high school.
彼は漢文の素養がある。
He has a grounding in classical Chinese.
noun
writing composed entirely of kanji
Describes a text written only with Chinese characters, without kana. This usage is less common than the classical-literature sense.
この文章は漢文で書かれている。
This text is written entirely in kanji.