We present results on transverse momentum ($p_{\rm T}$) and rapidity ($y$) differential production cross sections, mean transverse momentum and mean transverse momentum square of inclusive J/$\psi$ and $\psi(2S)$ at forward rapidity ($2.5<y<4$) as well as $\psi(2S)$-to-J/$\psi$ cross section ratios. These quantities are measured in pp collisions at center of mass energies $\sqrt{s}=5.02$ and 13 TeV with the ALICE detector. Both charmonium states are reconstructed in the dimuon decay channel, using the muon spectrometer. A comprehensive comparison to inclusive charmonium cross sections measured at $\sqrt{s}=2.76$, 7 and 8 TeV is performed. A comparison to non-relativistic quantum chromodynamics and fixed-order next-to-leading logarithm calculations, which describe prompt and non-prompt charmonium production respectively, is also presented. A good description of the data is obtained over the full $p_{\rm T}$ range, provided that both contributions are summed. In particular, it is found that for $p_{\rm T}>15$ GeV/$c$ the non-prompt contribution reaches up to 50% of the total charmonium yield.
The inclusive production cross sections at forward rapidity of J/$\psi$, $\psi$(2S), $\Upsilon$(1S) and $\Upsilon$(2S) are measured in pp collisions at $\sqrt{s} = 7$ TeV with the ALICE detector at the LHC. The analysis is based in a data sample corresponding to an integrated luminosity of 1.35 pb$^{-1}$. Quarkonia are reconstructed in the dimuon-decay channel and the signal yields are evaluated by fitting the $\mu^+\mu^-$ invariant mass distributions. The differential production cross sections are measured as a function of the transverse momentum $p_{\rm T}$ and rapidity $y$, over the ranges $0 < p_{\rm T} < 20$ GeV/$c$ for J/$\psi$, $0 < p_{\rm T} < 12$ GeV/$c$ for all other resonances and for $2.5 < y < 4$. The measured cross sections integrated over $p_{\rm T}$ and $y$, and assuming unpolarized quarkonia, are: $\sigma_{J/\psi} = 6.69 \pm 0.04 \pm 0.63$ $\mu$b, $\sigma_{\psi^{\prime}} = 1.13 \pm 0.07 \pm 0.14$ $\mu$b, $\sigma_{\Upsilon{\rm(1S)}} = 54.2 \pm 5.0 \pm 6.7$ nb and $\sigma_{\Upsilon{\rm (2S)}} = 18.4 \pm 3.7 \pm 2.2$ nb, where the first uncertainty is statistical and the second one is systematic. The results are compared to measurements performed by other LHC experiments and to theoretical models.