LQWiki:Wiki markup
Creating new pages
You can create an entirely New page in the Wiki by simply enclosing a piece of text with a pair of double square brackets. For a new blank page to be created though, the text must not refer to an existing page name. (If it does, then a link will be created to that page). An example: To create a new page about the mathematician, Turing, simply enclose the word Turing in a pair of double square brackets in your sentence ie:
This markup: | Produces: |
---|---|
Albert [[Einstein]] was a great mathematician. |
Albert Einstein was a great mathematician. |
(Now simply click on the new red link, and you're presented with a blank page ready for adding content to)
Creating links
Creating links to pages in the LQ Wiki
You can link to other pages in this Wiki by simply enclosing a piece of text with a pair of double square brackets - for a link to be created though, the text you enclose must match an existing page name.
This markup: | Produces: |
---|---|
[[Debian]] |
And for page names which contain underscores ie Main_Page
This markup: | Produces: |
---|---|
[[Main Page]] |
You can blend endings into links like below:
This markup: | Produces: |
---|---|
[[hard drive]]s |
Creating links to specific sections within a page
You can create a link to a section on the same page by using this general markup:
[[#Header name|Descriptive text]]
This markup: | Produces: |
---|---|
[[#Creating bold text|bold text]] |
You can create a link to a specific section on a different page by using this general markup:
[[Page name#Header name|Descriptive text]]
This markup: | Produces: |
---|---|
[[XFree86#Monitors|Monitor section]] |
Creating links to pages in a different Namespace
If a page is in a different Namespace, make sure you qualify it with the "name" of the Namespace itself.
This markup: | Produces: |
---|---|
[[Special:Popularpages]] |
Creating links to a Category
If a page is in a different Namespace, make sure you qualify it with the "name" of the Namespace itself.
This markup: | Produces: |
---|---|
[[:Category:Guides]] |
Creating links with the Pipe symbol
You can use the pipe (|) symbol to create a link which uses your own custom text, instead of the actual target page name.
This markup: | Produces: |
---|---|
[[Mandrake|User friendly distribution]] |
(You can see in the example above how you can refer to the actual page name, with your own choice of custom text)
Creating external links
You can format external links using a variety of methods. Here are some ways to link to the LQ homepage:
The URL on its own:
This markup: | Produces: |
---|---|
http://www.linuxquestions.org |
To format the link as a "footnote", enclose the URL with single brackets:
This markup: | Produces: |
---|---|
[http://www.linuxquestions.org] |
To format the link using "custom text", put the (URL then a space then the custom text) in single brackets:
This markup: | Produces: |
---|---|
[http://www.linuxquestions.org LinuxQuestions] |
Creating sections and subsections
Sections can be used to both, organize blocks of text, and to indicate their position/level within a larger structure - each section title will also appear in a nested format in a Table of Contents.
To create a section, simply enclose a piece of text at either end with the same number of equals signs - The number of equals signs, determines the type of section.
This markup: | Produces: |
---|---|
==A section header== |
A section headerA subsection headerA sub-subsection header |
(You can see in the example above how the number of equals signs alters both the size and type of section heading)
Enhancing your text
Creating horizontal lines
You can create a horizontal line by simply putting 4 dashes on an empty line.
This markup: | Produces: |
---|---|
Your text above line |
Your text above line Your text below line |
(It provides a neat way to divide up sections and also to aid clarity on Talk pages)
Creating line breaks
To create a line break simply use this markup:
<br>
in a line/sentence.
This markup: | Produces: |
---|---|
This sentence can contain a break <br> and continue on the next line. |
This sentence can contain a break |
Creating centered text
To center text on a page simply enclose it with:
<center> </center>
This markup: | Produces: |
---|---|
<center>This text will be centered</center> |
|
Creating bold text
To make a piece of text, into bold text, simply enclose it at either end with 3 apostrophes.
This markup: | Produces: |
---|---|
'''Making text bold''' |
Making text bold |
Creating italic text
To make a piece of text, into Italics, simply enclose it at either end with 2 apostrophes.
This markup: | Produces: |
---|---|
''Transforming text into Italics'' |
Transforming text into Italics |
Creating small text
You can transform part of a sentence into Small text by simply enclosing it with:
<small> </small>
This markup: | Produces: |
---|---|
Part of this sentence <small> will be transformed into small text</small> - useful for captions. |
Part of this sentence will be transformed into small text - useful for captions. |
(You might need to temporarily increase the text size in your Web-browser to see the contrast between normal text and Small text - don't worry, it is there!)
Creating text with special fonts
You can transform the font of a piece of text into the typewriter font by enclosing it with:
<tt> </tt>
This markup: | Produces: |
---|---|
The font in <tt>part of this sentence will change to the typewriter font</tt> - useful for emphasizing technical passages. |
The font in part of this sentence will change to the typewriter font - useful for emphasizing technical passages. |
NB - a space at the beginning of a line will create monospaced text i.e
This line has a space at the beginning of it.
Creating superscripts
You can create Superscripts by simply enclosing a piece of text with:
<sup> </sup>
This markup: | Produces: |
---|---|
a<sup>2</sup> |
a2 |
Creating subscripts
You can create Subscripts by simply enclosing a piece of text with:
<sub> </sub>
This markup: | Produces: |
---|---|
x<sub>n</sub> |
xn |
Creating comments
You can put Comments in your Wiki markup by simply enclosing a piece of text with:
<!-- -->
This markup: | Produces: |
---|---|
<!--This comment won't appear on the page --> |
(Can you see how nothing has appeared in the right-hand box on this page after the transformation - this is what we want - the comment is still in the markup, behind the scenes, but doesn't show on this visible page)
Bullets & numbering
Bullets
To make a piece of text into bulleted text, simply add asterisks to the left of the text - the number of asterisks to the left determines the bullet level.
This markup: | Produces: |
---|---|
*Text bulleted at level one |
|
Numbered lists
To transform a list into a numbered list simply add a hash character to the left of every item in the list.
This markup: | Produces: |
---|---|
#First item in list |
|
Indented numbered lists
Numbered lists can also be indented. The number of hash characters to the left of an item, determines the indent level - within each indent level the numbering 1,2,3...n, corresponds to how many items are in the list at that level.
This markup: | Produces: |
---|---|
#Red |
|
You can see how the number of hash characters to the left of an item determines its indent level - for example, 2 hash characters creates a 2nd indent level item, also that the number of items in the list at that level determines the numbering - for example - 3 items in the list at "level 2" creates the numbering 1,2,3 for that indent level.
Mixed bullets & numbering
You can mix the numbers and bullets - note that the #'s and *'s are counted together. The sum of both determines the level.
This markup: | Produces: |
---|---|
*I am a level one bullet |
|
Creating indents
Using the Colon to indent
You can use a series of colons to indent passages of text/characters etc - the number of colons to the left of a passage determines the indent level.
This markup: | Produces: |
---|---|
:This piece of text will be indented once because there's 1 colon. |
|
Using the semicolon to indent
You can also use the semicolon ( ; ) for a different kind of indent:
This markup: | Produces: |
---|---|
; I am not indented : I am |
|
Talk pages
You can use a combination of simple pieces of markup to aid clarity/consistency in the Talk pages. Two common ones are the Horizontal dividing line and the use of Tildes to sign your comments.
Horizontal dividing line
You can create a horizontal line by simply putting 4 dashes on an empty line like this:
This markup: | Produces: |
---|---|
---- |
|
Signatures (Username/Date/Time)
To sign your Username simply put 3 Tildes on an empty line like this:
~~~
And for your Username plus the date and time, put 4 Tildes on an empty line like this:
~~~~
(left out transformation in this example because author's Username isn't relevant)
Tables
Here we show how to create a sortable table.
This input:
{| class="wikitable sortable" border=1 ! col1 !! col2 !! col3 |- | field1 || field2 || field3 |- | ZZZ || AAA || MMM |- |}
Produces:
col1 | col2 | col3 |
---|---|---|
field1 | field2 | field3 |
ZZZ | AAA | MMM |
Sample code
You can copy and paste code samples into the page with:
<tt><CODE><PRE>
your code - can include '&' and '<' signs
</PRE></CODE></tt>
... and you don't need to 'escape' any < and & signs
What doesn't work
Posting images with [[Image:imagefile.png]] does not work.
- See Pictures section.
See also
- Sandbox - You can use the Sandbox for testing your Wiki markup.