Alpine Linux:Markup syntax: Difference between revisions

From Alpine Linux
(→‎Inline elements: bold & italic doesn't work)
(redirect to Help:Editing)
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Inline elements ==
#REDIRECT [[Help:Editing]]
 
* ''<nowiki>''italic''</nowiki>''; or use <i>&lt;i&gt;</i> or <em>&lt;em&gt;</em> or {font-style:italic} in a style attribute
* '''<nowiki>'''bold'''</nowiki>'''; or use <b>&lt;b&gt;</b> or <strong>&lt;strong&gt;</strong> or {font-weight:bold} in a style attribute
<!-- <b><nowiki>''''</nowiki></b>''''bold and italic''''<b><nowiki>''''</nowiki></b> -->
 
* <small>small</small> or use {font-size:smaller} in a style attribute
* <big>big</big> or use {font-size:larger} in a style attribute (invalid in HTML5)
* <sup>sup</sup> or use {vertical-align:super} in a style attribute
* <sub>sub</sub> or use {vertical-align:sub} in a style attribute
<!--
Here is a footnote.<ref>Insert footnote text here.</ref>
Here is a recallable footnote.<ref name="foo">Recallable footnote.</ref>; now let's recall it.<ref name="foo" />
References: {{reflist}}
-->
 
* &lt;font> is deprecated; use {font-size:10pt; color:red; font-family:"Courier"} in a style attribute
* <nowiki><span style="</nowiki><span style="color:gray">color:gray</span>"&gt;
* <nowiki><span style="</nowiki><span style="color:white; background:red;">color:white; background:red</span>"&gt;
* <u>u</u> or use <ins>ins</ins> or {text-decoration:underline} in a style attribute (&lt;u> is valid in HTML5 but not HTML4/strict; &lt;ins> can also be a block element)
* <s>s</s> or use <del>del</del> or {text-decoration:line-through} in a style attribute (&lt;s> is valid in HTML5 but not HTML4/strict; &lt;del> can also be a block element)
<!-- <strike> also works, but is deprecated -->
 
* <code>code</code> uses {font-family:monospace;} (&lt;tt> is invalid in HTML5)
*: <code><var>markup</var> and &rarr; entities are still honored</code>
* <kbd> and <samp> and <q> and <dfn> are not processed by this wiki
 
* <var>var</var>
* <cite>cite</cite>
* <nowiki>{{Hint|</nowiki>{{Hint|term|explanation}}<nowiki>|explanation}}</nowiki>
* <nowiki>{{Path|</nowiki>{{Path|/a/path/name}}<nowiki>}}</nowiki>
* {{Lb}}Key| {{Key|Ctrl}}{{Rb}}+{{Lb}}Key| {{Key|C}}{{Rb}}
 
 
=== Links ===
 
Here is <nowiki>[[Wiki pagetitle|a wiki page]]</nowiki>: [[Wiki pagetitle|a wiki page]]. Text immediately suffixing the link will be incorporated into the link text; separate with &lt;nowiki /> to suppress.
 
TODO: Pkg
 
Here is an [http://bugs.alpinelinux.org/ Alpine Issue] link <nowiki>{{Issue|279}}</nowiki>: {{Issue|279}}. The issue's description can be included as an optional second argument.
 
Here is <nowiki>[http://www.example.org/ an external link]</nowiki>: [http://www.example.org/ an external link]. If no link text is supplied: [http:///www.example.org]. Omit brackets for http://www.example.org/<nowiki /> (use &lt;nowiki> to suppress). <!-- This wiki's server can be specified using <nowiki>{{SERVERNAME}}</nowiki>. -->
 
<nowiki>[mailto:</nowiki>[mailto:info@example.org info@example.org]<nowiki>?Subject=URL%20Encoded%20Subject&body=Body%20Text info]</nowiki>.
 
In Talk pages, <nowiki>-- ~~~~</nowiki> gives a signature and timestamp: -- [[User:Dubiousjim|Dubiousjim]] 10:00, 4 March 2012 (UTC)
 
<!--
In general when pointing to Alpine Linux downloads stick with the '''[[Downloads|Downloads Page]]''', but if you for any reason need to include direct download information, do so by using one of below.
 
==== Download Links ====
*<code><nowiki>{{#latestalp:alpine|url}}</nowiki></code> will give you latest download url for Alpine Linux Standard:<br/>
:{{#latestalp:alpine|url}}
*<code><nowiki>{{#latestalp:alpine-mini|url}}</nowiki></code> will give you latest download url for Alpine Linux mini:<br/>
:{{#latestalp:alpine|url}}
<big>'''Example:'''</big><br/>
Start from <nowiki>[{{#latestalp:alpine|url}}</nowiki> Downloading latest Alpine Linux Standard], than continue ...
'''produces:'''<br/>
Start from [{{#latestalp:alpine|url}} Downloading latest Alpine Linux Standard], than continue ...
 
==== Download Boxes ====
{| cellspacing="3"
|- valign="top"
|width="33%" class="ClassForFutureCSS" |
<div style="padding: .4em .9em .1em">
<p style="text-align:center"><code><nowiki>{{Download|alpine}}</nowiki></code></p>
For standard</div>
|width="33%" class="ClassForFutureCSS" |
<div style="padding: .4em .9em .1em">
<p style="text-align:center"><code><nowiki>{{Download|alpine-mini}}</nowiki></code></p>
For mini</div>
|width="33%" class="ClassForFutureCSS" |
<div style="padding: .4em .9em .1em">
<p style="text-align:center"><code><nowiki>{{DownloadDev|alpine}}</nowiki></code></p>
For standard</div>
|- valign="top"
| <div style="padding: .4em .9em .9em"><center>{{Download|alpine}}</center></div>
| <div style="padding: .4em .9em .9em"><center>{{Download|alpine-mini}}</center></div>
| <div style="padding: .4em .9em .9em"><center>{{DownloadDev|alpine}}</center></div>
|}
-->
 
== Headings ==
 
Start headings at level 2, and don't skip levels.
 
<pre>== Heading2 ==</pre>
will produce:
<h2>Heading2</h2>
 
<pre>=== Heading3 ===</pre>
will produce:
<h3>Heading3</h3>
 
<pre>==== Heading4 ====</pre>
will produce:
<h4>Heading4</h4>
 
 
<pre>{{Delete|Message.}}</nowiki>
will produce:
{{subst:Delete|Message.}}
 
<pre>{{Obsolete|Alternate message.}}</nowiki>
will produce:
{{subst:Obsolete|Alternate message.}}
 
<pre>{{Merge|Page to merge with|Additional message.}}</pre>
will produce:
<center>
{|style="width: 48em; padding:2px; margin:0; margin-bottom:10px; background-color:#f6f6f6; border:1px solid #aaa; -moz-border-radius-bottomright: 0.5em; -moz-border-radius-bottomleft: 1em; border-radius-bottomright: 0.5em; border-radius-bottomleft: 1em; -webkit-border-bottom-right-radius: 0.5em; -webkit-border-bottom-left-radius: 1em;"
|<div style="font-size: 1.5em; font-weight:bold; text-align:center;"> [[Image:Tango-two-arrows.png‎|75px|left|link=]] This material is proposed for merging ... </div><p style="text-align: center; font-size: 87%;">It should be merged with [[Page to merge with]].{{Ifn|Additional message.| Additional message.}}
([[{{TALKPAGENAME}}|Discuss]])</p>
|}</center>
 
<pre>{{Move|New page name|Reason.}}</pre>
will produce:
<center>
{|style="width: 48em; padding:2px; margin:0; margin-bottom:10px; background-color:#f6f6f6; border:1px solid #aaa; -moz-border-radius-bottomright: 0.5em; -moz-border-radius-bottomleft: 1em; border-radius-bottomright: 0.5em; border-radius-bottomleft: 1em; -webkit-border-bottom-right-radius: 0.5em; -webkit-border-bottom-left-radius: 1em;"
|<div style="font-size: 1.5em; font-weight:bold; text-align:center;"> [[Image:Tango-go-next.png‎|48px|left|link=]] This page is proposed for moving ... </div><p style="text-align: center; font-size: 87%;">It should be renamed to [[New page name]]. Reason.
([[{{TALKPAGENAME}}|Discuss]])</p>
|}</center>
 
<pre>{{Draft|Alternate message.}}</pre>
will produce:
<center>
{|style="width: 48em; padding:2px; margin:0; margin-bottom:10px; background-color:#f6f6f6; border:1px solid #aaa; -moz-border-radius-bottomright: 0.5em; -moz-border-radius-bottomleft: 1em; border-radius-bottomright: 0.5em; border-radius-bottomleft: 1em; -webkit-border-bottom-right-radius: 0.5em; -webkit-border-bottom-left-radius: 1em;"
|<div style="font-size: 1.5em; font-weight:bold; text-align:center;"> [[Image:Underconstruction_clock_icon_gray.svg‎|64px|left|link=]] This material is work-in-progress ... </div><p style="text-align: center; font-size: 87%;">Alternate message. <i>(Last edited by
{{REVISIONUSER}} on {{REVISIONDAY}} {{Month|{{REVISIONMONTH}}}} {{REVISIONYEAR}}.)</i></p>
|}</center>
 
<pre>{{Expand|Alternate message.}}</pre>
will produce:
<center>
{|style="width: 48em; padding:2px; margin:0; margin-bottom:10px; background-color:#f6f6f6; border:1px solid #aaa; -moz-border-radius-bottomright: 0.5em; -moz-border-radius-bottomleft: 1em; border-radius-bottomright: 0.5em; border-radius-bottomleft: 1em; -webkit-border-bottom-right-radius: 0.5em; -webkit-border-bottom-left-radius: 1em;"
|<div style="font-size: 1.5em; font-weight:bold; text-align:center;"> [[Image:Tango-view-fullscreen.png‎|48px|left|link=]] This material needs expanding ... </div><p style="text-align: center; font-size: 87%;">Alternate message.</p>
|}</center>
 
 
 
== Block elements ==
 
{{Draft|}}
 
 
{{Cmd|{{lb}}[[Template:Cmd|Cmd]]{{!}}a &lt;var><var>command</var>&lt;/var> to try{{rb}}
--- essentially, this is block-level <kbd> (which is ignored) }}
 
 
{{Cat|/path/file|{{lb}}Cat{{!}}/path/file{{!}}body{{rb}} '''text''' <br /> more
Second line.
 
You must escape characters as follows:
  {{=}} not inside [[..]] use &amp;#61; or {{lb}}{{=}}{{rb}}
  {{!}} not inside [[..]] use &amp;#124; or {{lb}}!{{rb}}
  {{lb}}                  use &amp;#123; twice or {{lb}}lb{{rb}}
  {{rb}}                  use &amp;#125; twice or {{lb}}rb{{rb}}
  unmatched &#91;&#91;        use &amp;#91; twice
  unmatched &#93;&#93;        use &amp;#93; twice
}}
 
 
 
&lt;nowiki> <nowiki> converts &rarr; entities and collapses whitespace </nowiki>(even multiple <code>\n</code>s),<nowiki>
but ignores all '''wiki''' and <span style="color:green">HTML</span> [[markup]]</nowiki>.
 
<div style="white-space:pre; font-family:monospace;">
HTML's &lt;pre> uses {white-space:pre; font-family:monospace;}
To wrap to screen width, use &lt;pre style="white-space:pre-wrap">
</div>
 
In wiki, one leading space displays as block element, in monospace, doesn't collapse whitespace.
Converts &rarr; entities and honors '''wiki''' and <span style="color:green">HTML</span> [[markup]].
? Can contain any inline element except: IMG OBJECT BIG SMALL SUP SUB
--- essentially, this and &lt;pre> are block-level <samp> (which is ignored), or a &lt;code> snippet
whereas {{lb}}Cat{{rb}} is mainly intended to display a whole file.
A session script, with prompts and stdout, should be formatted like this (or with &lt;pre>) instead of
using {{lb}}Cmd{{rb}}.
 
<pre>
In wiki, <pre> displays as block element, in monospace, doesn't collapse whitespace.
Otherwise like &lt;nowiki>: it converts &rarr; 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 &lt;/nowiki>)
</pre>
 
: <nowiki>: </nowiki>Simply indented text (on left side only).
 
<blockquote>This is &lt;blockquote>.
Collapses whitespace, and indents on both sides.</blockquote>
 
# 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.
 
<p style="white-space:pre; font-family:monospace;">
<nowiki>;item : Body text</nowiki>
</p>
or <nowiki>{{Define|item|Body text}}</nowiki> produce:
;item : Body text
 
 
<!--
    <center> deprecated
    use <div class="center" style="width:auto; margin-left:auto; margin-right:auto;">Centered text</div>
-->
 
<!-- this extension not present
<math>
\sum_{n=0}\infty\frac{x^n}{n!}
</math>
-->
 
 
{{Box|Heading:|<nowiki>{{Box|Heading:|Body}}</nowiki>}}
{{Box|Heading:|<nowiki>{{Box|Heading:|Body then border-color then background-color|#DF0000|#FFDFDF}}</nowiki>|#DF0000|#FFDFDF}}
{{Tip|<nowiki>{{Tip|Write your Tip here.}}</nowiki>}}
{{Note|<nowiki>{{Note|Write your Note here.}}</nowiki>}}
{{Warning|<nowiki>{{Warning|Write your Warning here.}}</nowiki>}}
{{Todo|<nowiki>{{Todo|Write your Todo here.}}</nowiki>}}
 
 
== Tables ==
 
{{Draft|}}
 
<pre>
{|  border="1" style="width:75%; height:200px"  <!-- align=right makes table float -->
|+ The table's caption
|-
! width=100px | columnlabel 1
! columnlabel 2 !! columnlabel 3
|-
! rowlabel1
| Cell 1 || Cell 2 || Cell 3
|- style="height:100px; background:none" <!-- or style="background:transparent" -->
| align=right style="width:200px" | Cell A
| style="background:red; color:white" | Cell B
| colspan=2 align=center | Cell C
|- valign=top <!-- have to be applied to every row, default is valign=middle; or use style="vertical-align:top;" -->
| rowspan=2 Cell D
| ...
|}
</pre>
 
 
See also:
* http://www.mediawiki.org/wiki/Help:Tables
* http://meta.wikimedia.org/wiki/Help:Table
 
<!--
    <table>
        <caption>
        <th>
        <tr>
        <td>
-->
 
 
== Images ==
 
{{Draft|}}
 
<nowiki>[[File:Alpinelinux 01.png|right|thumb|100px|Caption text]]</nowiki> gives:
 
[[File:Alpinelinux 01.png|right|thumb|100px|Caption text]]
 
Options can appear in any order:
* <i>Caption text</i> defaults to filename; to wholly suppress, use <code>&lt;span title="">&lt;/span></code>
* '''alt='''<i>text</i>
* Size can be [<i>width</i>][<b>x</b><i>height</i>]<b>px</b>
* '''page='''<i>number</i>, 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 <nowiki>{{Clear}}</nowiki> <!-- <code>&lt;br style="clear:both" /></code> --> before the text that should start below the floating image
** '''link='''<i>URL</i>|<i>pagetitle</i>|<i>blank</i>, only for inline images
* rendered floating, defaults to right align, Caption displayed below image: '''thumb''', '''thumb='''<i>alternate filename</i>, '''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
* http://www.mediawiki.org/wiki/Help:Images
* http://www.mediawiki.org/wiki/Help:Managing_files
* http://meta.wikimedia.org/wiki/Help:Navigational_image
 
 
 
== Other ==
 
 
Every page should be assigned at least one [[Special:Categories|Category]], by placing the following '''at the bottom of the page''':
<pre>[[Category:Category name]]</pre>
 
To '''link to''' a Category page, without adding the linking page to the category: <nowiki>[[:Category:Not in this category]]</nowiki>
 
 
A redirect page should contain only:
<pre>#REDIRECT [[pagename]]</pre>
 
 
FIXME
 
Here is one line, followed by &lt;br /><br />
and another line.
 
Here is &lt;!-- a comment -->.
 
HR like this<br />
<nowiki>----</nowiki>
----
&nbsp;
 
 
 
== See also ==
 
* [[Alpine Linux Wiki templates|Wiki templates]].
* http://www.mediawiki.org/wiki/Help:Formatting
* http://meta.wikimedia.org/wiki/Help:HTML_in_wikitext
* http://en.wikipedia.org/wiki/Help:HTML_in_wikitext
* http://en.wikipedia.org/wiki/Help:Wiki_markup
 
There may be small divergences, but in general, ours seems to be just a standard MediaWiki installation.
 
[[Category:Wiki]]

Latest revision as of 12:19, 24 March 2012

Redirect to: