  We describe a general method of arithmetic coding of geodesics on the modular
surface based on a two parameter family of continued fraction transformations
studied previously by the authors. The finite rectangular structure of the
attractors of the natural extension maps and the corresponding "reduction
theory" play an essential role. In special cases, when an (a,b)-expansion
admits a so-called "dual", the coding sequences are obtained by juxtaposition
of the boundary expansions of the fixed points, and the set of coding sequences
is a countable sofic shift. We also prove that the natural extension maps are
Bernoulli shifts and compute the density of the absolutely continuous invariant
measure and the measure-theoretic entropy of the one-dimensional map.
