In a heavy pan, saute onions in olive oil until transparent. Remove from heat. Lightly oil a medium sized, covered baking pan (or aluminum foil can be used as a cover). Arrange 1/3 of potato slices in baking dish. Top with 1/2 of the onions and 1/2 of the capers, salt and pepper. Repeat with another layer of potatoes, remaining onions, capers, salt and pepper. Top with remaining potatoes, salt and pepper. Pour over stock. Dot top with maragarine or drizzle with olive oil. Cover and bake at 350 °F for 45 minutes to 1 hour or until potatoes are soft.
I don’t always take the time to caramelize the onions. You can layer this dish with raw onion, but the taste is deeper if you caramelize them first.
I’ve successfully made this on the grill by putting this in a covered foil dish on the grill rack for about 40 minutes. Be careful and support the bottom of the pan when moving it on and off the grill.