  We consider the longitudinal momentum distribution of hadrons inside jets in
proton-proton collisions. At partonic threshold large double logarithmic
corrections arise which need to be resummed to all orders. We develop a
factorization formalism within SCET that allows for the joint resummation of
threshold and jet radius logarithms. We achieve next-to-leading logarithmic
NLL$'$ accuracy by including non-global logarithms in the leading-color
approximation. Overall, we find that the threshold resummation leads to a
sizable enhancement of the cross section and a reduced QCD scale dependence,
suggesting that the all-order resummation can be important for the reliable
extraction of fragmentation functions in global analyses when jet substructure
data is included.
