Template:Sc/doc

From FORwiki

(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Documentation subpage}} == Usage == '''<nowiki>{{sc}}</nowiki>''', named after '''s'''mall '''c'''aps, is a more robust and consistent WYSIWYG extension of {{tl|Smallcaps}}, b...')
(Code examples)
Line 30: Line 30:
In this case, the pasted/degraded/excerpted text will retain proper theological caps (instead of the erroneous "The Lord God was the Lord in 4004 bc" that <nowiki>{{Smallcaps}}</nowiki> would give.)
In this case, the pasted/degraded/excerpted text will retain proper theological caps (instead of the erroneous "The Lord God was the Lord in 4004 bc" that <nowiki>{{Smallcaps}}</nowiki> would give.)
-
==Code examples==
 
-
{| class="wikitable"
 
-
|-
 
-
!  !! Display (screen) <br /> ''Output (pasted)'' !! Code
 
-
|-
 
-
|{{Y}}|| Sinéad {{sc|O'C|onnor}} (born 1966) <br /> ''Sinéad O'CONNOR (born 1966)''
 
-
|<nowiki>Sinéad {{sc|O'C|onnor}} (born 1966)</nowiki>
 
-
|-
 
-
|{{Y}}|| Leonardo {{sc|DiC|aprio}} (born 1974) <br /> ''Leonardo DiCAPRIO (born 1974)''
 
-
|<nowiki>Leonardo {{sc|DiC|aprio}} (born 1974)</nowiki>
 
-
|-
 
-
|{{Y}}|| Adolfo {{sc|B|ioy| C|asares}} is at "B" <br /> '' Adolfo BIOY CASARES is at "B"''
 
-
|<nowiki>Adolfo {{sc|B|ioy| C|asares}} is at "B"</nowiki>
 
-
|-
 
-
|{{Y}}|| José {{sc|Á|lvarez| de T|oledo| y G|onzaga}} <br /> ''José ÁLVAREZ de TOLEDO y GONZAGA''
 
-
|<nowiki>José {{sc|Á|lvarez| de T|oledo| y G|onzaga}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{sc|N|esbø|, V|ågen|, L|ouÿs|, Z|úñiga|, K|abaağaçlı}} <br /> ''NESBØ, VÅGEN, LOUŸS, ZÚÑIGA, KABAAĞAÇLI''
 
-
|<nowiki>{{sc|N|esbø|, V|ågen|, L|ouÿs|, Z|úñiga|, K|abaağaçlı}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{sc|T|he| ''N|ame'' of the| 2|<sup>nd</sup>| G|ame}} <br /> ''THE NAME OF THE 2ND GAME''
 
-
|<nowiki>{{sc|T|he| ''N|ame'' of the| 2|<sup>nd</sup>| G|ame}}</nowiki>
 
-
|-
 
-
|colspan="3" align="center"| ''When your text shouldn't be wrapped:''
 
-
|-
 
-
|{{Y}}|| From {{sc|wrap=no|4004 |BC}} to {{sc|wrap=no|525 |AD}} <br /> ''From 4004 BC to 525 AD''
 
-
|<nowiki>From {{sc|wrap=no|4004 |BC}} to {{sc|wrap=no|525 |AD}}</nowiki>
 
-
|-
 
-
|{{Y}}|| The shortcut is {{sc|wrap=no|C|TRL| + A|LT| + D|EL}} <br /> ''The shortcut is CTRL + ALT + DEL''
 
-
|<nowiki>The shortcut is {{sc|wrap=no|C|TRL| + A|LT| + D|EL}}</nowiki>
 
-
|-
 
-
|colspan="3" align="center"| ''When your text uses an = sign:''
 
-
|-
 
-
|{{N}}|| {{sc|Y|ou and| M|e| = U|s}}
 
-
|<nowiki>{{sc|Y|ou and| M|e| = U|s}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{sc|Y|ou and| M|e| <nowiki>=</nowiki> U|s}}
 
-
|<nowiki>{{sc|Y|ou and| M|e| &lt;nowiki>=&lt;/nowiki> U|s}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{sc|Y|ou and| M|e| &#61; U|s}}
 
-
|<nowiki>{{sc|Y|ou and| M|e| &amp;#61; U|s}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{sc|Y|ou and| M|e| {{=}} U|s}}
 
-
|<nowiki>{{sc|Y|ou and| M|e| {{=}} U|s}}</nowiki>
 
-
|-
 
-
|colspan="3" align="center"| ''When your text has a template inside:''
 
-
|-
 
-
|{{N}}|| in {{sc|F|iddler's| {{Green|G}}|{{Green|reen}}}} forever
 
-
|<nowiki>in {{sc|F|iddler's| {{Green|G}}|{{Green|reen}}}} forever</nowiki>
 
-
|-
 
-
|{{N}}|| in {{sc|F|iddler's| {{Green{{!}}G}}|{{Green{{!}}reen}}}} forever
 
-
|<nowiki>in {{sc|F|iddler's| {{Green{{!}}G}}|{{Green{{!}}reen}}}} forever</nowiki>
 
-
|-
 
-
|{{Y}}|| in {{sc|1=F|2=iddler's|3={{Green| G}}|4={{Green|reen}}}} forever
 
-
|<nowiki>in {{sc|1=F|2=iddler's|3={{Green| G}}|4={{Green|reen}}}} forever</nowiki>
 
-
|-
 
-
|{{Y}}|| in {{sc|F|iddler's}} {{Green|1={{sc|G|reen}}}} forever
 
-
|<nowiki>in {{sc|F|iddler's}} {{Green|1={{sc|G|reen}}}} forever</nowiki>
 
-
|-
 
-
|colspan="3" align="center"| ''When your text is inside a template:''
 
-
|-
 
-
|{{N}}|| {{Green|in {{sc|F|iddler's| G|reen}} forever}}
 
-
|<nowiki>{{Green|in {{sc|F|iddler's| G|reen}} forever}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{Green|1=in {{sc|F|iddler's| G|reen}} forever}}
 
-
|<nowiki>{{Green|1=in {{sc|F|iddler's| G|reen}} forever}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{Colors|green|yellow|3=in {{sc|F|iddler's| G|reen}} forever}}
 
-
|<nowiki>{{Colors|green|yellow|3=in {{sc|F|iddler's| G|reen}} forever}}</nowiki>
 
-
|-
 
-
|colspan="3" align="center"| ''When your text uses a {{!}} pipe:''
 
-
|-
 
-
|{{N}}|| {{sc|B|efore|{{!}}|afteR}}
 
-
|<nowiki>{{sc|B|efore|{{!}}|afteR}}</nowiki>
 
-
|-
 
-
|{{N}}|| {{sc|B|efore|3={{!}}|afteR}}
 
-
|<nowiki>{{sc|B|efore|3={{!}}|afteR}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{sc|B|efore|<nowiki>|</nowiki>|afte|R}}
 
-
| <nowiki>{{sc|B|efore|&lt;nowiki>|&lt;/nowiki>|afte|R}}</nowiki>
 
-
|-
 
-
|{{Y}}|| {{sc|B|efore|&#124;|afte|R}}
 
-
|<nowiki>{{sc|B|efore|&amp;#124;|afte|R}}</nowiki>
 
-
|-
 
-
|colspan="3" align="center"| ''When your text uses a link:''
 
-
|-
 
-
|{{N}}|| [[{{sc|M|ao}} Zedong]]
 
-
|<nowiki>[[{{sc|M|ao}} Zedong]]</nowiki>
 
-
|-
 
-
|{{Y}}|| [[Mao Zedong|{{sc|M|ao}} Zedong]]
 
-
|<nowiki>[[Mao Zedong|{{sc|M|ao}} Zedong]]</nowiki>
 
-
|}
 
== See also ==
== See also ==

Revision as of 20:34, 24 December 2009

Usage

{{sc}}, named after small caps, is a more robust and consistent WYSIWYG extension of {{Smallcaps}}, backward-compatible in syntax and results. It will rewrite your text using typographical SMALL CAPS. This template is especially useful for name/surname disambiguation in lead sections, and to lighten all-caps words or pronounceable acronyms.

Code Adolfo {{sc|B|ioy| C|asares}}
Displayed Adolfo BIOY CASARES
Pasted Adolfo BIOY CASARES

Contrary to {{Smallcaps}}, the text will still show the disambiguated "Adolfo BIOY CASARES" (instead of "Adolfo Bioy Casares") in:

  • A copy-pasted version of the text.
  • A degraded version displayed by a non-CSS browser, or one whose CSS has been disabled, or portable devices such as mobile phones.
  • An excerpt as displayed in the results of search engines such as Google.

This preserves the benefit of small caps where they were judged useful.

Code {{sc|The Lord G|OD| was the L|ORD| in 4004 |BC}}
Displayed The Lord GOD was the LORD in 4004 BC
Pasted The Lord GOD was the LORD in 4004 BC

In this case, the pasted/degraded/excerpted text will retain proper theological caps (instead of the erroneous "The Lord God was the Lord in 4004 bc" that {{Smallcaps}} would give.)


See also

Alternative template that only changes the display (copy-paste will get the small-caps as lowercase):

Templates that change the display (copy-paste will get the original text):

Personal tools