Some more details:
Tuplets in Lilypond are far more powerful than they are in most other notation software. A tuplet in Lilypond is essentially nothing but music with a scaling factor and a bracket above. If you set the property tupletSpan or use the optional argument \tuplet ratio duration music
Lilypond will automatically split the tuplet into multiple tuplets of given duration. If you do not you can create tuplets of arbitrary dimensions such as this:
\tuplet 3/2 {
c' d' e' f' g' a' | g' f' e' d' c' b | c'1.
}
Also you can do any sort of tuplets crossing measures, and even do tuplets with irregular duration:
{
c'4 d' \tuplet 3/2 e' d' \tuplet 3/2 c'8 |
d'4 \tuplet 3/2 e'2 d'8 c' \tuplet 3/2 d'4
}
Combine this with irregular time signatures, and you can do stuff like this:
\new RhythmicStaff {
\numericTimeSignature
\time 4/4
\repeat unfold 4 { 8-> 8 }
\tuplet 3/2 4 \repeat unfold 4 { 8-> 8 8 } |
\time 4/6
\tuplet 3/2 4*2/3 \repeat unfold 4 { 8-> 8 }
\time 3/6
\tuplet 3/2 4*2/3 \repeat unfold 3 { 8-> 8 }
\time 6/12
\tuplet 3/2 4 \repeat unfold 2 { 8-> 8 8 }
\time 4/4
\tuplet 3/2 4 \repeat unfold 4 { 8-> 8 8 }
\repeat unfold 4 { 8-> 8 }
}
So in Lilypond you can have a Tuplet do quite arbitrary things, and doing what is seen in this excerpt is simply done by entering what you see and slapping a Tuplet onto it.
But even more even if you take a different piece of software like MuseScore (where a tuplet is music made up of n units taking the space of m units (where a unit is a power of 2 division)), which does not allow everything Lilypond would allow, will have no problems creating a tuplet such as the one you’ve shown.