1. Cut onions in half lengthwise. Cut lemon in half lengthwise, then cut each half crosswise into 1/4-inch-thick slices; discard seeds and ends.
2. In a 12- by 17-inch baking pan, mix lemon, 1/4 cup water, olive oil, garlic, rosemary, and 1/4 teaspoon each salt and pepper. Spread level in pan. Lay onions, cut side down, in pan, on and around lemons and herbs.
3. Bake in a 400º regular or convection oven until onions are soft when squeezed, 50 to 60 minutes. Check occasionally; if pan juices evaporate before onions are tender, add a few tablespoons of water. Arrange onions, cut side up, on a platter; distribute lemon, garlic, and rosemary over onions. Serve hot or at room temperature. Add more salt and pepper to taste.