Put the dough blade (if it has one) into your bread machine, followed by the dough ingredients as listed above.
Choose the focaccia setting - if it doesn’t have that one, just go for a 45-60 minute dough program.
When you’ve set the bread machine running, cut up the red onion and soak it in the marinade.
When it’s done, use a spatula to spread the dough out in a large, oiled baking tray, then use your finger to make little random dimples all over it. Take the onion slices out of the marinade (which you keep for dipping the bread in later) and scatter them and the rosemary leaves over the dough.
Cover the tray with cling-film and leave in a warm place (around 40C) for about 20 minutes.
Pop into a pre-heated oven at 200C for 15-20 minutes until golden brown.
Slice it up and enjoy dipping it into the marinade - accompanied by a mixed salad.