Siman 362
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 One who places his dead in a coffin and did not bury it in the earth, transgresses thereby a [negative command] because he keeps the dead over night [unburied]. If he placed him in a coffin and buried it in the earth, he does not transgress [a negative command] on his account. Nevertheless, it is [more] appropriate to bury him in the earth proper even [when he is buried] outside the Land [of Israel].
ב נוֹתְנִין הַמֵּת עַל גַּבָּיו, וּפָנָיו לְמַעְלָה, כְּאָדָם שֶׁהוּא יָשֵׁן.
2 The corpse [when buried] is placed on its back and its face is upwards like a person who is asleep.
ג אֵין קוֹבְרִים ב' מֵתִים זֶה בְּצַד זֶה, אֶלָּא אִם כֵּן הָיָה דֹּפֶן הַקֶּבֶר מַפְסִיק בֵּינֵיהֶם; וְלֹא הַמֵּת בְּצַד עֲצָמוֹת; וְלֹא עֲצָמוֹת בְּצַד הַמֵּת. אֲבָל נִקְבָּר הָאִישׁ עִם בִּתּוֹ קְטַנָּה, וְהָאִשָּׁה עִם בְּנָהּ קָטָן וְעִם בֶּן בְּנָהּ קָטָן. זֶה הַכְּלָל כָּל שֶׁיָּשֵׁן עִמּוֹ בְּחַיָּיו, נִקְבָּר עִמּוֹ בְּמוֹתוֹ.
3 They do not bury two corpses one alongside the other, unless the [intervening] wall of the grave separates between them. Nor [do they bury] a corpse alongside the bones [of another corpse], or the bones [of a corpse] alongside [another] corpse. However, a man may be buried with his minor daughter and a woman with her minor son or her son's minor son [in the same grave]. This is the general rule, — whosoever sleeps with him during lifetime may be buried with him when he dies.
ד אֵין נוֹתְנִין ב' אֲרוֹנוֹת זֶה עַל זֶה; וְאִם נָתַן, כּוֹפִין הָעֶלְיוֹן שֶׁיְּפַנֶּה. וְאִם יֵשׁ בֵּינֵיהֶם עָפָר שִׁשָּׁה טְפָחִים, מֻתָּר.
4 They do not place two coffins, one above the other. If one placed [them in this position], they may compel [the owner of the] one above that it be removed. If between them [the coffins] there are six handbreadths of earth, it is permissible.
ה אֵין קוֹבְרִין רָשָׁע אֵצֶל צַדִּיק, אֲפִלּוּ רָשָׁע חָמוּר אֵצֶל רָשָׁע קַל. וְכֵן אֵין קוֹבְרִין צַדִּיק וְכָשֵׁר וּבֵינוֹנִי, אֵצֶל חָסִיד מֻפְלָג. אֲבָל קוֹבְרִים בַּעַל תְּשׁוּבָה אֵצֶל צַדִּיק גָּמוּר (בֵּית יוֹסֵף).
5 They do not bury a wicked man beside a righteous one; even a grossly wicked person [is not buried] alongside a moderately wicked one. And likewise they do not bury a righteous person, and so much the more an average individual beside an extremely pious one. However, they may bury a repentent sinner beside a perfectly righteous person.
ו שְׁנַיִם שֶׁהָיוּ שׂוֹנְאִים זֶה לָזֶה, אֵין לְקָבְרָם יַחַד.
6 Two [people] who were enemies of each other, should not be buried together.