Good evening Mick, I've been mulling over the way to solve exactly the same problem (and for the same application!) for some time now. It seems to me that the problem with cutting a rack in a milling machine – either horizontal or vertical – is running out of travel. If you mount the cutter on an arbour in a horizontal mill you've only got the travel of the y axis before you run out of space to index to the next tooth. So you really want to mount the work at right angles to the table, and also turn the axis of the cutter through 90 degrees. Keith Fenner has got a suitable gadget on his K&T mill, but I don't aspire to anything as fancy.
I could also cut the rack with the cutter in the vertical mill, but now the length of the rack I can cut is constrained by how much overhang of the cutter off the quill is bearable. Not much!
Fair play to Will, I hadn't thought of using the length of the lathe bed as the axis of the length of the rack. I don't have a DRO but if I could fettle up something with a long vernier caliper to measure the incremental position of the saddle under the cutter I'd be in business. Not sure I trust the leadscrew to do this measurement, but I guess that depends on the age of the lathe. Anyway. I happen to have a piece of precision ground 1" dia steel to use as an arbour. Just pop a key way in it and a couple of threads for locknuts and I'll give it a try.
Rgds
Simon