In a bowl whisk together flour and rosemary. In another bowl with an electric mixer beat together butter and sugar until light and fluffy. Add flour mixture gradually, beating until just combined. Press dough evenly into an 11-by 7-inch or a 9-inch square baking pan and with a sharp knife score about 1/4-inch deep in top 1- to 2-inch squares or rectangles. Bake shortbread in middle of oven 45 to 55 minutes, or until pale golden. Cool shortbread in pan on a rack and cut completely through score marks.