Clean the onions, if using, and trim. Finely chop the whites of the onions then thinly slice their green tops and reserve. If using leeks, halve them lengthwise, thinly slice, then wash in a large bowl of cold water. Dry on kitchen towel.
Bring a large pot of water to a boil. Salt water and cook pasta to al dente, about 7 minutes.
Meanwhile, heat EVOO, 3 or 4 turns of the pan, in a large skillet over medium-high heat. Add spring onion whites or all of the leeks and the garlic. Stir 2-3 minutes, add chard and season with salt and pepper. Add lemon and orange zest. Reduce heat to low.
When pasta is just about ready, add a cup of the starchy cooking water and the lemon and orange juice to the greens. Drain pasta and toss with sauce, butter and herbs for 1-2 minutes for flavors to combine and sauce to properly coat pasta. Add a little cheese to the mix and pass more at table.