Learn English – Should a period be placed within quotation marks if it would conflict with a punctuated item that should be used or typed verbatim

#quotationsamerican-englishperiodpunctuation

Gee whiz! Just when I thought I had the "period within quotation marks" rules set firmly in my personal punctuational code, I hit upon this sentence:

All message IDs are pre-pended with the value “ID:”.

As a reviewer, should I advise my author to stuff that very American period inside the quotation mark? Wouldn't that not only look rather ugly but also somewhat confuse the fact that the item within the quotation marks is to be typed verbatim by the reader? What would be community-advised in this case?

Best Answer

It's certainly a tricky question—the Chicago Manual of Style, for example, has no general guidance that I could find as to the appropriate format when following the American convention. It does offer an exception in section 7.75, which according to the section title, applies only to things that are to be literally typed, but I believe your example is close enough to apply the same rule.

If quotation marks must be used, any punctuation that is not part of the quoted expression should appear outside the quotation marks (as in the second example; see also 6.9)

Furthermore, Wikipedia does have this to offer:

Many American style guides explicitly permit periods and commas outside the quotation marks when the presence of the punctuation mark inside the quotation marks will lead to ambiguity, such as when describing keyboard input:

To use a long dash on Wikipedia, type in “—”.

Since, as you say, including the period inside the comma would be confusing, you should probably place the period outside the quotation marks.

Personally, I'd recommend using British style (aka logical punctuation), since by virtue of attempting to be logical, it ends up much easier than American style.