The production of heavy quarkonia at the LHC is considered. It is shown that, in the case of the inclusive production of χ cJ P -wave charmonia, existing experimental data can be described upon taking into account next-to-leading corrections, a dominant contribution coming from color-singlet states. For the case of B c -meson production, it is shown that, at experimentally accessible values of the transverse momentum, power-law corrections to the cross section make a significant contribution, with the result that the cross-section ratio σ(B c )/σ(B) develops a p T dependence not observed in the fragmentation regime. The case of double vector-charmonium production is also considered.