This site is supported by donations to The OEIS Foundation.

Template:'/doc

From OeisWiki
Jump to: navigation, search
This documentation subpage contains instructions, categories, or other information for Template:'.

The {{'}} (single quote) HTML numeric character entity template gives the UTF-16 HTML [hexadecimal] numeric character entity for the dumb single quote character (dumb apostrophe) ' (which has a special meaning in HTML and wiki markup), and for the apostrophe character ’. (This template uses the hexadecimal code[1] for the dumb single quote character so that it doesn't become interpreted with adjacent italics '' or bold ''' wiki markup.)

It may also be used to enclose text within single quotes ('dumb single quotes' or [‘english’ or ‹french›] smart single quotes).

Note: This is for XHTML5 future proofing, where named character entities should not be used, except the following five

Named entity Glyph
" "
& &
' '
&lt; <
&gt; >
Numeric entity Glyph
&#x0022; "
&#x0026; &
&#x0027; '
&#x003C; <
&#x003E; >

Numeric character entities or glyphs (except the five above glyphs, which have a special meaning in HTML) should be used instead.[2]

Tests

Named entity Glyph
&apos; '
&quot; "
&lsquo;
&rsquo;
&ldquo;
&rdquo;
&lsaquo;
&rsaquo;
&laquo; «
&raquo; »
Numeric entity Glyph
&#x0027; '
&#x0022; "
&#x2018;
&#x2019;
&#x201C;
&#x201D;
&#x2039;
&#x203A;
&#x00AB; «
&#x00BB; »
Comments
Typewriter ("programmer's") straight single quote, ambidextrous. Also known as "single quote."
Typewriter ("programmer's") straight double quote, ambidextrous. Also known as "double quote."
English left single quote
English right single quote
English left double quote
English right double quote
French left single angle quote
French right single angle quote
French left double angle quote
French right double angle quote

Usage

{{'}}      (to get ’, an apostrophe)

or

{{'|'}}      (to get ', a dumb apostrophe or a dumb single quote)

or

{{'|Quoted text}} or {{'|Quoted text|' d}}     (to get 'Quoted text' or 'Quoted text', with dumb single quotes)

or

{{'|Quoted text|e}} or {{'|Quoted text|' e}} or {{'|Quoted text|'}}      (to get ‘Quoted text’ or ‘Quoted text’ or ‘Quoted text’, with english smart single quotes)

or

{{'|Quoted text|f}} or {{'|Quoted text|' f}}      (to get ‹Quoted text› or ‹Quoted text›, with french smart single quotes, called single ‹guillemets› in french)

Examples

The following

The ''Iliad''{{'}}s vocabulary is archaic.

yields (see how the apostrophe collides with the italic d at the end of Iliad)

The Iliad’s vocabulary is archaic.

while

The ''Iliad''{{sp|2}}{{'}}s vocabulary is archaic.

yields (better now)

The Iliad  ’s vocabulary is archaic.

with a thin space, via {{sp|2}}, inserted before the apostrophe to avoid colliding with the italic d at the end of Iliad.

Conversely, if the text is already italicized, the following

''The ''Iliad''{{'}}s vocabulary is archaic.''

yields

The Iliad's vocabulary is archaic.

without the extra space, which would be distracting here.


Code Result Comment
{{'}} (apostrophe)
{{'|}} (apostrophe)
{{'|'}} ' (dumb apostrophe, dumb single quote)
aujourd{{'}}hui aujourd’hui (means ‹today›, in french)
{{'|Quoted text}} 'between dumb quotes'
{{'|Quoted text|d}} 'between dumb quotes'
{{'|Quoted text|' d}} 'between dumb quotes'
{{'|Quoted text|'}} ‘between english quotes’
{{'|Quoted text|e}} ‘between english quotes’
{{'|Quoted text|' e}} ‘between english quotes’
{{'|Quoted text|f}} ‹between french quotes›
{{'|Quoted text|' f}} ‹between french quotes›

Examples where you should use the {{prime}} template

Code Result Comment
length of 10' 6" length of 10' 6" (not proper feet and inches symbols)
length of 10{{prime}} 6{{prime|2}} length of 10 6′′
length of 10{{prime}}{{thinsp}}6{{prime|2}} length of 10 6′′ (better spacing)
5{{sup|o}} 30' 15" angle 5o 30' 15" angle (not proper minutes and seconds symbols)
5{{sup|o}} 30{{prime}} 15{{prime|2}} angle 5o 30 15′′ angle
5{{sup|o}}{{thinsp}}30{{prime}}{{thinsp}}15{{prime|2}} angle 5o 30 15′′ angle (better spacing)

Examples with invalid arguments

Code Result
{{'|between 'dumb' quotes}} ' (single quote) error: First parameter text cannot contain ' when enclosing it within '.
{{'|between 'dumb' quotes|d}} ' (single quote) error: First parameter text cannot contain ' when enclosing it within '.
{{'|Quoted text|g}} ' (single quote) error: Second parameter must be from d or ' d (dumb quotes), e or ' e or ' (english quotes), f or ' f (french quotes).

See also

  • {{"}} (dumb double quote "  ) (dumb ditto mark ", [english ” or french »] ditto mark) (to get text within: "dumb double quotes", smart [“english” or «french»] double quotes)
  • {{prime|2}} (second, inches or seconds symbol ′′  )

Notes