Custom formations are possible. To create one, arrange the units in the way you want them, then select them and group them ("G" button) - this is done most easily in the preparation phase. The ensuing group will move in the formation it was created in, unless you select one of the template formations to the left. They will only move in formation if you select them as a group, however - if you were to add even one unit to that is not part of the group to the selection, all units will leave formation and advance chaotically, and the same will happen if you use only a part of the group.
You can easily check if the group you've created will move in formation by right clicking and dragging - this will show a silhouette of the placement the units will try to assume if you release the button, and it will, if successful, be the same as the formation you desire.