Jump to content

Nested quotation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Afaprof01 (talk | contribs) at 00:39, 3 April 2013 (Added "expert" reference and text, removing hatnotes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The primary function of quotation marks is to set off and represent exact language (either spoken or written) that has come from somebody else. Quotation marks also are used in citing article titles in a reference. Quotation marks are always, without exception, used in pairs—one at the beginning of the quote and one at the end of the quote. Do not open a quotation and fail to close it at the end of the quoted material.[1]

To put this article into perspective, there are three primary types of quotations: direct, indirect, and quotations within a quotation (called "nested quotations" in the title of this article).

Direct quotations

Direct quotations involve incorporating another person's exact words into your own writing. To indicate a quotation, the vast majority of the time writers/editors need only to enclose the quote within the traditional quotation mark character present on all keyboards.

Indirect quotations

Indirect quotations are not exact wordings but rather rephrasings or summaries of another person's words. In this case, do not use quotation marks. However, indirect quotations still require proper citations to avoid plagiarism.[1]

Quotation within a quotation

Far more occasionally, writers/editors may choose to use a quotation which contains another quotation (called "nested quotations" in the title of this article). The original or primary source is part of normal text, and therefore uses the traditional quotation mark character to enclose the material that author is quoting. However, to use a quotation which contains another quotation, use single quotation marks to enclose quotes within another quotation. Do not place a space between the two kinds of quotation marks.[1] Examples:

The sports editor wrote, "When I interviewed the quarterback, he said they simply 'played a better game.'"
Jones quotes Smith as saying that "'burnt orange' is our school's color".
Jones quotes Smith as saying that "our school's color is 'burnt orange'". [primary and secondary quotes end at end of sentence]
Jones quotes Smith as saying that "our school's color is 'burnt orange' with blue lettering". [only primary quote end at end of sentence]

A good option programmed into Wikipedia are two templates that an editor may easily use to create either double-quote+single-quote at the beginning of a sentence, and a single-quote+double-quote occurring at the end of a sentence—with the proper typesetting (proportional) spacing between the quotes. It consists of two left brackets, the appropriate quotation mark characters, a space, and two right brackets. Simply type {{" '}} if at the beginning of a sentence or a quotation within a quotation, and type {{' "}} if at the end of a sentence or of a quotation within a quotation.

Therefore, two of the above examples look like this when using the Wikipedia templates:

Jones quotes Smith as saying that "'Burnt orange' is our school's color".
Jones quotes Smith as saying that "our school's color is 'burnt orange'".

To space or not to space, that is the question

DO NOT space between single and double spaces you yourself type on the keyboard.

DO put a space between single and double spaces if you use the Wikipedia template {{" '}} or {{' "}}.

More complicated rules and examples

A nested quotation is a quotation that is encapsulated inside another quotation, forming a hierarchy with multiple levels. When focusing on a certain quotation, one must interpret it within its scope. Nested quotation can be used in literature (as in nested narration), speech, and computer science (as in "meta"-statements that refer to other statements as strings). Nested quotation can be very confusing until evaluated carefully and until each quotation level is put into perspective.

Convention

Normally, hierarchical quotation sublevels alternate between using the quotation delimiter '' (double quote) and ' (single quote). This is normally true, regardless of the quotation style—whether the start and end quote symbols are uniform (straight quotes) or different (smart quotes, with the quote symbols at the beginning and end pointing inwards in their respective directions towards the quote text). For straight quotes (normally used in plaintext), the alternation between single and double quotes is necessary. For smart quotes, it is not as necessary, since the directional quote symbols behave analogously to nested parentheses, since the delimiters are unique and it is clear where a quote opens (beginning a new sublevel) and ends (ending that sublevel and returning to the outer scope). However, convention dictates that alternating symbols are used either way.

Example in literature

In literature, a good example of a story that uses nested quotes throughout the entirety of its narration, is Heart of Darkness by Joseph Conrad. It can be very confusing to English classes because of its complex hierarchical structure of the narrator narrating in the first person, giving the majority of the story to dialog from one character (Marlow) who speaks in the first person, who quotes many other characters, and often quoting those characters' quotes of other characters.

Consider this example from that story (page 29): [Marlow said,] "...The fat man sighed. 'Very sad.' 'And the pestiferous absurdity of his talk,' continued the other; 'he bothered me enough when he was here. "Each station should be like a beacon on the road towards better things, a center for trade of course, but also for humanizing, improving, instructing." Conceive you—that ass! And he wants to be manager! No, it's—' Here he got choked by excessive indignation, and I lifted my head the least bit. ..."

Marlow is telling the story about a fat man sighing and another person talking about someone who says bothersome things. The latter person Marlow quotes, in turn, quotes the person he is talking about, leading to a 2nd-level nested quote.

Example in JavaScript programming

Nested quotes often become an issue using the eval keyword. The eval function is a function that converts and interprets a string as actual JavaScript code, and runs that code. If that string is specified as a literal, then the code must be written as a quote itself (and escaped accordingly).

For example:

eval("var a=3; alert();");

This code declares a variable a, which is assigned the value 3, and a blank alert window is popped up to the user.

Nested strings (level 2)

Suppose we had to make a quote inside the quoted interpreted code. In JavaScript, you can only have one unescaped quote sublevel, which has to be the alternate of the top-level quote. If the 2nd-level quote symbol is the same as the first-level symbol, these quotes must be escaped. For example:

alert("I don't need to escape here");
alert('Nor is it "required" here');
alert('But now I do or it won\'t work');

Nested strings (level 3 and beyond)

Furthermore (unlike in the literature example), the third-level nested quote must be escaped in order not to conflict with either the first- or second-level quote delimiters. This is true regardless of alternating-symbol encapsulation. Every level after the third level must be recursively escaped for all the levels of quotes in which it is contained. This includes the escape character itself, the backslash ("\"), which is escaped by itself ("\\").

For every sublevel in which a backslash is contained, it must be escaped for the level above it, and then all the backslashes used to escape that backslash as well as the original backslash, must be escaped, and so on and so forth for every level that is ascended. This is to avoid ambiguity and confusion in escaping.

Here are some examples that demonstrate some of the above principles:

document.write("<html><head></head><body><p>Hello, this is the body of the document.");
document.writeln("</p>");
document.write("<p>A newline in HTML code 
acts simply as whitespace, whereas a <br> starts a new line.");
document.write("</p></body></html>\n"); 

eval('eval(\"eval(\\\"alert(\\\\\\\"Now I\\\\\\\\\\\\\\\'m confused!\\\\\\\")\\\")\")');

Note that the number of backslashes increase from 0 to 1 to 3 to 7 to 15, indicating a 2^n-1 rule for successively nested symbols.

References

  1. ^ a b c Conrey, Sean M., Mark Pepper, Allen Brizee. "How to Use Quotation Marks." Purdue Owl. Accessed 2 Apr 2013

For further information

http://owl.english.purdue.edu/owl/owlprint/577/

See also