שולחן ערוך, יורה דעה ת״א

Shulchan Arukh, Yoreh De'ah 401

דברים הנוהגים בחול המועד. ובו ז' סעיפים:
אין מניחין את המטה ברחוב בחול המועד שלא להרגיל את ההספד שאסור להרגיל את ההספד בחול המועד אלא לכבוד ת"ח לפיכך אין מוליכין המת לבית הקברות בחול המועד עד שיהיה כל הקבר מתוקן ומזומן:
The bier is not to be set down in the open street during Hol ha-Moed so as not to give occasion for lamentation; for it is forbidden to give occasion for lamentation during Hol ha-Moed, unless it is [done] out of deference to a scholar. Therefore, the corpse is not taken out to the cemetery during Hol ha-Moed, unless the entire grave is prepared and is at one's disposal.
אין קורעין בחול המועד אלא מי שהוא חייב לקרוע כדאיתא בסימן ש"מ אבל מי שאינו חייב ורוצה לקרוע מפני הכבוד אסור:
Only one who is required to rend [garments] during Hol ha-Moed, does so, as stated in § 340, but one who is not dutibound [to do so] and desires to rend [garments during Hol ha-Moed] out of respect [to the dead], is forbidden [to do so].
שמע בחול המועד שמועה קרובה חייב לקרוע:
[If] one received during the Festival a report of near tidings, he is dutibound to rend [garments].
אין חולצין כתף במועד ואין מברין בו אלא קרוביו של מת אבל הקרובים מברין וה"ה לחנוכה ופורים וראש חדש וכשמברין אין מברין אלא על מטות זקופות אבל ביום טוב אפילו ביום טוב שני אין קורעין ולא חולצין ולא מברין ובחול המועד מברין הכל על החכם לתוך הרחוב כדרך שמברין את הקרובים שהכל כקרוביו:
One does not bare the shoulder [in mourning] during [Hol] ha-Moed, and only the near-of-kin of the dead are provided therein with the mourner's meal. However, [this means that] the mourner's meal is provided [only for] the near-of-kin [who are dutibound to observe mourning rites]. Likewise, on Hanukkah, Purim and Rosh Hodesh [the same rule applies]. And when the mourner's meal is provided [during Hol ha-Moed], it is done only on couches set up [in the usual manner]. However, on a Festival day, even on the second Festival day [of the Diaspora], one does not rend garments, nor bare [the shoulder in mourning], nor does one provide the mourner's meal. And during Hol ha-Moed all [who are in mourning] for a Sage, may be provided with the mourner's meal in the open space [of the town] in the [same] manner as the near-of-kin are provided with the mourner's meal, for all are like his near-of-kin.
נשים בחול המועד מענות דהיינו שכולן עונות כאחת אבל לא מטפחות דהיינו להכות כף על כף בראש חדש חנוכה ופורים מענות ומטפחות אבל לא מקוננות דהיינו שאחת מדברת וכולן עונות אחריה נקבר המת לא מענות ולא מטפחות והני מילי לאינש דעלמא אבל לתלמיד חכם בין בחול המועד בין בראש חדש חנוכה ופורים מענות ומקוננות כדרכן בחול והני מילי בפניו אבל שלא בפניו לא ויום שמועה אפילו רחוקה כבפניו דמי:
During Hol ha-Moed women may sing dirges, i.e., they all sing dirges in chorus, but may not clap, i.e., to clap their hands [in grief]. On Rosh Hodesh, Hanukkah and Purim, they may sing dirges and may clap their hands [in grief], but may not wail, i.e., when one speaks and all respond after her. After the corpse has been interred, they neither sing dirges, nor clap their hands [in grief]. This ruling obtains only with respect to an ordinary person, but as regards a scholar [who died, the law is that] both during Hol ha-Moed as well as Rosh Hodesh, Hanukkah and Purim, they may sing dirges and may wail as is their usual custom during a weekday. However, this ruling obtains only in his [the corpse's] presence, but away from his presence no [lament is permitted]. And the day of [receiving] the tidings [of his death], — even distant [tidings], is regarded the same as in his presence.
אומרים על המת צדוק הדין וקדיש כדרכן וכן ביום טוב שני אבל ביום טוב ראשון כיון שאין מתעסקים במת אין אומרים אותו: הגה ויש חולקין שלא לומר צדוק הדין במועד (הטור הביא כמה רבוותא) וכן המנהג פשוט במדינות אלו שלא לומר צדוק הדין בכל הימים שאין אומרים בהם תחנון (במנהגים) ולכן אין אומרים ג"כ כשקוברין אחר חצות בערב שבת י"א שאם קוברים המת בלילה שאין אומרים קדיש ולא צדוק הדין (כל בו):
[On Hol ha-Moed] one recites for the dead Ẓidduk Ha-din and Kaddish as usual; likewise, on the second Festival day [of the Diaspora], but on the first day of a Festival, since we do not attend to [the burial needs of] the dead, it [Ẓidduk Haddin] is not recited. Gloss: Some differ [with this ruling and maintain] that Ẓidduk Haddin should not be recited on [Hol] ha-Moed; and thus is the common practice in these countries, [viz.,] not to recite Ẓidduk Haddin on all days during which Taḥanun is not recited. Hence, [it] is also not said after midday on the eve of the Sabbath. Some say that if the corpse is interred at night, Kaddish and Ẓidduk Haddin are not recited.
מת לו מת קודם פורים ופגע בו פורים אינו מפסיק האבילות ומ"מ אין אבלות נוהג בו לא בי"ד ולא בט"ו אלא דברים שבצינעא נוהג וחייב לשלוח מנות ואף על פי שאינו מתאבל בהם עולים לו ממנין השבעה כמו שבת:
One who suffered a bereavement before Purim and then Purim occurred, it does not interrupt [the period of] mourning. Yet, no mourning is observed therein, neither on the fourteenth nor on the fifteenth [day of Adar]; only matters pertaining to private mourning one observes, and one is dutibound to send gifts [to others as is customary on Purim]; and although one observes no mourning rites therein, they [i.e., the fourteenth and the fifteenth of Adar] enter for him into the counting of the seven [days of mourning] as [in the case of the] Sabbath.

Ashlei Ravrevei: Shulchan Aruch Yoreh Deah, Lemberg, 1888 (Public Domain) · Code of Hebrew Law by Chaim N. Denburg, Montreal, 1955 (CC-BY) · 7 se'ifim