This question already has an answer here:
I know to capitalize a title when used with the name, i.e. Prince John, and not if it is general - "any prince will do." But if Queen Eleanor has been identified and I write as "the queen" in the same paragraph obviously referring to Eleanor, is it capitalized? The same would work for all church and nobility titles I presume.