  Context: Hot subdwarf B stars (sdBs) are considered to be core helium-burning
stars with very thin hydrogen envelopes situated on or near the extreme
horizontal branch (EHB). The formation of sdBs is still unclear as well as the
chemical composition of their atmospheres. The observed helium depletion is
attributed to atmospheric diffusion. Metal abundances have been determined for
about a dozen sdBs only resulting in puzzling patterns with enrichment of heavy
metals and depletion of lighter ones. Aims: In this paper we present a detailed
metal abundance analysis of 106 sdBs. Methods: From high resolution spectra we
measured elemental abundances of up to 24 different ions per star. A
semi-automatic analysis pipeline was developed to calculate and fit LTE models
to a standard set of spectral lines. Results: A general trend of enrichment was
found with increasing temperature for most of the heavier elements. The lighter
elements like carbon, oxygen and nitrogen are depleted and less affected by
temperature. Although there is considerable scatter from star to star, the
general abundance patterns in most sdBs are similar. State-of-the-art diffusion
models predict such patterns and are in qualitative agreement with our results.
However, the highest enrichments measured cannot not be explained with these
models. Peculiar line shapes of the strongest metal lines in some stars
indicate vertical stratification to be present in the atmospheres. Such effects
are not accounted for in current diffusion models and may be responsible for
some of the yet unexplained abundance anomalies.
