597. The Shape of a Doorway

82:5 We have said that if a breach in a courtyard wall does not exceed ten cubits, it is considered like a doorway and no repair is required to permit carrying in the courtyard on Shabbos. This rule only applies when there is just one breach. If there are two or more breaches in the courtyard wall, we require that the sections of the wall that are still standing are at least equal in size to the breach. If the sizes of the breached areas exceed that of the standing wall, then so long as the breach is more than three handbreadths, it must be fixed.

82:6 What is the shape of a doorway? One sets up a pole on either side of the breach, each not less than ten handbreadths tall, and he puts a pole or a string on top of them. This pole or string must actually be on the top of the two vertical poles, not on the side. If one hammers nails into the tops of the poles and wraps the string around these nails, it is sufficient. Each pole must be no more than three handbreadths from the wall and the bottom of the pole must be no higher than three handbreadths from the ground. In a case of need, if it’s impossible to make the shape of a doorway with the poles within three handbreadths of the walls as per usual, one may act leniently and place the poles further away.