1. A system comprising: one or more electronic memories that store instructions for automated optical symbol recognition; and one or more processors to execute the instructions to: apply blocking to an image stored in at least one of the memories to decompose the image into an ordered set of symbol variants, wherein the image depicts a mathematical expression, and wherein, to apply blocking to the image, the processors are further to execute the instructions to: set a blocking-direction indication to indicate one of a horizontal blocking-direction or a vertical blocking-direction; set a current-level indication to indicate a first level; block the image into sub-images at a level according to the current-level indication and in a direction according to the blocking-direction indication; and recursively for each sub-image in the sub-images at the level, apply one or more symbol-recognition methods to the sub-image; select a most probable path from among candidate paths corresponding to the ordered set of symbol variants; use the most probable path and the ordered set of symbol variants to generate an encoded mathematical expression equivalent to the mathematical expression; and store the encoded mathematical expression in one or more of the memories.