Original example: The table of contents, which appear on the first page of a book, is 25 pages long.
When the relative pronoun "which" appears after a comma, it can modify a noun or a noun phrase. The context and intended meaning of the sentence will determine, in a clear manner, whether "which" modifies "table of contents" or just "contents." In the given example above, the sentence will not make sense if "which" modifies "contents" because that would mean that "contents" (rather than "table of contents") appear on the first page of a book. The right thing is of course that "the table of contents appears on the first page of a book.
We can also use subject-verb agree to see why the above sentence is wrong. The plural verb "appear" is a wrong match for the singular noun phrase "table of contents."
The right sentence should thus read:
The table of contents, which appears on the first page of a book, is 25 pages long.
Hope this helps.
Der alte Fritz.Posted from my mobile device
+1 Kudos me - I'm half Irish, half Prussian.