  Uncertainties in the next-to-leading-order calculations of heavy-quark ($Q$)
production are investigated. Predictions for total cross sections,
single-inclusive distributions of heavy quarks and heavy flavoured hadrons, as
well as for $Q\bar{Q}$ correlations, are compared with charm and bottom data.
  The description of heavy-quarkonium production requires a separation of the
short-distance scale of $Q\bar{Q}$ production, which is set by the heavy-quark
mass from the longer-distance scales associated with the bound-state formation.
Various factorization approaches are compared, in particular with respect to
the different constraints imposed on the colour and angular-momentum states of
the $Q\bar{Q}$ pair(s) within a specific quarkonium state. Theoretical
predictions are confronted with data on heavy-quarkonium production at
fixed-target experiments and also at $p\bar{p}$ colliders, where fragmentation
gives the leading-twist cross section in $1/p_T^2$ and $1/m^2$ at high
transverse momentum.
