A method implemented by a computing device for processing math and text in handwriting (IN), comprising: - identifying (S4) symbols (SB) by performing handwriting recognition on a plurality of strokes (SK) of digital ink, wherein the strokes are acquired as online handwriting with temporal information indicative of a temporal order in which the strokes are handwritten relative to each other; - classifying, as a first classification (S12), at least one first symbol (SB1) from the identified symbols as either a text symbol candidate or a math symbol candidate with a confidence score reaching at least a first threshold (TH1) by applying individually predefined symbol recognition rules (RL1) on the symbols; - classifying, as a second classification (S16), at least one second symbol (SB2) other than said at least one first symbol as either a text symbol candidate or a math symbol candidate with a respective confidence score by applying, on said at least one first symbol (SB1) and at least one second symbol (SB2), predefined spatial syntactic rules (RL2) defining spatial relationships between said at least one first symbol and said at least one second symbol; - updating or confirming, as a third classification (S18), a result of said second classification by establishing semantic connections between at least two symbols (SB) from the identified symbols and comparing said semantic connections with the result of said second classification, wherein said semantic connections define relationships at a semantic level between said at least two symbols (SB); and - recognising (S20) each symbol as either text symbol or math symbol based at least on a result of said third classification. - identifying (S4) symbols (SB) by performing handwriting recognition on a plurality of strokes (SK) of digital ink, wherein the strokes are acquired as online handwriting with temporal information indicative of a temporal order in which the strokes are handwritten relative to each other; - classifying, as a first classification (S12), at least one first symbol (SB1) from the identified symbols as either a text symbol candidate or a math symbol candidate with a confidence score reaching at least a first threshold (TH1) by applying individually predefined symbol recognition rules (RL1) on the symbols; - classifying, as a second classification (S16), at least one second symbol (SB2) other than said at least one first symbol as either a text symbol candidate or a math symbol candidate with a respective confidence score by applying, on said at least one first symbol (SB1) and at least one second symbol (SB2), predefined spatial syntactic rules (RL2) defining spatial relationships between said at least one first symbol and said at least one second symbol; - updating or confirming, as a third classification (S18), a result of said second classification by establishing semantic connections between at least two symbols (SB) from the identified symbols and comparing said semantic connections with the result of said second classification, wherein said semantic connections define relationships at a semantic level between said at least two symbols (SB); and - recognising (S20) each symbol as either text symbol or math symbol based at least on a result of said third classification. <EOS>