  The observations of GW170817/GRB170817A have confirmed that the coalescence
of a neutron-star binary is the progenitor of a short gamma-ray burst. In the
standard picture of a short gamma-ray burst, a collimated highly relativistic
outflow is launched after merger and it successfully breaks out from the
surrounding ejected matter. Using initial conditions inspired from
numerical-relativity binary neutron-star merger simulations, we have performed
general-relativistic hydrodynamic (HD) and magnetohydrodynamic (MHD)
simulations in which the jet is launched and propagates self-consistently. The
complete set of simulations suggests that: (i) MHD jets have an intrinsic
energy and velocity polar structure with a ``hollow core'' subtending an angle
$\theta_{\rm core}\approx4^{\circ}-5^{\circ}$ and an opening angle of
$\theta_{\rm jet}\gtrsim10^{\circ}$; (ii) MHD jets eject significant amounts of
matter and two orders of magnitude more than HD jets; (iii) the energy
stratification in MHD jets naturally yields the power-law energy scaling
$E(>\Gamma\beta)\propto(\Gamma\beta)^{-4.5}$; (iv) MHD jets provide fits to the
afterglow data from GRB170817A that are comparatively better than those of the
HD jets and without free parameters; (v) finally, both of the best-fit HD/MHD
models suggest an observation angle $\theta_{\rm obs} \simeq 21^{\circ}$ for
GRB170817A.
