Sauté onions until golden: Heat 1 Tbsp of olive oil on medium high heat in a thick-bottomed sauté pan. Add the sliced onions, stir to coat with the olive oil, and cook until golden brown, about 15 to 20 minutes.
Preheat oven to 400°F (205°C).
Toss sliced potatoes with olive oil, cheeses, salt, pepper: In a large bowl put the sliced potatoes and gently toss with 1 Tbsp of olive oil, ½ cup grated Gruyere cheese, ½ cup of grated Parmesan, salt, and white pepper.
Layer onions in buttered dish, arrange potatoes on top, pour stock over, sprinkle with more cheese: Butter a large gratin dish or 9x13 casserole lightly and line with the caramelized onions in an even layer at the bottom of the dish.
Arrange the sliced potatoes (including the grated cheeses) in a pattern over the onions.
Pour stock over the potatoes. Sprinkle with remaining cheese.
Cover with foil and bake, then broil to finish: Cover with aluminum foil and bake at 400°F (205°C) for 50 minutes (or until fork tender). Remove aluminum foil. Broil for 5 minutes, uncovered, until lightly browned.