Solution (source code)

= Solution

A thin pillbox applied to $\nabla\cdot\mathbf B=0$ and a thin rectangular contour applied to the magnetostatic Ampère law give
$$
\boxed{\hat{\mathbf n}\cdot(\mathbf B_2-\mathbf B_1)=0,\qquad
\hat{\mathbf n}\times(\mathbf H_2-\mathbf H_1)=\mathbf K_{\rm free}.}
$$
The normal points from medium1 to medium2, and $\mathbf K_{\rm free}$ is a free sheet current. Without such a current, tangential $H$ is continuous; normal $B$ is continuous independently. The remaining components need not be continuous because $\mathbf B=\mu_0(\mathbf H+\mathbf M)$ contains the <magnetization>.

For linear isotropic media with no free sheet current, $B_{1n}=B_{2n}$ and $B_{1t}/\mu_1=B_{2t}/\mu_2$. If $\theta_i$ measures a field-line angle to the normal, $\tan\theta_2/\tan\theta_1=\mu_2/\mu_1$. This magnetic field-line <refraction> follows from the two different component conditions, not from continuity of the complete vector field. Bound surface currents are already represented in the constitutive relation and must not be added again as free currents.