In principle, the distinction between deixis and anaphora is clear-cut:

However, there are factors that complicate this distinction:

Consider :

.The CEO fired Smith. –
a.That is a lie!
b.That was a mistake.

A paraphrasis for .a is “What you said (i.e., your utterance the CEO fired Smith) is a lie!”, while a paraphrasis for #b is “For the CEO to fire Smith was a mistake.” The two paraphrastic patterns are not interchangeable (?For the CEO to fire Smith is a lie; ?What you said was a mistake).

Consequently, that in .a refers to the preceding utterance, while that in .b refers to the proposition which by virtue of that utterance is in the universe of discourse. Therefore, that in .a is a text-deictic element, whereas that in #b is an anaphoric element. Evidently, the antecedent of an anaphoric element may be a clause or sentence in its capacity of establishing a proposition in the universe of discourse. Such anaphora is therefore propositional anaphora.

Propositional anaphora is the (endophoric) relation between coreferential expressions referring to the same proposition.

Textual deixis is the (exophoric) relation of a (deictic) expression to another expression that occurs in the speech situation.

Textual connectives (sometimes called “discourse markers”) such as then, therefore, nevertheless etc. are propositional anaphorics. They have nothing to do with textual deixis.