Schneider’s celeriac-leek tart (shown here in the early assembly stages without the celery-root mixture): It’s a versatile dish that makes for an excellent appetizer or, if cut wider, a main course. (Edward Schneider/The Washington Post)

From the moment leeks appeared, I’ve been using them for all manner of things, often substituting them for onions or shallots to change the character of braises, sauces, rice dishes and even Thai-type curries (in which celeriac is a great principal ingredient, by the way).

Then, more recently, celeriac turned up. For a no-meat dinner party, I was planning a backward-looking main course — a dish centered on the ripe peppers and tomatoes of the waning summer — and I thought it might be nice to look forward to cooler weather in the first course. Nothing hearty, but something savory and novel that made good use of both leeks and celeriac.

In the past, I’ve used creamy celeriac puree as a flavorful replacement for bechamel sauce (or the ricotta) in a vegetarian lasagna, and it occurred to me that the puree might do a good job in an egg-bound filling for a tart. Think of a quiche, but suffused with celeriac flavor.

Having made plain pastry for a 9-inch tart shell — using 4 ounces chilled unsalted butter (cut into pieces), 6 ounces flour, salt and cold water as needed (around 4 tablespoons) — I wrapped and refrigerated this, then heated the oven to 425 degrees while I dealt with the vegetables.

I washed and sliced two medium leeks (including some of the paler green parts) and washed the slices again — they were very sandy — then sweated them in butter with salt. Meanwhile, I peeled two small celery roots (about 3 inches across), diced them and simmered the pieces in milk with salt and fresh tarragon leaves. Thyme would have been nice, too, but the main course already had plenty of that. When the celeriac was tender, I spooned the pieces into the food processor (discarding the tarragon leaves) and pureed them thoroughly with some of the milk in which they had cooked, reserving the remaining milk for later. (A blender would have made a smoother puree, but the food processor was right there on the counter.)

I rolled out the pastry and lined a 9-inch fluted, removable-bottom tart pan. This, in turn, I lined with aluminum foil and filled with my permanent mixture of dried beans and pie-crust weights. I baked it for 20 minutes, removed the foil and weights, lowered the oven to 375 degrees and continued to bake until the tart shell was completely cooked, brown and crisp. That is the latest thinking on filled tarts: Adding the filling to a fully baked shell will keep it from burning during continued baking, and the already crisp crust remains crunchy.

While this was in the oven, I added three egg yolks and one whole egg to the celery-root puree (which had cooled somewhat), along with freshly chopped tarragon, a small handful of grated gruyere, salt, pepper, and more of the reserved milk, now strained. This was not a liquid-custard mixture like the kind you’d use for a quiche; it was a soft puree that more or less held its shape in the spoon. (Taste that milk: Its celery/tarragon flavors will amaze you; it would make a terrific small-cup custard base.)

To finish the tart, I spooned in the leeks and spread them around evenly, then topped them with the celeriac puree, leveling the top with a spatula. I sprinkled the tart with a little more grated gruyere, lowered the oven temperature to 350 degrees and baked the tart for 30 minutes, until the filling was set enough to offer slight resistance to an inquisitorial finger. If I’d had a broiler (why I don’t is a long story), I’d have run the tart under it for a moment to brown the cheese.

Like many foods, this tart is best served tepid or at room temperature. It was an excellent first course — the tarragon enhanced the already vivid celery flavor, and the leeks were right at home, too. But served in larger wedges, it would have made a terrific main course with just a green salad on the side.

And you can make it throughout the winter!