Help:Editing: Difference between revisions

ArrowHead294 (talk | contribs)
m Fix double redirect
 
(14 intermediate revisions by one other user not shown)
Line 1: Line 1:
Wikis should be easy to edit, so most text you add or change will appear as you expect it. But you can do more if you want.
Wikis should be easy to edit, so most text you add or change will appear as you expect it. But you can do more if you want.


[https://wikiindex.org/Xenharmonic_Wiki This wiki] is currently in [https://wikiindex.org/Category:ConfirmEmail ConfirmEmail mode] after the move from Wikispaces to a MediaWiki-based installation (the edit mode may change again some time). For editing or adding information to the wiki, you have to join it. See [[How to Get Your Xenwiki Account]] for more!
[https://wikiindex.org/Xenharmonic_Wiki This wiki] is currently in [https://wikiindex.org/Category:ConfirmEmail ConfirmEmail mode] after the move from Wikispaces to a MediaWiki-based installation (the edit mode may change again some time). For editing or adding information to the wiki, you have to join it. See [[Help:How to get your Xenharmonic Wiki account]] for more!


== Using links ==
== Using links ==
Line 48: Line 48:
Some typographic markup can easy be added by including the phrase in doubled <code><nowiki>''</nowiki></code> or tripled <code><nowiki>'''</nowiki></code> (apostrophe chars):
Some typographic markup can easy be added by including the phrase in doubled <code><nowiki>''</nowiki></code> or tripled <code><nowiki>'''</nowiki></code> (apostrophe chars):


* '''Bold''' using <code>{{'''}}bold{{'''}}</code>
* '''Bold''' using <code><nowiki>'''bold'''</nowiki></code>
* ''Italic'' using <code>{{''}}italic{{''}}</code>
* ''Italic'' using <code><nowiki>''italic''</nowiki></code>
* '''''Bold italic''''' using <code>{{'''}}{{''}}bold italic{{''}}{{'''}}</code>
* '''''Bold italic''''' using <code><nowiki>'''''bold italic'''''</nowiki></code>


=== Preformatted text ===
=== Preformatted text ===
Line 65: Line 65:
<!-- Comment -->
<!-- Comment -->


[[Wiki]] markup &amp;
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</pre>
</syntaxhighlight>
</syntaxhighlight>
Line 74: Line 74:
<!-- Comment -->
<!-- Comment -->


[[Wiki]] markup &amp;
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</pre>


It is also possible to use Wiki markup within a <code><<nowiki />pre></code> tag, and have it actually be interpreted as markup instead of being escaped. This can be done using a [[wikipedia:Help:Wikitext#Pre|self-closing {{plaincode|<<nowiki />includeonly>}} tag]], as follows:
It is also possible to use Wiki markup within <code><<nowiki />pre></code> tags, and have it actually be interpreted as markup instead of being escaped. This can be done by inserting an <code>includeonly</code> directive in the opening tag, as <code style="white-space: nowrap;">&lt;includeonly /&gt;</code> or (as seen on Wikipedia and many other sites) <code style="white-space: nowrap;">&lt;includeonly&gt;&lt;/includeonly&gt;</code>, as follows:


<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
Line 83: Line 83:
<!-- Comment -->
<!-- Comment -->


[[Wiki]] markup &amp;
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</pre>
</syntaxhighlight>
</syntaxhighlight>
Line 92: Line 92:
<!-- Comment -->
<!-- Comment -->


[[Wiki]] markup &amp;
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</pre>
The <code><<nowiki />pre></code> tag also accepts styling, just like other HTML elements. Here, if you use the aformentioned <code>includeonly</code> directive, the styling should come after the directive:
<syntaxhighlight lang="wikitext">
<pre<includeonly /> style="color: blue;">
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</syntaxhighlight>
gives
<pre<includeonly /> style="color: blue;">
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
==== Syntax highlighting ====
[[mw:extension:SyntaxHighlight|Syntax highlighting]] is a feature to display source code in different colors and fonts to indicate the structure to readers. Wrap the desired code between <code><<nowiki />syntaxhighlight></code> tags and input the desired programming language using the <code>lang</code> parameter in the opening tag. Unlike in <code><<nowiki />code></code> and <code><<nowiki />pre></code> tags, everything is escaped.
For example:
{{#tag: syntaxhighlight
|{{^(}}syntaxhighlight lang="wikitext"{{)^}}
{{^(}}!-- Comment --{{)^}}
[[Wiki]] markup &amp; '''bold''' ''italic'' text
{{^(}}/syntaxhighlight{{)^}}
|lang = wikitext
}}
gives
<syntaxhighlight lang="wikitext">
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</syntaxhighlight>


=== Lists ===
=== Lists ===
Line 140: Line 179:
|-
|-
! You write<br />in [[Help:Wikitext editor|wikitext]]
! You write<br />in [[Help:Wikitext editor|wikitext]]
| <pre style="border: none;">
| style="border-right: none;" |
<pre>
{| class="wikitable"
{| class="wikitable"
|+ Caption
|+ Caption text
|-
|-
! Head A
! Head A
Line 163: Line 203:
| Cell B4
| Cell B4
| Cell C4
| Cell C4
|}</pre>
|}
| <pre style="border: none;">
</pre>
| style="border-left: none; border-right: none;" | or
| style="border-left: none;" |
<pre>
{| class="wikitable"
{| class="wikitable"
|+ Caption
|+ Caption text
|-
|-
! Head A !! Head B !! Head C
! Head A !! Head B !! Head C
Line 177: Line 220:
|-
|-
| Cell A4 || Cell B4 || Cell C4
| Cell A4 || Cell B4 || Cell C4
|}</pre>
|}
</pre>
|-
|-
! You get<br />(rendered)
! You get<br />(rendered)
<!-- Begin result -->
<!-- Begin result -->
| colspan="2" |  
| colspan="3" | {{(!}} class{{=}}"wikitable" style{{=}}"margin: 20px auto 20px auto;"
{{(!}} class{{=}}"wikitable" style{{=}}"margin: 20px auto 20px auto;"
{{!+}} Caption text
{{!+}} Caption
{{!-}}
{{!-}}
! Head A !! Head B !! Head C
! Head A !! Head B !! Head C
Line 198: Line 241:
|}
|}


You can also copy some cells from a spreadsheet and paste them into the xenwiki visual editor, and a table will automatically be created!
You can also copy some cells from a spreadsheet and paste them into the [[mw:Extension:VisualEditor|visual editor]], and a table will automatically be created. Though, users should be aware that the resulting Wiki markup generated by the visual editor is often poorly formatted (e.g. without spaces that would otherwise make it easier to read).


==== Horizontal alignment of column content ====
==== Horizontal alignment of column content ====