To make the pastry, measure the flour into a bowl and rub in the butter (and salt, if needed) with your fingertips until the mixture resembles fine breadcrumbs. Add the water, mixing to form a soft dough.
Press dough into a tart pan with a removable bottom. Refrigerate 30 minutes or overnight.
When ready to bake, heat oven to 400 degrees (F).
Bake pastry for about 15 minutes. Remove from the oven and allow to cool. Spread with jam.
Melt the butter in a pan, take off the heat and then stir in the sugar. Add (salt, if using) ground almonds, egg, and almond extract. Pour over crust. Sprinkle over the flaked almonds.
Bake for about 35 minutes. If the almonds brown too quickly, cover loosely with foil to prevent them burning. Remove tart from oven to cool.
Put powdered sugar into a bowl. Stir in extract. If the mixture is too thick to drizzle over tart, add water, 1 teaspoon at a time.
Drizzle icing over top. Or place icing into a zip-top baggie with one corner snipped off, and pipe the icing over the top.