For the soup:
3 tablespoons unsalted butter
1 tablespoon olive oil
1½ pounds (about 5 cups) thinly sliced yellow onions
1 teaspoon table salt, plus additional to taste
¼ teaspoon granulated sugar
3 tablespoons all-purpose flour
2 quarts beef or mushroom stock
½ cup dry white wine or dry white vermouth
Freshly ground black pepper
3 tablespoons cognac or brandy (optional)
For topping:
2 to 3 teaspoons grated raw onion
1 to 2 cups (to taste) grated Swiss or Gruyere cheese
1 tablespoon butter, melted
12-16 1-inch thick rounds French bread, toasted until hard
Melt the butter and oil together in a large pot or Dutch oven set over low heat. Stir in the onions, cover and cook for about 15 minutes. Remove the cover, add the salt and sugar and increase heat to medium. Continue cooking, stirring frequently, for 30-40 minutes or until the onions are a deep golden brown. Once the onions are fully caramelized, sprinkle in the flour and cook, stirring constantly, for 3 minutes. Stir in the wine, and then gradually add the stock, stirring after each addition. Season with salt and pepper to taste. Bring the soup to a simmer and continue cooking, partially covered, for 30-40 minutes. Stir in the cognac or brandy, if using.
Heat your broiler to high (or if you have gas like us, something like 500º). Arrange 4-6 ovenproof bowls on a large baking sheet. Divide the soup evenly and stir ½ teaspoon of grated onion and 1 tablespoon of cheese into each bowl. Lightly spread the melted butter over the bread slices, then float them on top of the bowls, using as many slices as you need to cover the soup. Top with as much grated cheese as you like. Place under the broiler until the cheese is melted and lightly browned. Serve immediately.