Sine–Gordon theory in a semi-strip