Context. HD 140283 is a reference subgiant that is metal poor and confirmed to be a very old star. The element abundances of this type of old star can constrain the nature and nucleosynthesis processes that occurred in its (even older) progenitors. The present study may shed light on nucleosynthesis processes yielding heavy elements early in the Galaxy. Aims. A detailed analysis of a high-quality spectrum is carried out, with the intent of providing a reference on stellar lines and abundances of a very old, metal-poor subgiant. We aim to derive abundances from most available and measurable spectral lines. Methods. The analysis is carried out using high-resolution (R = 81 000) and high signal-to-noise ratio (800 < S /N/pixel < 3400) spectrum, in the wavelength range 3700 < λ(Å) < 10475, obtained with a seven-hour exposure time, using the Echelle SpectroPolarimetric Device for the Observation of Stars (ESPaDOnS) at the Canada-France-Hawaii Telescope (CFHT). The calculations in local thermodynamic equilibrium (LTE) were performed with a OSMARCS 1D atmospheric model and the spectrum synthesis code Turbospectrum, while the analysis in non-LTE (NLTE) is based on the MULTI code. We present LTE abundances for 26 elements, and NLTE calculations for the species C i, O i, Na i, Mg i, Al i, K i, Ca i, Sr ii, and Ba ii lines.Results. The abundance analysis provided an extensive line list suitable for metal-poor subgiant stars. The results for Li, CNO, α-, and iron peak elements are in good agreement with literature. The newly NLTE Ba abundance, along with a NLTE Eu correction and a 3D Ba correction from literature, leads to [Eu/Ba] = +0.59 ± 0.18. This result confirms a dominant r-process contribution, possibly together with a very small contribution from the main s-process, to the neutron-capture elements in HD 140283. Overabundances of the lighter heavy elements and the high abundances derived for Ba, La, and Ce favour the operation of the weak r-process in HD 140283.