Slice onions and garlic. Season with ras el hanout, cumin, pimenton dulce.
Cook slowly in olive oil for 30–40 minutes. Do not let them colour.
Oil a gratin dish.
Slice potatoes thinly.
Layer the potatoes with onion and garlic.
Just about cover with stock.
Cook in a low oven for 60–90 minutes till the stock is close to being absorbed. The quality of the dish depends on the quality of the stock.
Onions and garlic that have been sliced but not cooked before being incorporated will change the character of this dish without notably improving it. It is supposedly so named because it originated in homes without cooking facilities where it would be put together before being taken for communal cooking in a baker’s oven. It seems probable, then, that in those golden days when everyone was in it together and there was no sanitation the onion and garlic would not have been previously prepared. Authenticity is seldom worth pursuing; excellence always is.