Would it be correct to use the question mark as it is written in the following sentence? "If your cousin invites you to visit—and why would he not?—I will expect your return after only nine days."
According to The Chicago Manual of Style, sixteenth edition (2010), it is acceptable to position a question mark immediately in front of a closing em dash. Here is Chicago's entry on this topic:
6.87 Em dashes with other punctuation. In modern usage, a question mark or an exclamation point—but never a comma, a colon, or a semicolon, end rarely a period (see 14.46)—may precede an em dash.
Without further warning—but what could we have done to stop her?—she left the plant, determined to stop the union in its tracks.
The Oxford Guide to Style (2002), at 5.8.1, concurs:
The question mark can be followed with a dash where necessary:
He left—would you believe it?—immediately after the ball.
And Words into Type, third edition (1974), without referring explicitly to dashes, also agrees:
Direct questions. Use a question mark after a direct question.
[Relevant example:] Nor was it it disclosed—why need it have been?—that John had taken the case.
The three example sentences cited above are syntactically indistinguishable from your example:
If your cousin invites you to visit—and why would he not?—I will expect your return after only nine days.
So multiple style guides view this form of punctuation as lying within the pale of acceptable usage.
I believe that a question in-between em-dashes, commas or parentheses would usually be considered rhetorical.
From Grammar Girl :
rhetorical questions and tag questions are normal parts of everyday speech, but they are informal.
The choice of punctuation is up to the writer. From the Chicago manual of style :
You can use an exclamation point. Readers will understand: Who could blame him! It’s a rhetorical question in any case, and such questions often take a period rather than a question mark.
As for guidance on which to choose when, I believe the best advice is summed up on Pain in the English :
Punctuation is there to show how the sentence is to be read, denoting pauses, intonation, interpolations and so forth. Many rhetorical questions need a rising intonation at the end, so a question mark is appropriate. Sometimes a falling intonation is sought with a period (full stop).
In my opinion, your example sentence reads best without a question mark.
However, if I felt that a question mark was necessary I would choose to follow the AP style and place one space on either side of the em-dash to break up the punctuation visually. Further discussion on this in reference .