Help:Editing: Difference between revisions

Xenwolf (talk | contribs)
updated to current situation - at least tried to ;)
m Fix double redirect
 
(97 intermediate revisions by 11 users not shown)
Line 1: Line 1:
__FORCETOC__
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.


This wiki is currently in [https://wikiindex.org/Category:LoginToEdit login-to-edit mode] after the move from [[Wikispaces]] to MediaWiki-based installation (the edit mode may change again some time). For editing or adding information to the wiki, you have to join the wiki. 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 ==
What you always have dreamed of (for your paper notes) - in a wiki it becomes true: fast links!
: ''Shortcut: [[Help: Links]]''
What you always have dreamed of (for your paper notes)—in a wiki it becomes true: fast links!


If you enclose a word in double brackets (like <code><nowiki>[[word]]</nowiki></code>), you get an internal link, hopefully to an already existing page - if not, it appears red, and you just created the opportunity for your co-authors to add the details. If you want a text differing from the link target, you can place it after a pipe symbol: <code><nowiki>[[word|different text]]</nowiki></code>.  
=== Internal links ===
If you enclose a word in double brackets (like <code><nowiki>[[word]]</nowiki></code>), you get an internal link, hopefully to an already existing page&mdash;if not, it appears red, and you just created the opportunity for your co-authors to add the details. If you want a text differing from the link target, you can place it after a pipe symbol: <code><nowiki>[[word|different text]]</nowiki></code>.  


=== Linking to sections ===
You may link to sections in the same page by using the section title with the prefix <code>#</code>. MediaWiki automatically converts it into a link with the correct anchor identifier. For example to link to the beginning of this section use <code><nowiki>[[#Using links]]</nowiki></code> (rendered as [[#Using links]]) or with changed text <code><nowiki>[[#Using links|top of this section]]</nowiki></code> (rendered as [[#Using links|top of this section]]).
=== Interwiki links ===
Links to some wikis are supported by placing a specific wiki alias and a colon (<code>:</code>) to the common in-wiki link syntax: <code><nowiki>[[otherwiki: name there]]</nowiki></code> as a prefix, for example, <code><nowiki>[[Wikipedia: Microtonal music]]</nowiki></code> gets rendered as [[Wikipedia: Microtonal music]]. Although this features is named "interwiki", is also includes some services that are definitively not wiki-like, for instance a google search can as well be embedded in wiki syntax: <code><nowiki>[[Google: 159edo]]</nowiki></code> (rendered as: [[Google: 159edo]]) The sites currently supported are managed in [[Special:Interwiki]]. A space after the prefix doesn't change the effect but looks better.
=== External links ===
For external links, simply place the URL into the text, certain protocols (http, https, mailto) will be automatically transformed into links. For alternate text, use single brackets, start with the URL and after a space enter the title, like so <code><nowiki>[http://acid3.acidtests.org the Acid3 test]</nowiki></code> which renders to [http://acid3.acidtests.org the Acid3 test].
For external links, simply place the URL into the text, certain protocols (http, https, mailto) will be automatically transformed into links. For alternate text, use single brackets, start with the URL and after a space enter the title, like so <code><nowiki>[http://acid3.acidtests.org the Acid3 test]</nowiki></code> which renders to [http://acid3.acidtests.org the Acid3 test].


=== Link text ===
=== Link text ===
''tbd''
The link text should ideally relate to the link target, try to avoid "[[help:here-links|here]]" links. There is an interesting extension for Firefox, [https://addons.mozilla.org/de/firefox/addon/url2clipboard/ Copy URL To Clipboard], that does automatic formatting of page URL and page title in MediaWiki syntax into the clipboard.


The link text should relate to the link target, don't use "[[help:here-links|here]]".
=== Redirects ===
Redirects can be [[#Regular redirect|regular]] or [[#Smart redirect|"smart"]] (definition redirect).  


=== Redirects ===
==== Regular redirect ====
There are 3 types of redirects: soft redirect, regular redirect and hard redirect.  
A regular redirect is performed by <code><nowiki>#REDIRECT [[Page title]]</nowiki></code>.
 
Redirects can be used to join alternative names (titles, ({{w|Headword|"lemmata"}}) for the same thing to reduce duplication.
 
Redirects are also useful to directly link into sections (especially if they have the potential to grow to an article in future).


A "soft redirect" or "smart redirect" is just an ordinary page with the text "See XYZ.", where XYZ is a link to the target of the smart redirect. A smart redirect should not point to another smart redirect - if you see this you should fix it by shortcutting past the second one and making the first redirect point directly to the ultimate target.
Redirects to redirects should be fixed by skipping intermediate targets. The page [[Special:DoubleRedirects]] can be used to detect them.


A regular redirect is performed by <code><nowiki>#REDIRECT [[Page title]]</nowiki></code>. A double redirect should be fixed by the same method as above, or by replacing it with a hard redirect. Regular redirects did not exist in <code>wikispaces</code>. This kind of redirect displays a small information message when it was used to display the current page.
==== Smart redirect ====
A "smart redirect" is a page that has a small definition of a term with a link to a broader presentation of the corresponding area. Don't forget to categorize such a page by placing <code><nowiki>[[Category:Smart redirect]]</nowiki></code> at its end.


Real or "hard" redirects directly go to the target page without a notice of redirect. Therefore, they should only be used in the case of simple misspellings or alternate spellings. The rule is that if anyone might ever want to flesh the redirect out into its own article, it should not be a hard redirect. Hard redirects can be chained with no problem, which is why they're still appropriate to use for misspellings. The code for a hard redirect in MediaWiki is <code><nowiki>#REDIRECT [[:en:Page title]]</nowiki></code>. Hard redirects worked somewhat differently in <code>wikispaces</code>; only admins could create or change them, and they could not redirect to a section.
A smart redirect should not point to another smart redirect.


see also
See [[:Category:Smart redirect]] for a list of pages tagged as smart redirect.


* http://groups.yahoo.com/neo/groups/tuning/conversations/topics/101227 - redirects were discussed on the [[tuning_list|tuning list]] in the [[Wikispaces]] era
==== Soft redirect ====
* [[:Category:soft redirect|list of pages tagged as soft redirect]] - pages that contain only see <tt>[[</tt><nowiki>''some other page''</nowiki><tt>]]</tt> (be cautious with other tags on these)
This kind of redirect has been eliminated and should not be used anymore. It was there for a historical reason: to overcome usability issues on Wikispaces (the former wiki platform): Editing redirects was restricted to administrators, so normal users could not expand a redirect page into a full article. (See also [https://yahootuninggroupsultimatebackup.github.io/tuning/topicId_101227.html Yahoo! Tuning Group] for the discussion on the tuning list)
* [[:Category:smart redirect|list of pages tagged as smart redirect]] - pages that have more information (a small definition, classification etc.)


== Text formatting ==
== Text formatting ==
=== Emphasis ===
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><nowiki>'''bold'''</nowiki></code>
* ''Italic'' using <code><nowiki>''italic''</nowiki></code>
* '''''Bold italic''''' using <code><nowiki>'''''bold italic'''''</nowiki></code>
=== Preformatted text ===
==== Code ====
<code><<nowiki />code></code> can be used to include small snippets of source code, variable names, or {{w|regex}}es within a line of normal text. All Wiki markup within is interpreted as markup except for text in <code>&lt;nowiki&gt;</code> tags.
==== Pre ====
<code><<nowiki />pre></code> tags define preformatted text that is displayed in a monospace font and enclosed in a dashed box. It doubles as both a parser tag and an HTML tag, since the parser will escape all HTML-like and wiki markup tags and preserve spaces and line breaks, but HTML elements are parsed.
For example:
<syntaxhighlight lang="wikitext">
<pre>
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</syntaxhighlight>
gives
<pre>
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
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:


=== Emphasis ===
<syntaxhighlight lang="wikitext">
Some typographic markup can easy be added by including the phrase in doubled <code>''</code> or tripled <code>'''</code> (apostrophe chars):
<pre<includeonly />>
<!-- Comment -->
 
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</syntaxhighlight>
 
gives
 
<pre<includeonly />>
<!-- Comment -->
 
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</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 -->


* ''italic'' using <nowiki>''italic''</nowiki>
[[Wiki]] markup &amp; '''bold''' ''italic'' text
* '''bold''' using <nowiki>'''bold'''</nowiki>
</syntaxhighlight>
* '''''bold italic''''' using <nowiki>'''''bold italic'''''</nowiki>


=== Lists ===
=== Lists ===
: ''See [[Help: List]] for advanced use cases.''
There are tree basic types of lists in HTML that are supported in MediaWiki markup: [[#unordered|unordered]] (or "bulleted") lists, [[#numbered|numbered]] lists, [[#description|description]] lists. Each type of lists can be created within wiki source code by just indicating the items at the beginning of the line (the list is automatically built around them). Each item has to start on a new line.
==== Unordered ====
Unordered list items are marked by <code>*</code> (asterisk):


You can create bulleted lists by one or more <code>*</code> (asterisk) chars at the beginning of the line:
* Coffee
* Wine
* Milk


* first level
==== Numbered ====
** second level
Numbered list items are marked by <code>#</code> (number sign):
** second level
* first level


You can create numbered lists by one or more <code>#</code> (number sign) at the beginning of the line:
# Coffee
# Wine
# Milk


# first level
==== Description ====
## second level
Description items are marked by <code>;</code> (semicolon) for term and <code>:</code> (colon) for the description, where <code>;</code> bolds the entire line and <code>:</code> indents the line:
## second level
# first level


...and you can of course mix both, if you know what you're doing ;)
; Coffee
: A brewed drink prepared from roasted coffee beans. (from: ''[[Wikipedia: Coffee]])


# first level
; Wine
#* second level
: An alcoholic beverage made from fermented grapes. (from: ''[[Wikipedia: Wine]]'')
#* second level
 
# first level
; Milk
: A white liquid nutrient-rich food produced by the mammary glands of mammals. (from: ''[[Wikipedia: Milk]]'')
 
==== Combined List Styles ====
# Morning
#* Coffee
#* Milk
# Evening
#* Coffee
#* Wine


=== Tables ===
=== Tables ===
: ''For advanced examples, see [[Help:Table]]''
You can add tables to wiki pages:
You can add tables to wiki pages:
{| class="wikitable"
{| class="wikitable"
! what you write
|-
|
! You write<br />in [[Help:Wikitext editor|wikitext]]
<nowiki>
| style="border-right: none;" |  
<pre>
{| class="wikitable"
{| class="wikitable"
|+ The Title
|+ Caption text
! column A
! column B
|-
|-
| cell A1
! Head A
| cell B1
! Head B
! Head C
|-
|-
| cell A2
| Cell A1
| cell B2
| Cell B1
|}</nowiki>
| Cell C1
|-
|-
! what you get
| Cell A2
|
| Cell B2
{| class="wikitable"
| Cell C2
|+ The Title
|-
! column A
| Cell A3
! column B
| Cell B3
|-
| Cell C3
| cell A1
|-
| cell B1
| Cell A4
|-
| Cell B4
| cell A2
| Cell C4
| cell B2
|}
|}
|}
 
</pre>
The table cells are left aligned by default, the heading cells are center aligned. You may change this via inline CSS style definitions:
| style="border-left: none; border-right: none;" | or
 
| style="border-left: none;" |
<pre>
{| class="wikitable"
{| class="wikitable"
! what you want for the cell
|+ Caption text
! what you do to get it
|-
|-
| left aligned text
! Head A !! Head B !! Head C
| nothing to do
|-
|-
| style="text-align:center;" | centered text
| Cell A1 || Cell B1 || Cell C1
| place <code><nowiki>style="text-align:center;" |</nowiki></code> after the opening pipe
|-
|-
| style="text-align:right;" | right aligned
| Cell A2 || Cell B2 || Cell C2
| place <code><nowiki>style="text-align:center;" |</nowiki></code> after the opening pipe
|-
|-
! headline style
| Cell A3 || Cell B3 || Cell C3
| exclamation mark instead of the pipe symbol starts the cell
|-
| Cell A4 || Cell B4 || Cell C4
|}
</pre>
|-
! You get<br />(rendered)
<!-- Begin result -->
| colspan="3" | {{(!}} class{{=}}"wikitable" style{{=}}"margin: 20px auto 20px auto;"
{{!+}} Caption text
{{!-}}
! Head A !! Head B !! Head C
{{!-}}
{{!}} Cell A1 {{!!}} Cell B1 {{!!}} Cell C1
{{!-}}
{{!}} Cell A2 {{!!}} Cell B2 {{!!}} Cell C2
{{!-}}
{{!}} Cell A3 {{!!}} Cell B3 {{!!}} Cell C3
{{!-}}
{{!}} Cell A4 {{!!}} Cell B4 {{!!}} Cell C4
{{!)}}
<!-- End result -->
|}
|}
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 ====
Text alignment can be an issue. The table default is cell text being left-alignened, but decimal numbers usually are right-aligned and common fractions center-aligned.
You may add inline [[CSS]] styling to '''each cell''' of the table (i.e. <code>style="text-align: right;"</code>), but this is a lot of work, makes the wiki markup confusing, and also makes pages really big which slows down loading.
It's now (by June 2020) possible to define the column alignment '''once in the table header'''. This can be done by adding further classes to the <code>class="wikitable"</code> statement.
For example, write <code>class="wikitable right-1 left-5 center-all"</code> to align the cell text to
* '''right''' in the '''1'''st column,
* '''left''' in the '''5'''th column, and
* '''center''' in '''all''' other columns.


=== Images ===
=== Images ===
Inserting a JPEG or PNG image is pretty straightforward - when using the visual page editor click the "File" button and upload the image. Or in Wikitext, use <code><nowiki>[[image:filename]]</nowiki></code>. SVG images are possible but require a bit more work; see [[SVG_images_on_wiki_pages|SVG images on wiki pages]] for details.
Inserting a JPEG, GIF, or PNG image is pretty straightforward when using the visual page editor, click the "File" button and upload the image. Or in Wikitext, use <code><nowiki>[[image:filename]]</nowiki></code> or <code><nowiki>[[file:filename]]</nowiki></code>. Also SVG images are supported (<code><nowiki>[[file:some.svg]]</nowiki></code>), they are automatically transformed into PNG images by the MediaWiki software, because not all Browsers come with native SVG support. A possible problem can arise when the image uses fonts that are not available on the wiki server. To prevent such errors, you can transform text into graphic objects before uploading the image here.


=== Maths formulas ===
=== Maths formulas ===
...can be used [http://en.wikipedia.org/wiki/Help:Displaying_a_formula like in the Wikipedia]: start it with <code><nowiki><math></nowiki></code> and end it with <code><nowiki></math></nowiki></code>. Take care: using the math tags will break paragraphs. See for example
can be used {{w|Help:Displaying a formula|like in Wikipedia}}. For inline math, start it with <code><nowiki><math></nowiki></code> and end it with <code><nowiki></math></nowiki></code>. For example: <math>V =\frac{4}{3} \pi r^3</math>. For display-style math, open and close the formulas with both <code><nowiki>$$</nowiki></code>; this will render it centered in a new line.
 
<math>V =\frac{4}{3} \pi r^3</math>


Here is a browser-based formula editor that may be helpful: http://www.codecogs.com/latex/eqneditor.php
Here is a browser-based formula editor that may be helpful: [https://editor.codecogs.com/ Equation Editor]


=== Table of contents ===
=== Table of contents ===
Place <code><nowiki>__TOC__</nowiki></code> where you wish to place the table of contents, mostly this will be at the top of the page.
Place <code><nowiki>__TOC__</nowiki></code> where you wish to place the table of contents, mostly this will be at the top of the page.


== Social aspects ==
=== Notes and references ===
In this wiki, you can use talk pages and user talk pages.  
A reference mark is added by <code><nowiki><ref></nowiki></code> and <code><nowiki></ref></nowiki></code> parenthesising the reference text.
 
The reference texts are shown in the bottom of the article by default; you can optionally insert <code><nowiki><references/></nowiki></code> where you wish to show them.
 
For footnotes, the practice is similar. Insert the text in the note itself between <code><nowiki><ref group="note"></nowiki></code> and <code><nowiki></ref></nowiki></code> and insert <code><nowiki><references group="note" /></nowiki></code> where you wish to show them.
 
Here is an example for a page with footnotes and references:
<pre>
== Notes ==
<references group="note" />
 
== References ==
<references />
</pre>
 
References can be reused throughout an article by giving then names. The first time this reference is used, type the full text of the note or reference between the tags (<code><nowiki><ref name="example1">Note 1</ref></nowiki></code>). If you want to reference <code>example1</code> multiple times in the same page, type <code><nowiki><ref name="example1" /></nowiki></code> on all subsequent instances.
 
== Article structure ==
* Articles should start with an introduction (summary, synopsis) that helps to get a basic understanding what it is about. Don't introduce another heading for the introduction – it's already provided by the h1 heading of the lemma itself.
* After this section (about one to five sentences), subheadings may follow to deepen the concept.
* The end of the article is typically for see-also suggestions and external links.
* After the last section (in wikitext: separated by an empty line) follow [[#categories|categories]] (in wikitext: each on a separate line).
 
== Subpages ==
{{Wikipedia|Wikipedia: Subpages}}
 
'''Subpages''' are pages whose title contains one or more slashes ("/"). In general, every subpage includes a breadcrumb link at the top, allowing the reader to navigate to the parent page (and further if there are multiple levels of subpages). However, the subpage feature is disabled in the main namespace, mainly to prevent rational interval pages (e.g. [[3/2]]) from incorrectly including a breadcrumb link to a nonexistent page.
 
Subpages can nonetheless be used in the main namespace in certain circumstances, such as:
* Splitting large sections; e.g. [[Color notation/Temperament names]]
* Splitting large tables or lists; e.g. [[17edo/Music]]
* Splitting personal approaches; e.g. [[22edo/Eliora's approach]]
 
In subpages, a link to the main page should be added manually, either in the page's first sentence, in a hatnote using [[Template:Main]], or by putting {{tlx|breadcrumb}} at the top of the page.
 
== Categories ==
Categories all serve different purposes: sometimes they say what something is or the context in which it belongs ([[:Category: Temperaments]], [[:Category: Intervals]]). Sometimes they are used for annotation purposes ([[:Category: Todo:add examples]]), etc. All these forms have in common is that they can combine wiki pages in a way that is independent of their authors.


If you want to discuss the wiki itself, do it on the page [[wikifuture]].
A category may have its own content (and category)
: ''See [https://en.xen.wiki/w/Special:AllPages?from=&to=&namespace=14 Pages in the namespace '''Category''']''
or not yet (despite being used to categorize other pages):
: ''See [[Special: WantedCategories]]''


=== Categories ===
Some more examples:
Categories all serve different purposes: sometimes they say what something is or the context in which it belongs ([[tag/view/edo|edo]], [[tag/view/interval|interval]]). Sometimes they are used for annotation purposes ([[tag/view/todo:reduce_mathslang|todo:reduce mathslang]]), etc. All these forms have in common is that they can combine wiki pages in a way that is independent of their authors.


You can look at the [[tag/list|list of used categories]] or link to particular categories using the prefix <tt>https://en.xen.wiki/w/Category:</tt>
* [[:Category: Todo:add definition]] – here a term needs to be defined
* [[:Category: Todo]] – category of categories that flag articles


Some tag examples:
== Social aspects ==
In this wiki, you can use talk pages and [[user talk]] pages.


<ul><li><span style="text-decoration: line-through;">[[tag/view/orphan_page|orphan page]]</span> - pages without ingoing links -&gt; [[space/pagelist/orphaned|http://xenharmonic.wikispaces.com/space/pagelist/orphaned]]</li><li>[[tag/view/todo:add_definition|todo:add definition]] - here a term needs to be defined</li></ul>
If you want to discuss the wiki itself, do it on the page [[wikifuture]].


=== Discussion ===
=== Discussion ===
Discussion pages are provided to each content page. Please keep in mind that the email notification to people who are observing the page cannot be taken back!
Discussion pages are provided to each content page. Please keep in mind that the email notification to people who are observing the page cannot be taken back!


Sometimes you will wait forever for a reply because nobody monitors the page or topic. In this case you should find out who is most familiar with the topic and ask that person directly. You can check the history of pages for its authors. Another approach is to ask questions on further media, examples are listed on the page [[GeneralDiscussion]].
Sometimes you will wait forever for a reply because nobody monitors the page or topic. In this case you should find out who is most familiar with the topic and ask that person directly. You can check the history of pages for its authors. Another approach is to ask questions on further media, examples are listed on the page [[General discussion]].
 
Sign your contributions to a Talk page by using two hyphens (<code>--</code>) (or an em dash (<code>—</code>), if you like) and four tildes (<code><nowiki>~~~~</nowiki></code>); the latter will be converted to your username and a time/date stamp upon submission.


== Links ==
== See also ==
* [[Halp:Help]]
* [[Xenharmonic Wiki: Conventions]]
* [[Conventions]]
* [[Xenharmonic Wiki: Article guidelines]]
* [[Help: Help]]
* [[Help: Visual editor]] – especially helpful for new users, that's why it's enabled by default


[[Category:help]]
[[Category:Help]]
[[Category:syntax]]
[[Category:wiki help]]