Characterization of coals and macerais by X-ray diffraction