Help:Wikitext: Difference between revisions
Content deleted Content added
Caleb Cooper (talk | contribs) |
Caleb Cooper (talk | contribs) |
||
| (6 intermediate revisions by the same user not shown) | |||
Line 1,506:
They are specified by putting the template's name in <nowiki>{{double braces}}</nowiki>. Most templates are pages in the [[wikipedia:WP:Template namespace|Template namespace]], but it is possible to transclude mainspace pages (articles) by using <nowiki>{{:colon and double braces}}</nowiki>.
There are three pairs of [[Wikipedia:html element|tags]] that can be used in [[Wikipedia:wikitext|wikitext]] to control how transclusion affects parts of a template or article.
They determine whether or not wikitext renders, either in its own article, which we will call "'''here'''", or in another article where it is transcluded, which we will call "'''there'''".
* '''<nowiki><noinclude></nowiki>: ''' the content '''will not be rendered ''there'''''. These tags have no effect ''here''.
* '''<nowiki><includeonly></nowiki>: ''' the content '''will render only ''there''''', and '''will not render ''here''''' (like [[Wikipedia:invisible ink|invisible ink]] made visible by means of transclusion).
* '''<nowiki><onlyinclude></nowiki>: ''' the content '''will render ''here''''' and '''will render ''there''''', but it will only render ''there'' what is between these tags.
There can be several such section "[[Wikipedia:HTML#Elements|elements]]". Also, they can be nested. All possible renderings are achievable. For example, to render ''there'' one or more sections of the page ''here'' use '''<nowiki><onlyinclude></nowiki>''' tags. To append text ''there'', wrap the addition in '''<nowiki><includeonly></nowiki>''' tags before, within, or after the section. To omit portions of the section, nest '''<nowiki><noinclude></nowiki>''' tags within it.
Line 1,878:
{{anchor|NOWIKI}}
{{redirect|wikipedia:WP:NOWIKI|the essay about the name "Wiki"|Wikipedia:Don't abbreviate "Wikipedia" as "Wiki"!}}
In order for the software to interpret wiki markup, its parser first scans the page. When it sees its nowiki tags
:{{tag|nowiki}} ([[Wikipedia:escape character|escape]]s all contained wiki markup), and
:{{tag|nowiki|s}} (escapes the interpretations it is designed to "break"),
it escapes its wikicode, so editors can document its markup ''using'' its markup.
Line 1,901 ⟶ 1,900:
<nowiki /># Ordered list
|<nowiki>A [[micro-]]second.</nowiki>
|A [[Wikipedia:micro-|micro-]]second.
|<nowiki>A [[micro-]]<nowiki />second.</nowiki>
|A [[Wikipedia:micro-|micro-]]<nowiki />second.
|<nowiki>a<nowiki>
Line 1,926 ⟶ 1,925:
:{{ ''pagename'' <nowiki />| {{ ''pagename'' }<nowiki />} }}
Unless you use the two "balanced" nowiki tags, troubleshooting [[Wikipedia:help:strip markers|strip marker]] errors and template parameter-handling inconsistencies is a risk. Also, a rendering error may arise when two <kbd>[<nowiki />[...]]</kbd> square brackets are on the same line, or two <kbd>{<nowiki />{...}}</kbd> curly brackets are in the same section, but only when the two have the nowiki markup placed inconsistently.
====Displaying wikilinks====
Line 1,997 ⟶ 1,996:
====Displaying magic words====
{{Further|Wikipedia:Help:Magic words|Wikipedia:Help:Parser function}}
For input '''parameters''', {{{1}}}, {{{2}}}, just write them out, unless they have a default (which goes behind their pipe):
Line 2,133 ⟶ 2,132:
==Invisible text (comments)==
{{see also|Wikipedia:Help:Hidden text|l1=Hidden text}}
It's uncommon{{spaced ndash}}but on occasion acceptable for notes to other editors{{spaced ndash}}to add a hidden comment within the text of an article. These comments are visible only when editing or viewing the source of a page. Most comments should go on the appropriate [[Wikipedia:Talk page|Talk page]]. <!-- This is an example of text that is not visible except in "edit" mode. --> The format is to surround the hidden text with "<code><!--</code>" and "<code>--></code>" and may cover several lines, e.g.:
Line 2,243 ⟶ 2,242:
{{main|Help:HTML in wikitext}}
Many [[Wikipedia:HTML]] tags can be used in wiki markup. You can check your HTML by using [[Wikipedia:Help:Markup validation|markup validation]].
==Notes==
| |||