Complex sentence: The original Spanish plan was to take Almeida and then to advance towards the Alentejo and Lisbon, but after the Marquis of Sarria had been appointed commander-in-chief he decided to begin by an attack in the north with Oporto as its aim.
Split into simpler sentences: The original Spanish plan was to take Almeida and then to advance towards the Alentejo and Lisbon. But after the Marquis of Sarria had been appointed commander-in-chief he decided to begin by an attack in the north with Oporto as its aim.