|
|
Line 1: |
Line 1: |
− | {{NoSubpage}}
| + | #REDIRECT [[Help:Compact Guide for Editors/First edit#Wikitext basics]] |
− | {{Translation in progress|1=July 18, 2024, 11:15 AM|progress=93%|source=[[zhmoe:Help:萌百编辑简明指南/wikitext语法基础]]}}
| |
− | {{Help:Compact guide/tab}}
| |
− | When editing Moegirlpedia, we often need to implement various effects through wikitext or HTML syntax. The most basic are here for you to memorize and review, however you don't have to master them all at once, and can always come back and review the unfamiliar parts. You can choose to bookmark this chapter for later use. As a reminder, the help button in the editor is also useful.
| |
− | | |
− | === Introductory markup ===
| |
− | {| class="wikitable"
| |
− | !colspan="3" |Basic Wikitext font syntax
| |
− | |-
| |
− | ! Description
| |
− | ! What you type
| |
− | ! What you get
| |
− | |-
| |
− | | Italic
| |
− | | <nowiki>''Italic''</nowiki>
| |
− | | ''Italic''
| |
− | |-
| |
− | | Bold
| |
− | | <nowiki>'''Bold'''</nowiki>
| |
− | | '''Bold'''
| |
− | |-
| |
− | | Bold & Italic
| |
− | | <nowiki>'''''Bold & Italic'''''</nowiki>
| |
− | | '''''Bold & Italic'''''
| |
− | |}
| |
− | | |
− | {| class="wikitable"
| |
− | !colspan="3" |Elementary wikitext and HTML syntax
| |
− | |-
| |
− | | Start a new paragraph
| |
− | | class="mw-code" | ''(Press "Enter" twice)''
| |
− | | Paragraph 1
| |
− | | |
− | Paragraph 2
| |
− | |-
| |
− | | Start a new line
| |
− | | class="mw-code" | <nowiki><br></nowiki>
| |
− | | Line 1<br>Line 2
| |
− | |-
| |
− | | Strikethrough
| |
− | | class="mw-code" | <nowiki><s>Flat-tan</s></nowiki>
| |
− | | <span style="text-decoration:line-through;">Flat-tan</span>
| |
− | |-
| |
− | | Reference
| |
− | | class="mw-code" | <nowiki><ref>Moegirlpe-tan</ref></nowiki>
| |
− | | Flat-tan<ref>Moegirlpe-tan</ref><br><references />
| |
− | |-
| |
− | | <code><nowiki><poem></poem></nowiki></code> | Keep source formatting, that is, keep extra spaces and line breaks (used when enclountering poems, songs, and large sections of texts that need to be typeset). '''Not for usual text in an article'''.
| |
− | | <nowiki><poem></poem></nowiki>
| |
− | |
| |
− | |-
| |
− | | Show code
| |
− | | class="mw-code" | <pre>Display a piece of Wiki or HTML code. Also used to display certain characters that have special meaning in Wiki code or HTML.</pre> | <nowiki><nowiki></nowiki></nowiki> or<br><nowiki><pre></pre></nowiki> or<br><nowiki><code></code></nowiki><ref group=a>The combination <nowiki><code><nowiki></nowiki></nowiki><nowiki></code></nowiki> is often used to show formatted code.</ref>
| |
− | |-
| |
− | ! colspan="3" style="font-weight: initial; text-align: initial; font-size: smaller;" |
| |
− | <references group="a" />
| |
− | |}
| |
− | | |
− | === Links ===
| |
− | {| class="wikitable"
| |
− | ! colspan="3" |Baski wikitext link syntax
| |
− | |-
| |
− | | Internal link
| |
− | | <nowiki>[[Moegirlpe-tan]]</nowiki><br><nowiki>[[Moegirlpe-tan|Flat-tan]]</nowiki><br><nowiki>[[Moegirlpe-tan#Character settings]]</nowiki><ref group=b>If there are more than one of the same title, add an ordinal number to link to the specified one. For example, if there are 3 headings in a page named "Sample heading" and you want to jump to the third one, use <nowiki>[[#Sample heading 3]]</nowiki>.</ref><br><nowiki>[[MGP:About|]]</nowiki><ref group=b>Not effective in references.</ref>
| |
− | | [[Moegirlpe-tan]]<br>[[Moegirlpe-tan|Flat-tan]]<br>[[Moegirlpe-tan#Character settings]]<br>[[MGP:About|About]]
| |
− | |-
| |
− | | External link
| |
− | | <nowiki>[https://zh.moegirl.org.cn]</nowiki>
| |
− | |-
| |
− | | External link within the site
| |
− | | <nowiki>[https://zh.moegirl.org.cn Chinese Moegirlpedia]</nowiki>
| |
− | | [https://zh.moegirl.org.cn]<br>[https://zh.moegirl.org.cn Chinese Moegirlpedia]
| |
− | |-
| |
− | |Page paragraph title
| |
− | |If the paragraph title does not exist, the link will jump to the top of the page. [b 1]
| |
− | | |
− | | |
− | | |
− | If there are multiple identical titles, add a sequence number to link to the specific title. (For example: If there are 3 titles on a page all titled "Example Title" and you want to jump to the third one, use [[#Example Title 3]].)
| |
− | |<code></nowiki>[[animation#Introduction]]
| |
− | [[#Chapter&Subsection]]</nowiki></code>
| |
− | |[[animation#Introduction]]
| |
− | [[#Chapter&Subsection]]
| |
− | |-
| |
− | |Specify displayed text
| |
− | | |
− | Use the pipe symbol " | " to create a label link
| |
− | |<code></nowiki>[[Touhou Project|Touhou]]</nowiki></code>
| |
− | |[[Touhou Project|Touhou]]
| |
− | |-
| |
− | |"Empty" pipe character
| |
− | | |
− | To hide extra characters, leave blank after the pipe symbol | and the server will automatically fill in the link label.
| |
− | | |
− | Note that it does not have any effect in <code><nowiki><ref></ref></nowiki></code>.
| |
− | |<code><nowiki>[[Land of the Lustrous:Phosphophyllite|]]<br>
| |
− | [[StarOcean (Luo Tianyi)|]]</nowiki></code>
| |
− | |<code><nowiki>[[Land of the Lustrous:Phosphophyllite|]]<br>
| |
− | [[StarOcean (Luo Tianyi)|]]</nowiki></code>
| |
− | |-
| |
− | | Redirect
| |
− | |<nowiki>#Redirect [[Page name]]</nowiki>
| |
− | |
| |
− | |-
| |
− | | Link to a category
| |
− | |<nowiki>[[Category:Help]]</nowiki>
| |
− | |
| |
− | |-
| |
− | | Cite a category
| |
− | |<nowiki>[[:Category:Help]]</nowiki><ref group =b>Note the colon leftmost.</ref>
| |
− | |[[:Category:Help]]
| |
− | |-
| |
− | | Interwiki link<ref group = b>You can link to other wikis including our sister project, Wikipedia, etc., see [[Special:Interwiki]] for details.</ref>
| |
− | |<nowiki>[[library:Mainpage]]</nowiki><br><nowiki>[[commons:Mainpage]]</nowiki><br><nowiki>[[zhwp:萌娘百科]]</nowiki> <small>(Interwiki link to the article "Moegirlpedia" on Chinese Wikipedia)</small>
| |
− | |[[library:Mainpage]]<br>[[commons:Mainpage]]<br>[[zhwp:萌娘百科]]
| |
− | |-
| |
− | ! colspan="3" style="font-weight: initial; text-align: initial; font-size: smaller;" |
| |
− | <references group="b" />
| |
− | |}
| |
− | | |
− | === Headings, lists and discussion ===
| |
− | {| class="wikitable" border="1" cellpadding="2" cellspacing="0"
| |
− | ! Description and display
| |
− | ! What you get
| |
− | |-
| |
− | | ====Heading====
| |
− | ----
| |
− | == 2nd level heading ==
| |
− | === 3rd level heading ===
| |
− | ==== 4th level heading ====
| |
− | ===== 5th level heading =====
| |
− | ====== 6th level heading ======
| |
− | |
| |
− | <nowiki>== 2nd level heading ==</nowiki><br><nowiki>=== 3rd level heading ===</nowiki><br><nowiki>==== 4th level heading ====</nowiki><br><nowiki>===== 5th level heading =====</nowiki><br><nowiki>====== 6th level heading ======</nowiki>
| |
− | |-
| |
− | |New line
| |
− | ----
| |
− | <p>A single newline has little effect when displayed.</p>
| |
− | <p>but a blank line</p>
| |
− | <p>will start a new paragraph,</p>
| |
− | <p>Either end a list or indent.</p>
| |
− | ----
| |
− | * The semicolon at the beginning of the line will not be displayed, but there will be a line break effect.
| |
− | **The colon in this line will not be displayed, but it will have the effect of line wrapping and indentation.
| |
− | *Wrapping the text directily can improve the readability of the text.
| |
− | **But it could cause more trouble in the future.
| |
− | *When using a list, line breaks will affect the display output.
| |
− | |<pre>-{}-
| |
− | <p>A single newline has little effect when displayed.</p>
| |
− | <p>but a blank line</p>
| |
− | <p>will start a new paragraph,</p>
| |
− | <p>Either end a list or indent.</p>
| |
− | </pre>
| |
− | |-
| |
− | | Unordered (bulleted) list
| |
− | ----
| |
− | <nowiki>* Add asterisks before content.</nowiki><br><nowiki>** Number indicates its level.</nowiki><br><nowiki>You can break it up.</nowiki><br><nowiki>* And then start over.</nowiki>
| |
− | |
| |
− | * Add asterisks before content.
| |
− | ** Number indicates its level.
| |
− | You can break it up.
| |
− | * And then start over.
| |
− | |-
| |
− | | Ordered (numbered) list
| |
− | ----
| |
− | <nowiki># Replace asterisks with number signs.</nowiki><br><nowiki>## Content will be automatically numbered.</nowiki><br><nowiki>After you break it up.</nowiki><br><nowiki># It starts from one again.</nowiki>
| |
− | |
| |
− | # Replace asterisks with number signs.
| |
− | ## Content will be automatically numbered.
| |
− | After you break it up.
| |
− | # It starts from one again.
| |
− | |-
| |
− | |Mixed list
| |
− | ----
| |
− | * You can even do mixed lists
| |
− | *# Just nest it
| |
− | *#* or line break<br>
| |
− | |<pre>-{}-* You can even do mixed lists
| |
− | *# Just nest it
| |
− | *#* or line break<br></pre>
| |
− | |-
| |
− | | Definition list
| |
− | ----
| |
− | ; Semicolons before terms,
| |
− | : colons before descriptions.
| |
− | ; One row per item,
| |
− | : a colon can follow a space.
| |
− | |<pre>-{}-; Semicolons before terms,</nowiki><br><nowiki>: colons before descriptions.</nowiki><br><nowiki>; One row per item,</nowiki><br><nowiki>: a colon can follow a space.
| |
− | </pre>
| |
− | |-
| |
− | | Indent
| |
− | ----
| |
− | : Replace asterisks with colons,
| |
− | :: Add one colon to reply.
| |
− | :: Same to its every paragraph.
| |
− | ::: Until someone replies to you.
| |
− | ----
| |
− | * Often used on talk pages and [[Talk:Discussion board|discussion board]].
| |
− | * It's actually the description of the definition list above, so if a paragraph starts with a semicolon, the text after the first colon in it will be in the next row indented, even if the colon is not at the beginning of the row.
| |
− | | <pre>-{}-: Replace asterisks with colons.</nowiki><br><nowiki>:: Add one colon to reply.</nowiki><br><nowiki>:: Same to its every paragraph.</nowiki><br><nowiki>::: Until someone replies to you.</pre>
| |
− | |-
| |
− | |Bold paragraph
| |
− | ----
| |
− | ; Make an entire paragraph bold.
| |
− | A new line starts a new paragraph.
| |
− | ----
| |
− | * Often used for short paragraphs (sometimes even a sentence), as a convenience compared to regular bolding.
| |
− | * In essence, it is the definition part of the above #definition table, relying on the CSS of MediaWiki skin to implement bolding.
| |
− | |<nowiki>; Make an entire paragraph bold.
| |
− | A new line starts a new paragraph.</nowiki>
| |
− | |-
| |
− | |Preformatted text
| |
− | ----
| |
− | If the start of a line is a space,
| |
− | then it will appear in its original form
| |
− | *;:#abc
| |
− | | |
− | == 1 ==
| |
− | {{Note}} But the internal '''wikitext''' will be parsed
| |
− | | |
− | <pre>-{}-
| |
− | * Can also be wrapped with pre tag
| |
− | * {{Note}} internal '''wikitext''' will not be parsed
| |
− | </pre>
| |
− | ----
| |
− | * It is usually displayed in a fixed-width font and retains all newlines, spaces and other whitespace characters, so it is more suitable for displaying code and other content.
| |
− | | |
− | * In the syntax with a space at the beginning of the line, the internal wikitext will be parsed (except for the syntax that requires a top space), as if <code>{{Note}}</code> it is parsed into "{{Note}}" and <code><nowiki>'''wikitext'''</nowiki></code> displayed in bold.
| |
− | | |
− | * In <code><pre></code>, all wikitext syntax in the text will not be parsed. This is why the source code can be displayed in the right column of this table.
| |
− | | |
− | Depending on whether the internal wikitext needs to be parsed, select the leading space syntax or <code><pre></code>. Usually used <code><pre></code>.
| |
− | |<pre>-{}-If the start of a line is a space
| |
− | , then it will appear in its original form
| |
− | *;:#abc
| |
− | == 1 ==
| |
− | {{Note}} But the internal '''wikitext''' will be parsed
| |
− | | |
− | <pre>-{}-
| |
− | * Can also be wrapped with pre tag
| |
− | * {{Note}} internal '''wikitext''' will not be parsed
| |
− | <pre>
| |
− | </pre>
| |
− | |-
| |
− | | Center
| |
− | | |
− | ----
| |
− | <nowiki><center>Moegirlpe-tan</center></nowiki>
| |
− | |
| |
− | <center>Moegirlpe-tan</center>
| |
− | |-
| |
− | | Dividing line
| |
− | ----
| |
− | <nowiki>----</nowiki>
| |
− | |
| |
− | ----
| |
− | |-
| |
− | | Signature
| |
− | ----
| |
− | <nowiki>--~~~~</nowiki>
| |
− | |
| |
− | |-
| |
− | ! colspan="3" style="font-weight: initial; text-align: initial; font-size: smaller;" |
| |
− | <references group="c" />
| |
− | |}
| |
− | | |
− | <center>{{Clickable Button|bgcolor=#A5E4A5|Help:Compact Guide for Editors/Template basics|Click me to learn template basics!}}</center>
| |
− | | |
− | [[Category:Help]]
| |