Measurements of the production cross sections of prompt D0, D+, D*+, Ds+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\ extrm{D}}_{\ extrm{s}}^{+} $$\\end{document}, Λc+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Lambda}_{\ extrm{c}}^{+} $$\\end{document}, and Ξc+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Xi}_{\ extrm{c}}^{+} $$\\end{document} charm hadrons at midrapidity in proton-proton collisions at s\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ \\sqrt{s} $$\\end{document} = 13 TeV with the ALICE detector are presented. The D-meson cross sections as a function of transverse momentum (pT) are provided with improved precision and granularity. The ratios of pT-differential meson production cross sections based on this publication and on measurements at different rapidity and collision energy provide a constraint on gluon parton distribution functions at low values of Bjorken-x (10−5–10−4). The measurements of Λc+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Lambda}_{\ extrm{c}}^{+} $$\\end{document} (Ξc+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Xi}_{\ extrm{c}}^{+} $$\\end{document}) baryon production extend the measured pT intervals down to pT = 0(3) GeV/c. These measurements are used to determine the charm-quark fragmentation fractions and the cc¯\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ \ extrm{c}\\overline{\ extrm{c}} $$\\end{document} production cross section at midrapidity (|y| < 0.5) based on the sum of the cross sections of the weakly-decaying ground-state charm hadrons D0, D+, Ds+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\ extrm{D}}_{\ extrm{s}}^{+} $$\\end{document}, Λc+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Lambda}_{\ extrm{c}}^{+} $$\\end{document}, Ξc0\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Xi}_{\ extrm{c}}^0 $$\\end{document} and, for the first time, Ξc+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Xi}_{\ extrm{c}}^{+} $$\\end{document}, and of the strongly-decaying J/ψ mesons. The first measurements of Ξc+\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Xi}_{\ extrm{c}}^{+} $$\\end{document} and Σc0,++\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ {\\Sigma}_{\ extrm{c}}^{0,++} $$\\end{document} fragmentation fractions at midrapidity are also reported. A significantly larger fraction of charm quarks hadronising to baryons is found compared to e+e− and ep collisions. The cc¯\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$ \ extrm{c}\\overline{\ extrm{c}} $$\\end{document} production cross section at midrapidity is found to be at the upper bound of state-of-the-art perturbative QCD calculations.