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

Shulchan Arukh, Yoreh De'ah 384

האבל אסור בתלמוד תורה. ובו ה' סעיפים:
אבל כל שבעה ימים אסור לקרות בתורה נביאים וכתובים משנה גמרא הלכות ואגדות ואם רבים צריכים לו להתלמד מותר ובלבד שלא יעמיד תורגמן אלא יאמר לאחר והאחר לתורגמן והתורגמן ישמיע לרבים: הגה או ידרוש בעצמו (מרדכי הלכות אבל) ויכול לפסוק איסור והיתר ליחיד השואל אותו אם אין אחר אלא הוא וצריכין לו (בא"ז ור' ירוחם) אבל אסור לומר הלכה לתלמידיו וכן נוהגים אע"פ שיש מקילין (תא"ו בשם י"א):
A mourner throughout the seven days [of mourning] is forbidden to read the Pentateuch, Prophets or Hagiographa, [or to study] Mishna, Gemara, Halakoth or Aggadoth. If, however, the public have need of him in order that they receive instruction [from him], he is permitted [to study and thus prepare for the lecture], provided that [during the exposition of his lecture] he does not place [at his side] an interpreter, but he should expound [first] to another person, who, in turn, [conveys the exposition] to the interpreter, and the latter announces it to the public. Gloss: Or he may himself expound [directly to the public]. One may render decisions in matters of ritual law to an individual inquirer, provided he is the only one available [to render such decisions] and the public have need of him. But he is forbidden to expound Halaka to his students. Thus is the common practice, although some are lenient [in this matter].
אם האבל כהן ואין בב"ה כהן אחר אסור לו לעלות לקרות בתורה:
If a mourner is a Kohen, and there is no other Kohen [present] in the Synagogue, he is forbidden to go up to the reading of the Torah [as Kohen].
אם אין שם מי שיתפלל להוציא את הרבים ידי חובתן יכול האבל להתפלל להוציאן: הגה ומצוה להתפלל שחרית וערבית במקום שמת שם אפילו אין אבל כי יש בזה נחת רוח לנשמה (א"ז) והאבל מצטרף למנין (שם):
If there is no one else [present] who is [capable] of leading in the [Congregational] prayers to act on behalf of the public in order that they perform their duty, the mourner may lead in the [Congregational] prayers, and thus cause [the listeners] to perform their duty. Gloss: It is a religious duty to recite the [daily] prayers at the morning and evening services in the place where the person died, even if there is no [surviving] mourner, for this affords gratification to the soul [of the departed], and the mourner is counted in the Minyan.
אבל מותר לקרות באיוב ובקינות ובדברים הרעים שבירמיה ובהלכות אבלות (ועי' בא"ח סימן תקנ"ד סעיף ב') והני מילי בינו לבין עצמו אבל אינו לומד עם אחרים אלא הם יושבים ונושאים ונותנים בהלכות אבלות ואם טעו משיבן בשפה רפה והוא אינו שואל והני מילי כשאין רבים צריכין לו אבל אם רבים צריכים לו אפילו בהלכות אחרות מותר כדאמרינן:
A mourner is permitted to read Job, Lamentations, the sad parts of Jeremiah and the Laws of Mourning. This applies only [if he reads or studies] privately, but he must not study with others, only that they [others] may sit and debate on the laws of Mourning [in his presence], and if they err, he may refute them in low indistinct speech, but he may not ask [them] questions. However, this applies only if the public have no need of him, but if the public have need of him, — [the law is that] even with respect to other laws he is permitted [to engage in the study thereof] as we have already stated.
אבל שיש לו בנים קטנים אין לו לבטלם מלימודם:
A mourner who has minor children should not suspend them from their studies.

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