Difference between revisions of "Help:Text formatting"
(New page: MediaWiki '''Formatting''' is the technique of transforming text in articles. For example, making text '''bold''', ''italics'', or '''''bold italics'''''. A comprehensive tutorial follows....) |
Rudra1101001 (talk | contribs) m (The end tags begin with forward slashes.) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
====Bold, Italics==== | ====Bold, Italics==== | ||
The following code will give you '''bold''' text: | The following code will give you '''bold''' text: | ||
− | <nowiki> | + | <nowiki>[b]BOLD TEXT GOES HERE[/b]</nowiki> |
As you can see, three apostrophes the text gives you the desired format. | As you can see, three apostrophes the text gives you the desired format. | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
The following code will give you ''italic'' text: | The following code will give you ''italic'' text: | ||
− | <nowiki> | + | <nowiki>[i]ITALIC TEXT GOES HERE[/i]</nowiki> |
Here, two apostrophes are required. | Here, two apostrophes are required. | ||
<br /> | <br /> | ||
Line 15: | Line 15: | ||
These two formatting tricks can be combined to make '''''bold italic text''''', like so: | These two formatting tricks can be combined to make '''''bold italic text''''', like so: | ||
<nowiki>'''''BOLD AND ITALICS'''''</nowiki> | <nowiki>'''''BOLD AND ITALICS'''''</nowiki> | ||
+ | |||
====Headers==== | ====Headers==== | ||
To create a header, surround the text you wish to make a header with a number of equals signs. <br /> | To create a header, surround the text you wish to make a header with a number of equals signs. <br /> | ||
Line 155: | Line 156: | ||
[http://URL_OF_PAGE_HERE TEXT TO DISPLAY HERE] <br /> | [http://URL_OF_PAGE_HERE TEXT TO DISPLAY HERE] <br /> | ||
This concludes our article on basic text formatting. To learn about even more complex text formatting, it is recommended you read the Wikipedia articles. | This concludes our article on basic text formatting. To learn about even more complex text formatting, it is recommended you read the Wikipedia articles. | ||
+ | |||
+ | {{tutorial}} |
Latest revision as of 17:47, 25 June 2022
MediaWiki Formatting is the technique of transforming text in articles. For example, making text bold, italics, or bold italics. A comprehensive tutorial follows.
Contents
Text Formatting
Simple Text Formatting
Bold, Italics
The following code will give you bold text:
[b]BOLD TEXT GOES HERE[/b]
As you can see, three apostrophes the text gives you the desired format.
The following code will give you italic text:
[i]ITALIC TEXT GOES HERE[/i]
Here, two apostrophes are required.
These two formatting tricks can be combined to make bold italic text, like so:
'''''BOLD AND ITALICS'''''
Headers
To create a header, surround the text you wish to make a header with a number of equals signs.
Here are the six types of headers:
=Header 1= ==Header 2== ===Header 3=== ====Header 4==== =====Header 5===== ======Header 6======
Results in:
Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
If you have more than four headers in a page, a table of contents box listing the headers appears at the top.
More Complex Text Formatting
Boxes and Unformatting
To achieve a grey box with mono type text like the ones above, simply put a space before the line(s) you wish to place in the box, like so:
Whee, what fun!
And an example of multiple lines:
First. Second! Third?
Note that this does not stop any code in the boxes from being parsed.
i.e.
This text is still bold, though it's in a box
To prevent parsing, you must do this:
<nowiki>NON FORMATTED TEXT AND ANYTHING ELSE HERE</nowiki>
This removes all wiki formatting from the contained text.
Lists
Lists are a group of items that are, as the name implies, listed one by one on separate lines. There are two types of lists: ordered and unordered.
Ordered Lists
Each item in an ordered list is preceded by it's number in the list. To create an ordered list, simply insert the symbol # before each list item.
Example:
#This is number 1. #Two! #Three! #Four. #Five. Yawn... #etc...
Results in:
- This is number 1.
- Two!
- Three!
- Four.
- Five. Yawn...
- etc...
Unordered Lists
Each item in an unordered list is preceded by a small box. To create an unordered list, insert a * before each list item.
Example:
*This is unordered. *Oh, the chaos! *Pretty nice.
Results in:
- This is unordered.
- Oh, the chaos!
- Pretty nice.
Nested Lists
You can also nest both ordered and unordered lists.
This is how to do it:
*Cool. *Yeah. **Hey, it's a sub item! **This is great. ***Yup. ****It is. ***Really? **Of course. *Okay. #You can do that for numbered lists too. #Yup. ##It works. ##Yay! ###w00t! #Hurray!
Results in:
- Cool.
- Yeah.
- Hey, it's a sub item!
- This is great.
- Yup.
- It is.
- Really?
- Yup.
- Of course.
- Okay.
- You can do that for numbered lists too.
- Yup.
- It works.
- Yay!
- w00t!
- Hurray!
There is also a way to nest ordinary text, namely, to place the a colon (:) before the nested text.
Hi. :Nest! ::Double nest! :::Triple nest!
Results in:
Hi.
- Nest!
- Double nest!
- Triple nest!
- Double nest!
Links
Internal Links
To turn text into an internal link (i.e. a link to a page within the wiki), you format the text as follows:
[[FULL NAME OF ARTICLE HERE]]
This would link to the article FULL NAME OF ARTICLE HERE.
To link to an article but display text other than the article name, you format as follows:
[[FULL NAME OF ARTICLE HERE|TEXT TO DISPLAY HERE]]
This results in:
TEXT TO DISPLAY HERE
If a link that you post is colored red, it means the article does not exist yet.
External Links
To turn text into an external link (i.e. a link to a page outside the wiki), you format the text as follows:
[URL_OF_PAGE_HERE]
Note that there can not be any spaces in the URL.
To link to a website but display text other than the website's URL, you format as follows:
[http://URL_OF_PAGE_HERE TEXT TO DISPLAY HERE]
Note the space between the url of the page and the text to display. The above results in:
TEXT TO DISPLAY HERE
This concludes our article on basic text formatting. To learn about even more complex text formatting, it is recommended you read the Wikipedia articles.
This article is a tutorial about the AoPSWiki or AoPS Forum.