1. A system for line extraction in digital ink, said digital ink representing handwritten input and being comprised of a stroke sequence, said system comprising a processor configured for: receiving the digital ink from a pen device, said pen device generating the digital ink during handwritten input; segmenting the strokes into a sequence of substrokes by applying a stroke segmentation algorithm; grouping substrokes about a selected substroke into a temporally preceding group of substrokes and a temporally subsequent group of substrokes calculating a centroid for each substroke or group of substrokes; calculating angular differences between the selected substroke and its neighbouring groups of substrokes, wherein the centroid of the temporally preceding group and the temporally subsequent group are used to calculate said angular differences; determining positions of extrema of the angular differences, said extrema corresponding to substrokes at line breaks, thereby enabling line extraction in the stroke sequence.