Electron-ion correlation in liquid metals from first principles: Liquid Mg and liquid Bi.