Mg line formation in late-type stellar atmospheres - I. The model atom Y. Osorio, P. S. Barklem, K. Lind, A. K. Belyaev, A. Spielfiedel, M. Guitou and N. Feautrier A&A, 579 (2015) A53 Published online: 26 June 2015 DOI: 10.1051/0004-6361/201525846