Complex sentence: He was married four times, first with the widow of Matthias (Beatrice of Naples), and his fourth with Anne de Foix, who finally gave birth to his only surviving legitimate children, Anna of Bohemia and Hungary and Louis.
Split into simpler sentences: He was married four times, firstly to the widow of Matthias (Beatrice of Naples). His fourth wife was Anne de Foix, who finally gave birth to his only surviving legitimate children, Anna and Louis.