To make the pizza dough, place the flour in a large bowl and add the yeast to one side and the salt and sugar to the other. Mix everything together and make a well in the centre, add the olive oil and gradually add the water until it comes together into a slightly sticky dough. You may not need to use all of the water or you may need to use a little more.
Turn the dough out onto an un-floured surface and knead for about 10 minutes until smooth and elastic. It should be a little sticky at first but become smooth as you knead.
Place the dough in a lightly oiled bowl, cover, and set aside to rise for an hour or two until doubled in size. Alternatively, you can place the bowl in the fridge for up to a couple of days.
While the dough is rising prepare your toppings. Thinly slice the red onions and pour 1 Tbsp olive oil into a pan over a low heat. Add the onions and cook gently for five minutes until softened. Add the sugar and a pinch of salt and continue to cook gently, stirring every now and again, for about 20 minutes until soft and sticky.
Thinly slice the potatoes. Bring a pan of salted water to the boil and add the potatoes. Simmer for about five minutes until tender but not falling apart. Drain well then pat dry with kitchen paper. Toss the potato slices together with the rosemary, 1 Tbsp olive oil and some salt and pepper.
Preheat the oven to 220°C/425°F/gas mark 7. Divide the dough into two pieces and roll into balls. Line two baking sheets with baking parchment and sprinkle with semolina. Dust a worksurface with flour and semolina.
Roll each ball of dough out into a circle about 25cm/10 inches wide and place each one on one of the prepared baking trays.
Scatter the caramelised onions over the pizza bases. Top with the grated gruyère cheese then arrange over the potato slices in a single layer. Scatter over the parmesan cheese then bake for about 25 minutes until golden.