You are given a large amount of leeway when deploying while defending. When you are the defender in a battle you can deploy your units anyway you want to within a substantial part of the battlefield area.

It is not possible to choose where you deploy when you are attacking. You can choose from a number of preset battle formations from the icon in the lower left of the screen. You either click or right click to open the formation options like three line attack, three line defense, english half square(?) etc. I almost never use these options preferring to order my troops after I start the battle.

With that said, I seem to remember a thread (which I can't find) about being able to mod the preset formations to include custom formations that you have created. Unfortunately I don't know how to do this, so I am not much help there either. The theroy would be to set some custom battle formations that you typically use so you can click on the name and it will order your troops as you modded it to.

In regards to the Napoleanic Total War mod, I have never played it, so if the creator knew how to do the above, might have expanded on the preset list..