Finely chop three quarters of the pineapple in a food processor or using a knife. Cut the remaining pineapple into small cubes. Slit the lemon grass stems and bruise with a rolling pin, then tie the stems together in the centre with string.
Add the pineapple and lemon grass to a preserving pan, then add the lime rind and juice and the pineapple juice. Bring to the boil, cover and simmer gently for 30 minutes.
Pour in the sugar and heat gently, stirring from time to time, until the sugar has dissolved. Bring to the boil, then boil rapidly until setting point is reached (20–30 minutes). Remove the lemon grass. Skim with a draining spoon or stir in butter if needed.
Ladle into warm, dry jars, filling to the very top. Cover with screw-top lids, or with waxed discs and cellophane tops secured with elastic bands. Label and leave to cool.