The closest I have heard to a rule on this is that if the <b>h</b> is not sounded and the initial syllable is accented the proper article is <b>a</b>, but if the initial syllable is not accented the proper article is <b>an</b>

Does HTML work here? Please forgive me if it doesn't.

As a side note, I have thought that the thorny (že?) question of whether the initial h was pronounced in a Latin word could be resolved (or at least attacked) by determining whether the corresponding word in a modern Romance language followed some rule or other, which rule being dependent on the language. E.g., French mute h as in <i>l'herbe</i> vs. non-mute h as in <i>la hauteur</i>.