photoemission; optical absorption; electron energy-loss spectroscopy; time-dependent density-functional theory; ab initio electronic spectra