Ionic solid-state dimers and polymers derived from imidazolium dicarboxylic acids.