How can I design an animal pen that doesn't let all the creatures therein scatter whenever a dwarf enters to take one out to slaughter? I've almost exclusively farmed for my food up to now and am new to fencing in animals. I've read http://dwarffortresswiki.net/index.php/Meat_industry and understand how you could use pits to drop animals into an enclosed space to save room/FPS, but it doesn't address the problem of the animals being freed once a dwarf opens the door to take one out.
The best solution to livestock FPS issues is with a 3-level system.
The top level is just open space, designated as a pit, so you can drop creatures in.
The second level down has no floors, but instead has 3-4 retracting bridges covering what is otherwise open space. All doors into this chamber are forbidden (not pet-impassible, but actually forbidden) or sealed with constructed walls. Essentially, the only way in is to get tossed in from above, and the only way out is to get dropped when one of the bridges retract.
The bottom level of this setup has a butcher's shop, all doors leading into it are pet-impassible, and a number of levers, each of which is linked to exactly one of the bridges above.
Essentially, you drop animals into the pit/pen, they cannot path anywhere so they don't and don't eat much FPS, and then you periodically drop 1/3 or 1/4 of the herd for slaughter, depending on whether you have 3 or 4 bridges as the holding pen's floor. Basically, you solve the problem of animals getting out when a dwarf comes in to get them by never having a dwarf come in and get them.
You can even do a similar alternative setup for untamed animals, where instead of it being a 3-level setup with the pen 1 level above the butcher's shop you have the pen 8 or 9 levels above the butcher so the animals fall to their deaths when the bridges retract.