[sentence],然而 + [contrast]
[sentence]。然而,[contrast]
然而 introduces something that runs against what the previous clause led you to expect. It means "but" or "however", and belongs to writing and formal speech – essays, reports, news. In conversation, 但是 or 可是 do the same job.
It often has 却 after the subject in the same clause, which makes the contrast stronger.
然而 opens its clause, before the subject. 却 is the word that goes after the subject.