Watching my dwarves scraggly run into battle, and travel the fortress during peace in a clump when on active duty hurts my eyes. It is a militia, but that doesn't mean they could have some kind of drill. There is currently a lot on the plate of development, and of course this would be low priority, as I want adventure mode and the current version much more, but I at least want this out there.
A new skill is added called drill, or what have you, under combat or social. Only soldier immigrants have it obviously. It can be taught in training sessions, maybe possibly the first thing taught to recruits, and then weapons training follows. When you give squads orders, you can designate whether or not to make the squad march. The pathfinding with this might be hell, but whatever. Basically the squad travels in rows, with one space in between rows, or maybe in tighter formation.
The ability of the soldiers to stay in formation is based largely on the dwarves' drill skill, with bonuses based on the drill and leadership skill of the squad leader, who marches in front or off to the side (possibly maybe even a penalty if you have a inexperienced captain who messes up the cadence). This would maybe grant happy or negative thoughts to spectators based on their personality, or the situation (dwarves get rallied and.excited when they see their army marching to fend off a siege, and get scared when they run by to fend off said siege out of formation). Possibly in the future you could build on this by adding ceremonial drill like changing of the guard ceremonies in front of the throne room and organize.cadres and such. (Then add ceremonial uniforms to complete it)