User:Dubiousjim/Cheatsheet: Difference between revisions
Dubiousjim (talk | contribs) m (whitespace) |
Dubiousjim (talk | contribs) |
||
Line 652: | Line 652: | ||
== Additional Notes (not displayed) == | == Additional Notes (not displayed) == | ||
Should be empty: <{{ifz|x|y}}{{ifz|x}}{{ifz|}}{{ifz}}> | |||
Should be yy: <{{ifz||y}}{{ifz|2=y}}> | |||
Should be empty: <{{ifdef||y}}{{ifdef|x}}{{ifdef|}}{{ifdef}}> | |||
Should be yy: <{{ifdef|x|y}}{{ifdef|2=y}}> | |||
Should be empty: <{{ifwp|x||z}}{{ifwp|x||}}{{ifwp||y|}}{{ifwp|||}}{{ifwp|1=x|3=z}}{{ifwp||y}}{{ifwp|2=y|3=}}{{ifwp|1=x|3=}}{{ifwp|x|}}{{ifwp|2=|3=}}{{ifwp|1=|3=}}{{ifwp||}}{{ifwp|x}}{{ifwp|}}{{ifwp|2=}}{{ifwp|3=}}{{ifwp}}> | |||
Should be yyyy: <{{ifwp|x|y|z}}{{ifwp|x|y|}}{{ifwp|x|y}}{{ifwp|2=y}}> | |||
Should be zzz: <{{ifwp||y|z}}{{ifwp|||z}}{{ifwp|2=y|3=z}}> | |||
Should be zzz: <{{ifwp|2=|3=z}}{{ifwp|1=|3=z}}{{ifwp|3=z}}> | |||
<div style="display:none;"> | <div style="display:none;"> | ||
{{ifdef|value|result}} yields result if value isn't blank. | |||
One limitation: {{ifdef|2=results}} ~~> result (but works properly if value is defined and empty). | |||
{{ifndef|value|result}} yields result if value is blank. | |||
{{if|value|THEN|ELSE}} yields THEN if value isn't blank; otherwise it yields ELSE. | |||
One limitation: {{if|2=then}} ~~> then (but works properly if value is defined and empty). | |||
{{T}} includes [[Template:T]] | |||
{{:Name}} includes [[Name]] | |||
{{subst:T}} or {{subst::Name} | |||
{{msgnw:T}} includes T in <nowiki> style | |||
{{T|1=a=alpha|reason=...}} | |||
{{{1|default}}} | |||
{{{reason}}} | |||
explicitly named/numbered args are trimmed, to preserve whitespace have to use implicitly numbered args | |||
will need to escape | |||
= = | |||
| | | |||
[[ | |||
]] | |||
{{ | |||
}} | |||
The parameter default feature was introduced before Extension:ParserFunctions. This led to the development of branching methods through the parameter default mechanism. | |||
If-defined branches - {{{test{{{test|}}}|{{{then}}}}}} | |||
If no value is passed for the parameter test, then {{{test{{{test|}}}|{{{then}}}}}} resolves to {{{test|{{{then}}}}}} and returns a blank entry (since test is defined as blank). If the parameter "test" is assigned the value "boo", however, {{{test{{{test|}}}|{{{then}}}}}} resolves to {{{testboo|{{{then}}}}}}, and so long as no parameter "testboo" exists, then this will return the value of the parameter "then". | |||
An even older branching technique dates from before the introduction of the parameter default mechanism. It is based on the fact that if in a template call a parameter is assigned a value more than once, the last one counts. This is used in combination with specifying the value of a parameter in a template call, where the name of that parameter depends on a parameter of an outer template. In a call {{a|b=c|{{{d}}}=e}}, template:a uses b=c if b≠{{{d}}} and b=e if b={{{d}}}. See Template:T pdc. | |||
{{ifdef|value|result}} yields result if value isn't blank. | |||
One limitation: {{ifdef|2=results}} ~~> result (but works properly if value is defined and empty). | |||
{{ifndef|value|result}} yields result if value is blank. | |||
{{if|value|THEN|ELSE}} yields THEN if value isn't blank; otherwise it yields ELSE. | |||
One limitation: {{if|2=then}} ~~> then (but works properly if value is defined and empty). | |||
ParserFunctions extension | |||
{{ #if: {{{1}}} | parm1 has content or is undefined | parm1 is defined and empty }} | |||
{{ #if: {{{1|}}} | parm1 has content | parm1 is empty or undefined }} | |||
#ifeq | |||
#expr | |||
#ifexpr | |||
... | |||
Border | |||
<span style="display:inline"><span style="display:table-cell; border-collapse:collapse; border: solid 1px #ddd;">{{{1}}}</span></span> | |||
<div align="center">{{{1}}}</div> | |||
Revision as of 17:51, 7 March 2012
== Start with Heading 2 ==
Inline elements
- '''bold'''; or use b or strong or {font-weight:bold}
- ''italic''; or use i or em or {font-style:italic}
- small or {font-size:smaller}
- big or {font-size:larger} (invalid in 5)
- sup or {vertical-align:super}
- sub or {vertical-align:sub}
- <font> deprecated, use {font-size:10pt; color:red; font-family:"Courier"}
- <span style="color:gray">
- <span style="color:white; background:red">
- u or ins or {text-decoration:underline} (<u> valid in 5 but not 4 strict; <ins> can also be a block element)
sordelor {text-decoration:line-through} (<s> valid in 5 but not 4 strict; <del> can also be a block element)
code
uses {font-family:monospace;} (<tt> invalid in 5)markup and → entities are still honored
- and and
and are ignored
- var
- cite
- {{Hint|term|explanation}}
- {{Path|/a/path/name}}
Here is [[Internal pagetitle|an internal pagetitle]]: an internal pagetitle. Text immediately suffixing the link will be incorporated into the link text, preface with <nowiki /> to suppress.
Here is an Alpine Issue link {{Issue|279}}: #279.
Here is [http://www.example.org/ an external link]: an external link. If no link text is supplied: [1]. Omit brackets for http://www.example.org/ (use <nowiki> to suppress). Same server can be specified using {{SERVERNAME}}.
[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info].
-- ~~~~ gives a signature and timestamp: -- Dubiousjim 10:00, 4 March 2012 (UTC)
Here is one line, followed by <br />
and another line.
Here is <!-- a comment -->.
HR like this
----
Block elements
{{Cmd|a command to try}}
Contents of /path/to/file
<nowiki> converts → entities and collapses whitespace, but ignores all '''wiki''' and <span style="color:green">HTML</span> [[markup]].
HTML's <pre> uses {white-space:pre; font-family:monospace;} To wrap to screen width, use <pre style="white-space:pre-wrap">
In wiki, one leading space displays as block element, in monospace, doesn't collapse whitespace. Converts → entities and honors wiki and HTML markup. ? Can contain any inline element except: IMG OBJECT BIG SMALL SUP SUB
In wiki, <pre> displays as block element, in monospace, doesn't collapse whitespace. Otherwise like <nowiki>: it converts → entities, but ignores '''wiki''' and <span style="color:green">HTML</span> [[markup]]. One leading space plus <nowiki> is same as <pre> (in this case, subsequent lines should not be space-prefixed)
- : Simply indented text (on left side only).
This is <blockquote>. Collapses whitespace, and indents on both sides.
- Here is a numbered list item.
- Doubly-numbered
- Here is a bulleted list item.
- Doubly-bulleted
Blank lines, or non-bulleted/numbered lines, end the lists.
;item : Body text
or {{Define|item|Body text}} produce:
- item
- Body text
Images
[[File:Alpinelinux 01.png|right|thumb|100px|Caption text]] gives:
Options can appear in any order:
- Caption text defaults to filename; to wholly suppress, use
<span title=""></span>
- alt=text
- Size can be [width][xheight]px
- page=number, for PDF images
- rendered inline, Caption shows as hover text: frameless, and/or border
- rendered inline, on separate line: none
- Valign for inline images, defaults to middle: middle|baseline|sub|super|top|text-top|bottom|text-bottom
- Text flow can be stopped by placing
<br style="clear:both" />
before the text that should start below the floating image - link=URL|pagetitle|blank, only for inline images
- rendered floating, defaults to right align, Caption displayed below image: thumb, thumb=alternate filename, frame (ignores size options)
- rendered floating, defaults to thumb: left|right|center
To instead link to the file, you need to add a colon: File:Alpinelinux 01.png.
Other Boxes
{{Draft|Message.}} produces:
This material is work-in-progress ... Message. |
{{Obsolete|Message.}} produces:
This material is obsolete ... Message. (Discuss) |
#REDIRECT [[pagename]]
[[Category:Category name]]
To link to a Category page without adding the page to the category: [[:Category:Not in this category]]
Entities
&#decimal; or &#xhex; Other HTML entities Unicode symbols
& & | \ \ | \u00a0 |
a␣b \u2423 | ↵ ↵ \u21b5 | ||||
| | | ¦ ¦ \u00a6 |
∣ \u2223 | ∤ \u2224 | ∥ \u2225 | ∦ \u2226 | |||
" " | ' ' \u0027 |
′ ′ \u2032 |
″ ″ \u2033 |
´ ´ \u00b4 | ||||
{a,b} { } |
⦃a,b⦄ \u2983 \u2984 |
❴a,b❵ \u2774 \u2775 |
❨a,b❩ \u2768 \u2769 | |||||
[a,b] [ ] |
⟦a,b⟧ \u27e6 \u27e7 |
【a,b】 \u3010 \u3011 | ||||||
〈a,b〉 ⟨ ⟩ \u2329 \u232a |
《a,b》 \u300a \u300b |
❬a,b❭ \u276c \u276d |
‹ › ‹ › \u2039 \u203a |
« » « » \u00ab \u00bb | ||||
< < | ≤ ≤ \u2264 |
≮ \u226e | ≰ \u2270 | ≺ \u227a | ⊀ \u2280 | ≼ \u227c | ⋠ \u22e0 | |
> > | ≥ ≥ \u2265 |
≯ \u226f | ≱ \u2271 | ≻ \u227b | ⊁ \u2281 | ≽ \u227d | ⋡ \u22e1 | |
≪ \u226a | ⋘ \u22d8 | ≫ \u226b | ⋙ \u22d9 | ≷ \u2277 | ≹ \u2279 | |||
⊳ \u22b3 | ⊵ \u22b5 | ⋫ \u22eb | ⋭ \u22ed | ▷ \u25b7 | ▶ \u25b6 | ▻ \u25bb | ► \u25ba | |
⊲ \u22b2 | ⊴ \u22b4 | ⋪ \u22ea | ⋬ \u22ec | ◁ \u25c1 | ◀ \u25c0 | ◅ \u25c5 | ◄ \u25c4 | |
⧎ \u29ce | ⧏ \u29cf ⧐ \u29d0 | |||||||
∆ \u2206 | △ \u25b3 | ▲ \u25b2 | ||||||
∇ \u2207 ∇ | ▽ \u25bd | ▼ \u25bc | ||||||
- | − − \u2212 |
– – \u2013 |
— — \u2014 |
± ± \u00b1 |
÷ ÷ \u00f7 |
u/v | u/v ⁄ \u2044 | |
uxv | u×v × \u00d7 |
u*v | u∗v ∗ \u2217 |
u✶v \u2736 | u★v \u2605 | u☆v \u2606 | ||
f⚪g \u26a | f⚫g \u26ab | f⊕g ⊕ \u2295 |
f⊗g ⊗ \u2297 |
f⊙g \u229a | ||||
u∘v \u2218 | u•v • \u2022 |
u·v · \u00b7 |
u⋅v ⋅ \u22c5 |
°C deg \u00b0 | ||||
→ → \u2192 |
↛ \u219b | ⥽ \u297d | ↠ \u21a0 ⇉ \u21c9 |
↦ \u21a6 ⤙ \u2199 |
⇀ \u21c0 | ⟶ \u27f6 ⟼ \u27fc |
⇢ \u21e2 | ⤳ \u2933 |
← ← \u2190 |
↚ \u219a | ⥼ \u297c | ↞ \u219e ⇇ \u21c7 |
↤ \u21a4 ⤚ \u219a |
↼ \u21bc | ⟵ \u27f5 ⟻ \u27fb |
⇠ \u21e0 | |
↔ ↔ \u2194 |
↮ \u21ae | ⇄ \u21c4 | ⇌ \u21cc | ⟷ \u27f7 | ⇅ \u21c5 | |||
↑ ↑ \u2191 |
⇈ \u21c8 | ↿ \u21bf | ⇡ \u21e1 | |||||
↓ ↓ \u2193 |
⇊ \u21ca | ⇃ \u21c3 | ⇣ \u21e3 | |||||
⇒ ⇒ \u21d2 |
⇏ \u21cf | ⇾ \u21fe | ||||||
⇐ ⇐ \u21d0 |
⇍ \u21cd | ⇽ \u21fd | ||||||
⇔ ⇔ \u21d4 |
⇎ \u21ce | ⇿ \u21ff | ||||||
⇑ ⇑ \u21d1 |
⇓ ⇓ \u21d3 |
⇳ \u21f3 | ||||||
¬ ¬ \u00ac |
⊥ ⊥ \u22a5 |
⊤ \u22a4 | † † \u2020 |
‡ ‡ \u2021 | ||||
∧ ∧ \u2227 |
⋀ \u22c0 | ⊼ \u22bc | u⌃v \u2303 | ⋏ \u22cf | ||||
∨ ∨ \u2228 |
⋁ \u22c1 | ⊻ \u22bb | u⌄v \u2304 | ⋎ \u22ce | ||||
∀ ∀ \u2200 |
∃ ∃ \u2203 |
∄ \u2204 | ||||||
□p \u25a1 | ○p \u25cb | ◇p \u25c7 | ■p \u25a0 | ●p \u25cf | ◆p \u25c6 | |||
⊢ \u22a2 | ⊬ \u22ac | ⊣ \u22a3 | ⊨ \u22a8 | ⊭ \u22ad | ⊩ \u22a9 | ⊮ \u22ae | ||
∅ ∅ \u2205 |
∈ ∈ \u2208 |
∉ ∉ \u2209 |
℘ ℘ \u2118 | |||||
∩ ∩ \u2229 |
⋂ \u22c2 | ⊓ \u2293 | ||||||
∪ ∪ \u222a |
⋃ \u22c3 | ⊔ \u2294 | ||||||
⊃ ⊃ \u2283 |
⊇ ⊇ \u2287 |
⊅ \u2285 | ⊉ \u2289 | ⊐ \u2290 | ⊒ \u2292 | ⋣ \u22e3 | ||
⊂ ⊂ \u2282 |
⊆ ⊆ \u2286 |
⊄ ⊄ \u2284 |
⊈ \u2288 | ⊏ \u228f | ⊑ \u2291 | ⋢ \u22e2 | ||
= | ≠ ≠ \u2260 |
≡ ≡ \u2261 |
≢ \u2262 | |||||
~ | ∼ ∼ \u223c |
≁ \u2241 | ≈ ≈ \u2248 |
≉ \u2249 | ≅ ≅ \u2245 |
≇ \u2247 | ||
⌈ ⌉ ⌈ ⌉ \u2308 \u2309 |
⌊ ⌋ ⌊ ⌋ \u230a \u230b |
⌜S⌝ \u231c \u231d | ⌞S⌟ \u231e \u231f | |||||
ℕ \u2115 | ℤ \u2124 | ℚ \u211a | ℝ \u211d | ℜ ℜ \u211c |
℩ \u2129 ⍳ \u2373 |
ℯ \u212f | ℇ \u2107 ℰ \u2130 | |
∏ ∏ \u220f |
∑ ∑ \u2211 |
√ √ \u221a |
∞ ∞ \u221e |
… … \u2026 |
∶ \u2236 | ∷ \u2237 | ∴ ∴ \u2234 |
Downloads
In general when pointing to Alpine Linux downloads stick with the Downloads Page, but if you for any reason need to include direct download information, do so by using one of below.
|
|
|
Links
{{#latestalp:alpine|url}}
will give you latest download url for Alpine Linux Standard:
- {{#latestalp:alpine|url}}
{{#latestalp:alpine-mini|url}}
will give you latest download url for Alpine Linux mini:
- {{#latestalp:alpine|url}}
Example:
Start from [{{#latestalp:alpine|url}} Downloading latest Alpine Linux Standard], than continue ...
produces:
Start from [{{#latestalp:alpine|url}} Downloading latest Alpine Linux Standard], than continue ...
Making New Templates
In Template:Foo:
<noinclude>{{Template}} '''Short description.''' See also: * [[:Template:Bar]] ====Usage==== <code>{{Foo|Arg1|Arg2}}</code> ====Example==== {{Foo|Arg1|Arg2}} </noinclude> <includeonly> markup ... {{{1}}} {{{2|default}}} ... </includeonly>
Additional Notes (not displayed)
Should be empty: <> Should be yy: <yy>
Should be empty: <
This material is proposed for deletion ... There is no reason for this Template to exist on modern MediaWiki versions. Please use the built-in parser functions instead. Nothing links to this template.
(Discuss) |
This material is proposed for deletion ... There is no reason for this Template to exist on modern MediaWiki versions. Please use the built-in parser functions instead. Nothing links to this template.
(Discuss) |
This material is proposed for deletion ... There is no reason for this Template to exist on modern MediaWiki versions. Please use the built-in parser functions instead. Nothing links to this template.
(Discuss) |
This material is proposed for deletion ... There is no reason for this Template to exist on modern MediaWiki versions. Please use the built-in parser functions instead. Nothing links to this template.
(Discuss) |
> Should be yy: <
This material is proposed for deletion ... There is no reason for this Template to exist on modern MediaWiki versions. Please use the built-in parser functions instead. Nothing links to this template.
(Discuss) |
This material is proposed for deletion ... There is no reason for this Template to exist on modern MediaWiki versions. Please use the built-in parser functions instead. Nothing links to this template.
(Discuss) |
>
Should be empty: <Template:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:IfwpTemplate:Ifwp> Should be yyyy: <Template:IfwpTemplate:IfwpTemplate:IfwpTemplate:Ifwp> Should be zzz: <Template:IfwpTemplate:IfwpTemplate:Ifwp> Should be zzz: <Template:IfwpTemplate:IfwpTemplate:Ifwp>