This recipe is excerpted from Rose Levy Beranbaum's The Baking Bible (Houghton Mifflin Harcourt).
Twenty minutes or longer before baking, set an oven rack in the middle of the oven and preheat the oven to 325 degrees F/160 degrees C.
Spread the almonds evenly on a baking sheet and bake for about 10 minutes, or until pale gold. Stir once or twice to ensure even toasting and avoid overbrowning. Cool completely.
In a food processor, process the almonds with 2 tablespoons/ 25 grams of the sugar and the salt until fairly fine but not powder-fine. Alternatively, use a nut grater to grate the almonds finely, and then combine with the 2 tablespoons sugar and the salt.
In the bowl of a stand mixer fitted with the flat beater, mix together the remaining sugar and the butter on low speed for about 1 minute, or until smooth and creamy. Scrape down the sides of the bowl.
On low speed, beat in the egg yolks, 1 at a time, beating for about 20 seconds between each addition. Scrape down the sides of the bowl. Add the almond mixture, liquor or water, and vanilla and mix on low speed until the almond mixture is moistened. Beat for about 20 seconds until evenly incorporated.
Add the flour in 4 parts, turning off the mixer between additions, and beating on the lowest speed for about 15 seconds between each addition. Detach the beater and, with a silicone spatula, finish mixing any flour that may remain, reaching to the bottom of the bowl.
Scrape the dough onto a piece of plastic wrap. Wrap tightly and refrigerate the dough for 30 minutes, or until firm.
Scoop out rounded teaspoons of the dough (10 grams). Roll each piece of dough between the floured palms of your hands into a 1-inch ball and set it into a brioche pan. (Be sure to flour your hands or the gateaux will stick to the molds when baked.) Press the dough balls into the pans. They will come almost to the top of each pan. If the dough is sticky, refrigerate the dough until firmer. Use your pinky finger to press the dough into the fluted edges. Set the dough-lined brioche pans at least 1/2 inch apart on the baking sheet.
Bake for 14 to 16 minutes, or until deep golden brown. (An instant-read thermometer should read about 205 degrees F/96 degrees C.)
Set the baking sheet on a wire rack to cool for 10 minutes. Use the needle to slip between one of the edges of the pan and the gateaux to loosen and invert them onto another wire rack. Cool completely. The cookies keep, airtight, at room temperature, for 5 days; refrigerated, 10 days; frozen, 3 months.