Halliday & Matthiessen (2014: 631):
Thus the is an unmarked demonstrative, while this and that are both ‘marked’ terms – neither includes the other. Their basic deictic senses are ‘near’ and ‘remote’ from the point of view of the speaker. But they are also used to refer within the text. The ‘near’ term this typically refers either anaphorically, to something that has been mentioned immediately before … or is in some way or other being treated as ‘near’ … or else cataphorically …
The ‘remote’ term that refers anaphorically to something that has been mentioned by the previous speaker … or is being treated as more remote or from the listener’s point of view…