General formulation of vibronic spectroscopy in internal coordinates