模板:Smallcaps/doc
此页面是Template:Smallcaps的模板文档。 此页面可能包含了模板的使用说明、分类和其他内容。 |
此模板的文档不存在、不全面或不能详细描述其功能及/或其代码中的参数。请帮助扩充并改进其文档。 |
Usage
[编辑]本模板不应在引文模板(如引文格式1和引文格式2)中使用,因为本模板所含的标记会破坏引文模板生成的 COinS 元数据,更多信息请见“Wikipedia:COinS”。 |
{{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|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:
- 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:
- Many Spanish names are tricky to decompose:
- Jorge Luis Borges, but Adolfo Bioy Casares (both filed under "B")
- Many Spanish names are tricky to decompose:
- To disambiguate Eastern surnames and names at a glance:
- Most Chinese names retain their surname-first order:
- Most Japanese names are reversed in the West:
- Akira Kurosawa or Motojirō Kajii (usually reversed)
- But Edogawa Ranpo (kept due to wordplay "EdgarA–llanPoe) vs. Ranpo Edogawa (some modern uses)
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