Rub the butter into the flour until the mixture resembles fine breadcrumbs.
Stir in the almonds, rosemary, sugar, and egg yolk to form a dough.
Wrap the dough in cling film and chill in the fridge for 30 minutes.
Preheat the oven to 170°C and place a 23cm flan tin on a baking tray.
Boil rhubarb, sugar, cinnamon, and 4 tablespoons of water in a pan until soft.
Remove cinnamon, blend the rhubarb to a purée, sieve it, and let it cool.
Roll out the pastry, line the tin, and chill for a few minutes.
Scrunch and open a piece of baking parchment to soften it.
Prick the pastry, fill with parchment and baking beans, and bake for 15 minutes.
Remove beans, brush with egg wash, and bake for 5 more minutes.
Reduce the oven temperature to 160°C.
Whisk egg yolks and sugar, then whisk in boiled cream and sieve the mixture.
Pipe a rhubarb swirl into the case, add half the custard, and place in the oven.
Pour in remaining custard, bake 10 minutes, add more rhubarb, then bake 25 minutes more.
Allow the tart to cool in the tin, then grate nutmeg over the top to serve.