ג חָמֵשׁ חֲבוּרוֹת שֶׁשָּׁבְתוּ בִּטְרַקְלִין וְחִלְּקוּהוּ בִּמְחִצּוֹת, אִם עוֹבְרִים כֻּלָּם זֶה עַל זֶה, שֶׁאֵין פֶּתַח פָּתוּחַ לֶחָצֵר אֶלָּא הַחִיצוֹן וְכֻלָּם עוֹבְרִין דֶּרֶךְ עָלָיו, אֵין צְרִיכִים לִתֵּן בָּעֵרוּב אֶלָּא שְׁנַיִם הַפְּנִימִיִּים, וְכָל הָאֲחֵרִים חֲשׁוּבִים כְּבֵית שַׁעַר לָהֶם. וְאִם הָיָה לְכָל אֶחָד פֶּתַח פָּתוּחַ לֶחָצֵר, הַגָּה: אוֹ שֶׁאֵין עוֹבְרִים זֶה עַל זֶה, רַק כָּל אֶחָד יֵשׁ לוֹ פֶּתַח פָּתוּחַ לְבֵית שַׁעַר שֶׁלִּפְנֵיהֶם, וְהַבֵּית שַׁעַר פָּתוּחַ לֶחָצֵר (בֵּית יוֹסֵף), אִם הַמְּחִצּוֹת מַגִּיעוֹת לַתִּקְרָה בְּתוֹךְ שְׁלֹשָׁה טְפָחִים, דְּהָוֵי כָּל אֶחָד חֶדֶר בִּפְנֵי עַצְמוֹ אֲפִלּוּ הֵן שֶׁל יְרִיעוֹת, אִם בְּנֵי הֶחָצֵר נוֹתְנִים הָעֵרוּב בְּאֶחָד מִשְּׁאָר בָּתֵּי הֶחָצֵר צָרִיךְ כָּל אַחַת וְאַחַת מֵחֲבוּרוֹת שֶׁבִּטְרַקְלִין לִתֵּן עֵרוּב; אֲבָל אִם נָתְנוּ הָעֵרוּב בְּזֶה הַטְּרַקְלִין, אֵין צְרִיכִין לִתֵּן עֵרוּב כְּלָל שֶׁכֻּלָּם דָּרִים בְּבַיִת זֶה, וּבַיִת שֶׁמַּנִּיחִים בּוֹ הָעֵרוּב אֵין צָרִיךְ לִתֵּן עֵרוּב. וְכֵן אִם אֵין דִּיּוּרִין אֲחֵרִים בֶּחָצֵר אֵינָם צְרִיכִים עֵרוּב. חִלְּקוּהוּ בִּמְחִצּוֹת שֶׁאֵין נוֹגְעוֹת לַתִּקְרָה, אֲפִלּוּ אִם בְּנֵי הֶחָצֵר נוֹתְנִים עֵרוּבָן בְּאֶחָד מִשְּׁאָר בָּתֵּי הֶחָצֵר דַּי בְּעֵרוּב אֶחָד לְכָל הֶחָמֵשׁ חֲבוּרוֹת. הַגָּה: אִם מִקְּצָתָן עָשׂוּ מְחִצּוֹת וּמִקְּצָתָן לֹא עָשׂוּ, אוֹתָן שֶׁעָשׂוּ הֵם מְחֻלָּקִים, וְאוֹתָן שֶׁלֹּא עָשׂוּ, הֵם כִּמְשֻׁתָּפִין. (הַמַּגִּיד פֶּרֶק ד'). וְאִם הָיוּ דִּיּוּרִין בַּעֲלִיּוֹת מַמָּשׁ, אֲפִלּוּ נָתְנוּ בְּנֵי הֶחָצֵר הָעֵרוּב בַּטְּרַקְלִין, צְרִיכָה כָּל חֲבוּרָה וַחֲבוּרָה לָתֵת עֵרוּב. אֲבָל מִי שֶׁיֵּשׁ לוֹ מְלַמֵּד אוֹ סוֹפֵר בְּבֵיתוֹ, וְכֵן תַּלְמִידִים הַלּוֹמְדִים בִּפְנֵי הָרַב וְדָרִים בְּבֵיתוֹ כָּל אֶחָד בְּחַדְרוֹ, אֲפִלּוּ יֵשׁ לְכָל אֶחָד פֶּתַח פָּתוּחַ לֶחָצֵר וְאוֹכֵל וְיָשֵׁן בְּחַדְרוֹ, אֵינָם אוֹסְרִים.
3 Five groups who spent Shabbat in a large hall and divided it with partitions — if they all pass through one another's sections since there is only one opening to the courtyard, through the outermost section, and all pass through it — only the two innermost need contribute to the eruv, and all the others are considered a gatehouse for them. If each one has an opening to the courtyard — Rema: or they do not pass through one another but each has an opening to a gatehouse in front of them and the gatehouse opens to the courtyard — if the partitions reach the ceiling or come within three handbreadths of it, making each one a separate room even if they are made of curtains: if the courtyard residents place the eruv in one of the other courtyard houses, each and every group in the hall must contribute an eruv. But if they placed the eruv in this hall, none of them need contribute an eruv since they all dwell in this house, and the house in which the eruv is placed need not contribute. Similarly, if there are no other residents in the courtyard, they need no eruv. If they divided it with partitions that do not reach the ceiling — even if the courtyard residents place their eruv in one of the other courtyard houses — one eruv suffices for all five groups. Rema: If some made partitions and some did not — those who made them are considered separate, and those who did not are considered joint. If there are residents in actual upper stories, even if the courtyard residents placed the eruv in the hall, each group must contribute an eruv. But one who has a tutor or scribe in his house, and likewise students learning before their teacher and living in his house each in their own room — even if each has an opening to the courtyard and eats and sleeps in their room — they do not restrict.