Gently fry onion and garlic, simmer with tomato, vinegar, and sugar, blend into a smooth sauce, and toss with pasta.