Shulchan Aruch, Orach Chayim Siman 574

Siman 574

Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.

א הַהוֹלֵךְ מִמָּקוֹם שֶׁמִּתְעַנִּין לְמָקוֹם שֶׁאֵין מִתְעַנִּין, וְדַעְתּוֹ לַחֲזֹר, צָרִיךְ לְהִתְעַנּוֹת כָּל תַּעֲנִיּוֹת שֶׁקִּבְּלוּ עֲלֵיהֶם.
1 (The Laws) that we give in matters of fasting the stringency of the place of those leaving and those coming to there, and in it is 5 paragraphs. One who is going from a place that is fasting to a place that is not fasting, and his intention is to return, he needs to fast the whole fast that was accepted upon him (via the members of the fasting city).
ב הַהוֹלֵךְ מִמָּקוֹם שֶׁאֵין מִתְעַנִּין לְמָקוֹם שֶׁמִּתְעַנִּים, יִתְעַנֶּה עִמָּהֶם אֲפִלּוּ דַּעְתּוֹ לַחֲזֹר; וּמִיהוּ כֵּיוָן שֶׁלֹּא קִבֵּל עָלָיו תַּעֲנִית, אִם יָצָא מִן הָעִיר חוּץ לַתְּחוּם מֻתָּר לֶאֱכֹל וְאֵינוֹ צָרִיךְ לְהַשְׁלִים. הַגָּה: וְדַוְקָא שֶׁבָּא לְשָׁם בְּיוֹם הַתַּעֲנִית, אֲבָל אִם בָּא לְשָׁם מִבְּעוֹד יוֹם צָרִיךְ לְקַבֵּל עָלָיו הַתַּעֲנִית וְצָרִיךְ לְהַשְׁלִימוֹ (טוּר).
2 One who is going from a place that is not fasting to a place that is fasting, he should fast with them even if his intention is to return. However, since he did not accept upon him, if he leaves the city, outside of the Halachic Border, it is permitted to eat and it is not necessary to complete (the fast). Rema: Specificially, if he came on the day of the fast, but if he came when it was still day (that is prior to the fast beginning), it is necessary to accept the fast upon himself and he needs to complete it [Tur]
ג שָׁכַח וְאָכַל, אַל יִתְרָאֶה בִּפְנֵיהֶם כְּאִלּוּ אָכַל וְאַל יִנְהַג עִדּוּנִין בְּעַצְמוֹ לוֹמַר: הוֹאִיל וְאָכַלְתִּי מְעַט אֹכַל הַרְבֵּה וַאֲפִלּוּ שֶׁלֹּא בִּפְנֵיהֶם אָסוּר לִנְהֹג עִדּוּנִין בְּעַצְמוֹ (מָרְדְּכַי פ"ק דְּתַעֲנִית).
3 If he forgot himself and ate and drank (on a day observed as a fast day in the place), he must not show himself before the public, nor must he indulge himself with delicacies, saying since I ate a little, I'll eat a lot. Rema: even not in front them, it is forbidden to accustom himself with delicacies [Mordechai, First Chapter of Taanis]
ד מִצְוָה לְהַרְעִיב אָדָם עַצְמוֹ בִּשְׁנַת רְעָבוֹן וְאָסוּר לְשַׁמֵּשׁ בּוֹ מִטָּתוֹ, חוּץ מִלֵּיל טְבִילָה; וְלַחֲשׁוּכֵי בָּנִים (פֵּרוּשׁ וְלִמְנוּעֵי בָּנִים) מֻתָּר וְעַיֵּן לְעֵיל סִימָן ר"מ סָעִיף י"ב.
4 It is a mitzvah to famish oneself (i.e. eat little) in a year of famine, and it forbidden to have marital relations except for the Night of Immersion and one who lacks children explanation: to those who have been deprived of children it is allowed. Rema: See prior in Siman 240 Paragraph 12.
ה כָּל הַפּוֹרֵשׁ מִן הַצִּבּוּר אֵינוֹ רוֹאֶה בְּנֶחָמָתָן; וְכָל הַמִּצְטַעֵר עִמָּהֶם, זוֹכֶה וְרוֹאֶה בְּנֶחָמָתָן.
5 Anyone that separates from the community (in times of distress), he will not see its consolation, and anyone that grieves with them, he will merit and see it in its consolation.