I routinely train marksdwarves as inactive, without problems. Step by step,
not meant to be patronizing in the slightest, just very accurate to avoid possible misunderstandings:
- [m]ilitary menu, press [n] to create a 'marksdwarf' uniform consisting in, for example: [A] mail shirt, [L] greaves, [H] helm, [G] gauntlets, [ B] high boots, [A] cloak, [H] hood, [ S] shield, [W] crossbow. Assign a specific [M]aterial to each part of armor, so that it reads 'steel mail shirt', 'steel greaves', and so on.
It's not important the 'steel' or the 'mail shirt' per se, but the fact of specifying the metal of the armor pieces and the armor pieces themselves, since both the standard 'metal' choice among selectable materials for armor in the [M]aterial menu, and the standard 'armor' choice in [A]rmor menu in the uniform creation screen seems to be the source of so many bugged uniforms.
- Assign militia commander/captain from the nobles screen, back to the [m]ilitary menu [c]reate squad, when prompted to choose an uniform assign the marksdwarf uniform to the squad. Put in the squad as many dwarves as you want.
- In the ammunition [f] menu, scroll down to the marksdwarf squad and assign bolts both for [C]ombat and for [T]raining to them.
Remove any bolts that happen to be assigned by default to any melee squad. If your fort uses hunters, you may want to save some ammo for them.
- [ b]uild [A]rchery targets, as many as you want. [q] over them, assign them the correct shooting direction, flag them for training with [t] near the correct squad name.
- Make sure you have enough quivers for the military, and for any hunter you may have.
- Your marksdwarves will pickup the equipment and practice firing at the archery targets any time training ammo is available to them. They're not considered "active/training" under the [m]ilitary-[a]lert screen, so they don't even get bad thoughts from long patrol duty.
- If they train too slowly for your tastes, consider activating them with [ s][letter of the squad][m] for some live target practice against resilient creatures in an arena you may have set up, with nearby ammo stockpiles.