User:Dubiousjim/Cheatsheet: Difference between revisions
Dubiousjim (talk | contribs) m (→Template tools: formatting) |
Dubiousjim (talk | contribs) |
||
Line 699: | Line 699: | ||
== Additional Notes (not displayed) == | == Additional Notes (not displayed) == | ||
<div style="display:none;"> | |||
{| class="collapsible wikitable" style="width:34em" | |||
... | |||
|} | |||
before a box? | |||
<div style="clear: both;"></div> | |||
{{localurl:foo|printable=yes}} ~~> /w/index.php?title=foo&printable=yes | |||
{{fullurl:...}} includes http://{{SERVERNAME}}{{localurl:...} | |||
{{urlencode:string|WIKI}} (uses _ and %C3) or |QUERY (uses + and %C3) or |PATH (uses %20); default was WIKI, became QUERY | |||
{{anchorencode:string}} for #section_anchors | |||
{{ns:0}} ~~> "" | |||
{{lc:StRing}} | |||
{{lcfirst:StRing}} | |||
{{plural:2|is|are}} | |||
{{nowrap|text}} ~~> | {{nowrap|text}} ~~> | ||
Line 720: | Line 738: | ||
{{center|text}} ~~> | {{center|text}} ~~> | ||
<div align="center">{{{1}}}</div> | <div align="center">{{{1}}}</div> | ||
{{hidden|header|content|fwl=bold|bg1=transparent|ta1=center|headercss=|fw2=normal|bg2=transparent|ta2=left|contentcss=}} ~~> | |||
<div class="NavFrame" style="border:none;"><!-- | |||
--><div class="NavHead" style="font-weight:{{{fw1|bold}}};background-color:{{{bg1|transparent}}};text-align:{{{ta1|center}}};{{{headercss|}}}"><!-- | |||
-->{{{header|{{{1}}}}}}<!-- | |||
--> </div><!-- | |||
--><div class="NavContent" style="display:none;font-weight:{{{fw2|normal}}};background-color:{{{bg2|transparent}}};text-align:{{{ta2|left}}};{{{contentcss|}}}"><!-- | |||
-->{{{content|{{{2}}}}}}<!-- | |||
--></div></div> | |||
{{tag|ref|content=hello}} ~~> <ref>hello</ref> | |||
{{tag|font|open|content=hello}} ~~> <font>hello | |||
{{tag|ref|open|params=group=note}} ~~> <ref group=note> | |||
{{tag|br|single}} ~~> <br /> | |||
==> | |||
<code style="white-space:nowrap;">{{#switch:{{{2|pair}}} | |||
|c|close = <!--nothing--> | |||
|s|single | |||
|o|open | |||
|p|pair = <{{{1|tag}}}{{#if:{{{params|}}}| {{{params}}}}} | |||
}}{{#switch:{{{2|pair}}} | |||
|c|close = {{{content|}}} | |||
|s|single =  /> | |||
|o|open = >{{{content|}}} | |||
|p|pair = >{{{content|...}}} | |||
}}{{#switch:{{{2|pair}}} | |||
|s|single | |||
|o|open = <!--nothing--> | |||
|c|close | |||
|p|pair = </{{{1|tag}}}> | |||
}}</code> | |||
The Table of contents can be forced onto a floating table on the right hand of the screen with the code below: | |||
{| align="right" | |||
| __TOC__ | |||
|} | |||
Search is case-insensitive | |||
Search for a phrase by enclosing it in double quotation marks. | |||
You can use a wildcard *, at the end of a search term only. | |||
If a word appears in a page with single quotes, you can only find it if you search for the word with quotes. Since this is rarely desirable it is better to use double quotes in pages, for which this problem does not arise. An apostrophe is identical to a single quote, therefore Mu'ammar can be found searching for exactly that (and not otherwise). A word with apostrophe s is an exception in that it can be found also searching for the word without the apostrophe and the s. | |||
PageHistory | |||
----------- | |||
[Compare selected versions] | |||
(<cur> | last) [x] 11:35, 8 March 2012 Dubiousjim (Talk | contribs) (226 bytes) (Removed A B) (undo) | |||
( cur | last) [x] 11:35, 8 March 2012 Dubiousjim (Talk | contribs) (232 bytes) (added B, removed NavFrame) (undo) | |||
( cur | last) [ ] 11:34, 8 March 2012 Dubiousjim (Talk | contribs) (563 bytes) (Added A) (undo) | |||
( cur | last) [ ] 08:43, 8 March 2012 Dubiousjim (Talk | contribs) (560 bytes) (undo) | |||
"last" shows diff between that edit and the one preceding it. | |||
"cur" shows diff between that edit and the current page (which may be newer than any edit shown, if the displayed history is stale). | |||
The "cur" and "last" features are similar to those in Enhanced Recent Changes, except for "cur" in the first line: it is not linked in the revision history, while in the Enhanced Recent Changes it gives the differences corresponding to the last edit. | |||
RecentChanges | |||
------------- | |||
8 March 2012 | |||
m 11:37 Contribute (diff | hist) . . (-5) . . Fab (Talk | contribs) | |||
> N 11:35 User:Dubiousjim/Sandbox (18 changes | hist) . . (+226) . . [Dubiousjim (18×)] | |||
v N 10:43 Talk:Site improvements (7 changes | hist) . . (+4,062) . . [Dubiousjim (7×)] | |||
10:43 (cur | last) . . (+129) . . Dubiousjim (Talk | contribs) (Suggest more editing help links) | |||
10:39 (cur | last) . . (+62) . . Dubiousjim (Talk | contribs) (Privacy policy/copyright link) | |||
10:37 (cur | last) . . (+124) . . Dubiousjim (Talk | contribs) (suggest link to Special:Version) | |||
10:35 (cur | last) . . (+230) . . Dubiousjim (Talk | contribs) (Add some more wiki suggestions) | |||
m 10:32 (cur | last) . . (-33) . . Dubiousjim (Talk | contribs) (markup error) | |||
10:31 (cur | last) . . (+857) . . Dubiousjim (Talk | contribs) (Add some more wiki suggestions) | |||
N 10:19 (cur | last) . . (+2,693) . . Dubiousjim (Talk | contribs) (Create page) | |||
The "diff" and "last" links here works like "last" in PageHistory. The "cur" links work like "cur" in PageHistory, except that in RecentChanges it's also enabled for the topmost edit. The "n changes" link (for non-New pages) shows a diff of original state vs all the grouped changes together. | |||
Revision as of 12:20, 8 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 <var>command</var> to try}}
Contents of /path/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; block will extend to closing </nowiki>)
- : 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.
See also:
- http://meta.wikimedia.org/wiki/Help:Images_and_other_uploaded_files
- http://meta.wikimedia.org/wiki/Help:Image_page
- http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax
Other Boxes
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 ...
Advanced
#REDIRECT [[pagename]]
[[Category:Category name]]
To link to a Category page without adding the page to the category: [[:Category:Not in this category]]
{{Draft|Message.}} produces:
This material is work-in-progress ... Message. |
{{Obsolete|Message.}} produces:
This material is obsolete ... Message. (Discuss) |
- Including templates/pages
{{T}} includes [[Template:T]] {{:Name}} includes [[Name]] {{subst:T}} or {{subst::Name} {{msgnw:T}} includes T in <nowiki> style
Template tools
{{T|1=a=alpha|reason=...}} {{{1|default}}} {{{reason}}} Explicitly named/numbered args are trimmed, to preserve whitespace have to use implicitly numbered args. Inside a template, substrings beginning with "*", "#", ":", or ";" are automatically prefixed by a newline. Use `a{{{dummy|;}}}b` to generate `a;b`. Use {{ns:0}} for empty string.
Template:Cat uses {{#tag:nowiki|...}} around its {{{2}}}.
{{if|value|then|else}} yields then if value isn't blank; otherwise it yields else. One limitation: {{if|2=then}} yields then (but works properly if value is defined and empty, or else is defined).
{{ifz|value|result}} yields result if value is blank.
{{ifn|value|result}} yields result if value isn't blank. One limitation: {{ifn|2=result}} yields result (but works properly if value is defined and empty).
Making new 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>