Preheat the oven to 180C. Beat the sugar with butter until fluffy. Then add the egg yolks one at a time, beating the mix well after each egg yolk. Add the lemon, cognac and the vanilla. Then, by hand, add the flour, baking powder until a nice soft dough is formed (see picture above). (Note that after you start mixing the dough by hand, you can also switch to using the paddle attachment of a mixer if you want, and then finish mixing the dough with your hands.)
Divide the dough in half. Press half of the dough flat into the bottom of the pan (15 inches by 10 inches). Spread the jam on top. Take the remaining dough and roll a long thin roll and place it on top of the jam so it follows the outer edge of the rectangular pan. (Try to make sure that you roll the dough on a surface that is not too warm to prevent the long thin rolls from cracking. Also make sure your hands are not too warm, and that the butter has been mixed well to help prevent the long thin rolls from cracking.)
Make more rolls and place them diagonally over the jam to create a diamond pattern, as in the pictures above. If you wish, then place small roasted almond pieces in each diamond pattern. Place in the oven and cook for about 35 to 40 minutes., until the dough is golden brown in colour. Remove from oven and let cool. Once cool, cut into as many bite size squares as you wish.