We present a high resolution spectral atlas of the HgMn star HD 175640 covering the 3040-10000{AA} region. UVES spectra observed with 90000-110000 resolving power and signal to noise ratio ranging from 200 to 400 are compared with a synthetic spectrum computed with the SYNTHE code (Kurucz, 1993, CD-ROM, No. 18). The model atmosphere is an ATLAS12 model (Kurucz, 1997, in The 3rd Conf. on Faint Blue Stars, ed. Philip, Liebert & Saffer (Schenectady: L. Davis Press), 33) with parameters Teff=12000K,logg=3.95, vturb=0km/s. The stellar individual abundances in ATLAS12 were derived from an iterative procedure. The starting atomic line lists downloaded from the Kurucz website have been improved and extended by examining different sources in the literature and by comparing the computed profiles with the observed spectrum. The high quality of the data allowed us to study the isotopic and hyperfine structure for several lines of Mn II, Ga II, Ba II, Pt II, Hg I, and Hg II. Numerous weak emission lines from Cr II and Ti II have been identified in the red part of the spectrum, starting at about 5847{AA}. Two emission lines of C I (mult. 10, mult. 9) have been observed for the first time. All Cr II and Ti II emission lines originate from the high excitation states (Elow>89000cm^-1^ for Cr II and Elow>62000cm^-1^ for Ti II) with large transition probabilities (loggf>-1.00). The synthetic spectrum superimposed on the observed spectrum are available at http://wwwuser.oat.ts.astro.it/castelli/stars.html . An extended discussion on each identified ion and related atomic data is available both in the quoted website and in an electronic Appendix to the paper.