Structure and formation of twins in the orthorhombic YBa2Cu3O7-x