Using quantum Monte Carlo simulations, we compute the participation (Shannon-R\'enyi) entropies for groundstate wave functions of Heisenberg antiferromagnets for one-dimensional (line) subsystems of length $L$ embedded in two-dimensional ($L\times L$) square lattices. We also study the line entropy at finite temperature, i.e. of the diagonal elements of the density matrix, for three-dimensional ($L\times L\times L$) cubic lattices. The breaking of SU(2) symmetry is clearly captured by a universal logarithmic scaling term $l_q\ln L$ in the R\'enyi entropies, in good agreement with the recent field-theory results of Misguish, Pasquier and Oshikawa [arXiv:1607.02465]. We also study the dependence of the log prefactor $l_q$ on the R\'enyi index $q$ for which a transition is detected at $q_c\simeq 1$.