Template:Resize/doc: Difference between revisions
Template page
More actions
amended copy of en:Template:Resize/doc |
→Alternate: so! |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
Template to aid switching the font-size used for a text string.<br/> | {{documentation subpage}} | ||
Template to aid switching the font-size used for a text string.<br /> | |||
; Syntax | ; Syntax | ||
<code><nowiki>{{resize</nowiki>|''N''|''text''}}</code> or <code><nowiki>{{resize</nowiki>|''text''}}</code><br/> | <code><nowiki>{{resize</nowiki>|''N''|''text''}}</code> or <code><nowiki>{{resize</nowiki>|''text''}}</code><br /> | ||
''N'' specifies a size, such as "90%", "1.2em", etc. For the default case (the second above), ''N'' is set to "90%".<br/> | ''N'' specifies a size, such as "90%", "1.2em", etc. For the default case (the second above), ''N'' is set to "90%".<br /> | ||
; Examples | ; Examples | ||
| Line 18: | Line 19: | ||
===Alternate=== | ===Alternate=== | ||
{{tlp|smaller|''Text''}} = {{tlp|resize|''Text''}} (i.e. ''Text'' will appear at 90% normal size.) | * {{tlp|smaller|''Text''}} = {{tlp|resize|''Text''}} (i.e. ''Text'' will appear at 90% normal size.) | ||
* {{tlx|font-size|120%|''Text''}} | |||
===See also=== | |||
{{Text formatting template (see also)}} | |||
<includeonly> | <includeonly> | ||
[[Category:Text formatting templates|{{PAGENAME}}]] | |||
</includeonly> | </includeonly> | ||
Latest revision as of 02:34, 13 February 2024
Template to aid switching the font-size used for a text string.
- Syntax
{{resize|N|text}} or {{resize|text}}
N specifies a size, such as "90%", "1.2em", etc. For the default case (the second above), N is set to "90%".
- Examples
{{resize|1.2em|This text is 0.2em larger than normal}}
|
This text is 0.2em larger than normal |
{{resize|80%|This text is 80% normal size}}
|
This text is 80% normal size |
{{resize|This text defaults to 90% normal size}}
|
This text defaults to 90% normal size |
Alternate
- {{smaller|Text}} = {{resize|Text}} (i.e. Text will appear at 90% normal size.)
- {{font-size|120%|Text}}
See also
| Code example | Renders as | Notes | Code example | Renders as | Notes |
|---|---|---|---|---|---|
X{{Exp|superscript text}} |
Xsuperscript text | X{{Smallsup|small superscript text}} |
Xsmall superscript text | with smaller text | |
X{{Sub|subscript text}} |
Xsubscript text | X{{Smallsub|small subscript text}} |
Xsmall subscript text | with smaller text | |
| — | X{{Sup sub|superscript|subscript}} |
Xsuperscriptsubscript | with smaller text | ||
X{{Big|big text}} |
Xbig text | X{{Small|small text}} |
Xsmall text | Font size 85% | |
X{{Font-size|120%|font-size 120%}} |
Xfont-size 120% | ← could maybe be merged → | X{{Resize|120%|font-size 120%}} |
Xfont-size 120% | |
X{{Overline|overlined}} |
Xoverlined | — | |||
X{{Explain|term|explanation}} |
Xterm | — | |||
X{{Mark|marked text}} |
Xmarked text | Same color as used in diffs. | X{{Highlight|highlighted text|#FF0|green}} |
Xhighlighted text | Multiple format parameters possible |
X{{Small-caps|Small capitals}} |
XSmall capitals | — | |||
X<kbd>teletype</kbd> |
Xteletype | Tags, not a template yet(en) (but used in e.g. {{Tld}}) | X<code>code</code> |
Xcode |
Tags, not a template yet(en) (but used in e.g. {{Tlc}}) |
- Note: The capital
Xin front of each template is used to compare the results to plain text.