If you're actually using mixed troops, do as said above(forming your infantry in three or four ranks should suffice, with missile troops behind them in a spread out line). However, if you're using only crossbowmen, don't make the mistake of bunching them up. The cav will start trampling them(without them being able to shoot back effectively) while the real killer would be the missile troops following close behind. With a good part of your xbows trying to shoot and the rest turning about to face the horses, archers would have a blast shooting away at your men as they won't have their shields up. Instead spread them out well, this way horsemen would just move between them and get shot, while enemy archers will have a harder time hitting them.
So remember the strengths of each - footmen with big shields hold tight, shooters spread out.