A method implemented by a computing device for processing math and text in handwriting, comprising: - identifying symbols by performing handwriting recognition on a plurality of strokes of digital ink; - classifying, as a first classification, at least one first symbol 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 by applying individually predefined symbol recognition rules on the symbols; - classifying, as a second classification, at least one second symbol 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 and at least one second symbol, predefined spatial syntactic rules defining spatial relationships between said at least one first symbol and said at least one second symbol; - updating or confirming, as a third classification, a result of said second classification by establishing semantic connections between at least two symbols from the identified symbols and comparing said semantic connections with the result of said second classification; and - recognising each symbol as either text symbol or math symbol based at least on a result of said third classification, said method characterized in computing, for each identified symbol, ink-related information based on each stroke forming said symbols, said ink-related information comprising: - symbol information (IF1a) characterising intrinsic properties of the one or more strokes forming said symbol; and - context information (IF1b) characterising at least one neighbour stroke, spatially-related with the one or more strokes forming said symbol, in accordance with at least one respective ordering of the plurality of strokes; wherein said ink-related information is used in at least said second and third classification to classify each symbol as either a math symbol candidate or a text symbol candidate. - identifying symbols by performing handwriting recognition on a plurality of strokes of digital ink; - classifying, as a first classification, at least one first symbol 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 by applying individually predefined symbol recognition rules on the symbols; - classifying, as a second classification, at least one second symbol 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 and at least one second symbol, predefined spatial syntactic rules defining spatial relationships between said at least one first symbol and said at least one second symbol; - updating or confirming, as a third classification, a result of said second classification by establishing semantic connections between at least two symbols from the identified symbols and comparing said semantic connections with the result of said second classification; and - recognising each symbol as either text symbol or math symbol based at least on a result of said third classification, said method characterized in computing, for each identified symbol, ink-related information based on each stroke forming said symbols, said ink-related information comprising: - symbol information (IF1a) characterising intrinsic properties of the one or more strokes forming said symbol; and - context information (IF1b) characterising at least one neighbour stroke, spatially-related with the one or more strokes forming said symbol, in accordance with at least one respective ordering of the plurality of strokes; - symbol information (IF1a) characterising intrinsic properties of the one or more strokes forming said symbol; and - context information (IF1b) characterising at least one neighbour stroke, spatially-related with the one or more strokes forming said symbol, in accordance with at least one respective ordering of the plurality of strokes; wherein said ink-related information is used in at least said second and third classification to classify each symbol as either a math symbol candidate or a text symbol candidate.