The Tur wrote in the name of the Ramban: The custom that was practiced in the days of our teachers was as follows: They bury the deceased and return to a place near the cemetery, which is called the place of standing for the family members. The mourner delays there and stands to one side, and the people arrange themselves before him in rows upon rows, etc., and no row is less than ten men (and the mourner is not of the count, Ketubot 8a). And they would mention there the matter of the resurrection of the dead, such as: "The great God in the abundance of His greatness, mighty and strong in the abundance of His awesomeness, Who revives the dead by His word." And they request mercy for the deceased, saying that he should merit the resurrection of the dead, and he does not conclude with a blessing. And they sanctify there (Kaddish), and say "In the world that He is destined to renew, etc." And afterwards, in a place where they were accustomed to perform "standing and sitting" – the emissary of the congregation stands and says: "Stand, dear ones, stand." And they stand and say: "Blessed is the True Judge" and similar words of justification of the Divine decree. And afterwards the emissary of the congregation says to them: "Sit, dear ones, sit." And they do so up to seven times, corresponding to seven standings and sittings for the deceased against the seven vanities, etc. (Bava Batra 100b). And at this time, when he says to them "Stand, dear ones, stand" – they stand. And all the people pass to the left of the mourner, and each one says to him: "May you be comforted from Heaven." And from there they go to another place near this, etc., and they eulogize and lament in their manner in the city square. And they bless over the cup a blessing that they conclude with: "Blessed are You, Hashem, Who comforts mourners." And if he wishes to increase the blessings corresponding to the praise of the Holy One, Blessed be He, and to conclude it with "Who revives the dead," and corresponding to the comforters "Who pays the reward," and corresponding to all of Israel "Blessed is He Who halts the plague" – the permission is in his hand, etc. And afterwards they enter with the mourner to his house, and he reclines at the head, etc., and the mourner says "Blessed is the True Judge." And the great sages comfort each and every one according to what he sees fit to expound in comfort, etc. Thus far his words.
כתב הטור בשם הרמב"ן: המנהג שנהגו בימי רבותי כך היה: קוברין המת וחוזרין אל מקום סמוך לבית הקברות, והוא הנקרא מקום מעמד של בני המשפחה. ומתעכב שם האבל ועומד לצד אחד, והעם מסדרים עצמם לפניו שורות שורות וכו' ואין שורה פחותה מעשרה בני אדם (ואבל אינו מן המניין, כתובות ח א). והיו מזכירים שם עניין תחיית המתים, כגון: "האל הגדול ברוב גדלו, אדיר וחזק ברוב נוראות, מחיה מתים במאמרו". ומבקשים רחמים על המת, לומר שהוא יזכה לתחיית המתים, ואינו חותם בברכה. ומקדישין שם (קדיש), ואומרים "בעלמא דהוא עתיד לחדתא עלמא וכו'". ואחר כך במקום שנהגו לעשות מעמד ומושב – עומד שליח ציבור ואומר: "עמדו יקרים עמודו". ועומדין ואומרין: "ברוך דיין האמת" וכיוצא בו דבר של צידוק הדין. ואחר כך אומר להם השליח ציבור: "שבו יקרים שבו". וכך עושין עד שבעה פעמים, פוחתין לשבעה מעמדות ומושבות למת כנגד שבעה הבעלים וכו' (בבא בתרא ק ב). ובפעם הזאת כשאומר להם "עמדו יקרים עמודו" – עומדים. וכל העם עוברים משמאל האבל, וכל אחד אומר לו: "תתנחם מן השמים". ומשם הולכין למקום אחר סמוך לזה וכו', וסופדין ומקוננין כדרכן לרחובה של עיר. ומברכין על הכוס ברכה שמסיימין בה: "ברוך אתה ה', מנחם אבלים". ואם בא לרבות בברכות כנגד שבחו של הקדוש ברוך הוא ולחתום בה "מחיה המתים", וכנגד המנחמין "משלם הגמול", וכנגד כל ישראל "ברוך עוצר המגפה" – הרשות בידו וכו' ואחר כך נכנסין עם האבל לביתו, והוא מיסב בראש וכו', ואבל אומר "ברוך דיין האמת". וגדולי החכמים מנחמים כל אחד ואחד כפי מה שרואה לדרוש בנחמה וכו' עד כאן לשונו.