Cut lemon in half lengthwise, then cut each half crosswise into 1/4-inch-thick slices; discard seeds and ends.
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.
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.