Does italic math originate from TeX?
No, it was a standard convention. See, e.g., “Uniformly Convex Spaces” by James A. Clarkson that was published in 1936.
I've never noticed any math books with an upright font for variables. I think italics have been very standard for a very long time, at least in American books. Here are three old American books that use italics:
Hutton, A Course of Mathematics, 1807
Davies, Elements of the Differential and Integral Calculus, 1836
Granville, Elements of the Differential and Integral Calculus, 1904
Also:
- L'Hospital, Analyse des infiniment petits, pour l'intelligence des lignes courbes, 1716