First, hard-boil the egg yolks: separate the eggs, then lower just the yolks into barely simmering water for 3-4 minutes until firm. Drain, cool, and press through a sieve. (Keep the raw whites for the glaze.)
Preheat the oven to 180°C (350°F/Gas Mark 4), and grease a 9-inch (23cm) loose-bottomed tart tin or flan ring.
Sift the flour, ground almonds and mixed spice into a large bowl, then stir in the sugar.
Rub the butter in with your fingertips until the mixture resembles fine breadcrumbs.
Add the sieved egg yolks, lemon zest and almond essence, and bring everything together into a firm dough - it needs very little handling.
Wrap the dough and chill in the fridge for at least an hour, until firm enough to roll out.
Cut off a third of the dough for the topping, and set it aside. Press the remaining two-thirds into the base and up the sides of the tin.
Spread the raspberry jam evenly over the pastry base.
Roll the reserved dough into ropes or strips, and arrange in a lattice over the jam. Trim and seal the edges.
Beat the reserved egg whites with a dash of water, and brush over the lattice. Scatter the flaked almonds on top while the egg wash is still wet.
Bake in the centre of the oven for 35-40 minutes until golden brown.
Cool completely before slicing. It's traditionally served cold, and tastes even better a day or two later.
If dusting with icing sugar, do this just before serving - not right after baking, or the jam will melt the sugar.