I recently encountered a quirky situation. A student wrote a sentence, and it was much more technical than this example (actually for a literature review on microbiology), but this examples illustrates the basic issue:
John said, "The cat is on the table" with great anger.
A parallel example:
John said, "The cat is on the table" when the cat climbed up.
I was always taught to offset complete quotations with commas, but I tend to only see examples with the signal phrase beginning or ending the quotation (e.g. "The cat is on the table," said John...). While I understand the sentences could easily be rearranged to terminate with the quotations and to improve style (e.g. With great anger, John said...), how should these be punctuated as they stand? Should there be a comma where the quotation terminates? Obviously, if the quotation were a regular clause, no comma would be used (the first due to a prep phrase, the second a dependent clause following an independent). But how does the quotation impact this rule? Thank you!