跳转到内容

Template:Smallcaps/doc

维基百科,自由的百科全书

Usage

[编辑]

{{Smallcaps|Your Text}} will display the lowercase part of Your Text as typographical small caps. Your source text is not altered (a copy-paste will give it in its original form), only the way it is displayed. You can most especially use this template for names/surnames disambiguation and all-caps words or pronounceable acronyms.

Diacritics (å, ç, é, ğ, ı, ñ, ø, ş, ü, etc.) are handled. However, because the job is performed by each reader's browser, inconsistencies in CSS implementations can lead to some browsers not converting certain rare diacritics.

Use of this template does not generate any automatic categorization. As with most templates, if the argument contains an = sign, the argument should be prefixed with 1=. And for wikilinks, you need to use piping. There is a parsing problem with MediaWiki which causes unexpected behavior when a template with one style is used within a template with another style.

Technically, the templates wraps the standard <SPAN STYLE="font-variant:small-caps;">Your Text</SPAN>.

Code examples

[编辑]
Code Gives
Y {{Smallcaps|The ''Name'' of the 2<SUP>nd</SUP> Game}} The Name of the 2nd Game
Y Leonardo {{Smallcaps|DiCaprio}} (born 1974) Leonardo DiCaprio (born 1974)
Y {{Smallcaps|Nesbø, Vågen, Louÿs, Zúñiga, Kabaağaçlı}} Nesbø, Vågen, Louÿs, Zúñiga, Kabaağaçlı
When your text uses an = sign:
N {{Smallcaps|2+2=4}} {{{1}}}
Y {{Smallcaps|1=2+2=4}} 2+2=4
When your text uses a template:
N {{Smallcaps|Being {{Green|Green}} is Easy}} Being Green is Easy
N {{Smallcaps|Being {{Green{{!}}Green}} is Easy}} Green}} is Easy
Y {{Smallcaps|1=Being {{Green|Green}} is Easy}} Being Green is Easy
Y {{Green|1=Being {{Smallcaps|Green}} is Easy}} Being Green is Easy
Y {{Colors|green|yellow|3=Being {{Smallcaps|Green}} is Easy}} Being Green is Easy
When your text uses a | pipe:
N {{Smallcaps|Before|afteR}} Before
N {{Smallcaps|1=Before{{!}}afteR}} afteR
Y {{Smallcaps|1=Before&#124;afteR}} Before|afteR
When your text uses a link:
N [[{{Smallcaps|Mao}} Zedong]] [[Mao Zedong]]
Y [[Mao Zedong|{{Smallcaps|Mao}} Zedong]] Mao Zedong

Reasons to use

[编辑]

This template is useful for typographical uses including:

  • To lighten ALL-CAPS words or pronounceable acronyms, such as:
    • The biblical "Lord" (instead of LORD or Lord) or "Lord God" as written in some Bibles
    • The acronyms Unesco (instead of UNESCO or Unesco) or Unicef
    • The trademark Time (instead of TIME or Time)
  • To lighten ALL-CAPS surnames mandated by some referencing styles:
    • Piccadilly has been compared to a Parisian boulevard (Dickens 1879).
    • Dickens, C., Jr (1879). "Piccadilly" in Dickens's Dictionary of London.
  • To disambiguate Western names and surnames at a glance:
  • To disambiguate Eastern surnames and names at a glance:

See also

[编辑]

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

Magic words that rewrite the output (copy-paste will get the text as displayed):

  • {{lc:}} – lower case output of the full text
  • {{uc:}} – upper case output of the full text
  • {{lcfirst:}} – lower case output of the first character only
  • {{ucfirst:}} – upper case output of the first character only