Heat oven to 375 degrees F. Grease a large sheet pan. Sift the flour, baking powder, baking soda, salt, and sugar together. Transfer 1/2 cup of the mixture to a food processor. Add the toasted almonds and grind until fine and powdery, about 45 seconds. Add to the dry ingredients. Add the chopped chocolate and whole hazelnuts and mix.
Whisk the eggs, extracts, and almond liqueur together. Add to the dry ingredients and mix. The dough may seem dry, but it will come together as you work it. If the dough doesn't come together, add water. Turn the dough out onto a lightly floured surface and divide into 2 equal pieces. Wet your hands and roll each piece of dough into a flattened log about 10 inches long, 3 inches wide, and 1-inch high.
Transfer the logs to the pan, leaving at least 3 inches between the logs (they will spread during baking). Bake until golden brown, 25 to 30 minutes, rotating the pan after 15 minutes to ensure even baking.
Let cool 30 minutes.
Reduce the oven temperature to 300 degrees. Carefully transfer the logs to a cutting board. Wipe off the sheet pan and grease it again.
Using a serrated knife, cut the logs on the diagonal into 1/2-inch-thick slices, discarding the ends. Arrange the slices cut side up on the sheet pan. Bake until toasted, 20 to 25 minutes. Turn the oven off, prop the oven door open, and let cool completely in the oven to set the chocolate. Store in an airtight container.
Recipe courtesy of Gale Gand, from Butter Sugar Flour Eggs by Gale Gand, Rick Tramonto, Julia Moskin: Clarkson N. Potter Publishers, 1999