Rinse, and then thinly slice the potatoes and onion. We used a mandolin.
Layer 1/3 of your potatoes and onions in a terracotta baking dish. Dot with 1/3 of the butter, then salt and pepper.
Continue layering until you have used all the potatoes.
Pour the cream and stock into the dish, use the last of the butter, and cover the top with the cheese. Cover the dish either with a lid, or a layer of aluminum foil.
Fire your oven until it reaches 700ºF, and then allow the temperature to fall to about 450ºF. You want a hot enough oven to bake the potatoes until soft, without your oven losing all of its heat. If you are baking this with other dishes, you should either fire your oven longer, or start at a higher temperature.
Place in a moderately hot oven for one hour. Remove the cover for the final 10 minutes.