Difference between revisions of "Help:Editing advanced"
(→Limiting TOC depth) |
m (→More editing help) |
||
(33 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category: Wiki administration]] | ||
+ | [[Category:WikiStyleGuide]] | ||
{{nav}} | {{nav}} | ||
+ | |||
+ | As noted in "[[Add a page to the wiki]]", this documentation is a collaborative effort. You can contribute your experience by adding to what's already written or creating new pages. To learn how to create an account, see [[Contributing to LMCE]]. | ||
+ | |||
+ | This page will help you get started on your documentation efforts. | ||
+ | |||
+ | {{p}} | ||
==Editing an article== | ==Editing an article== | ||
Line 28: | Line 36: | ||
A section is removed by deleting a heading or a heading's tags, without affecting the content of the section. Removing a section's heading appends its contents to the previous section. The contents of the two are merged.<br> | A section is removed by deleting a heading or a heading's tags, without affecting the content of the section. Removing a section's heading appends its contents to the previous section. The contents of the two are merged.<br> | ||
To delete a section and remove all its contents, delete all the content along with the heading. | To delete a section and remove all its contents, delete all the content along with the heading. | ||
+ | |||
+ | {{p}} | ||
+ | |||
+ | == Writing comments that won't show == | ||
+ | <pre> | ||
+ | The text between '''here''' | ||
+ | <!-- comment here --> | ||
+ | '''and here''' won't be displayed | ||
+ | </pre> | ||
+ | |||
+ | When placed on a page, the above will produce:<br> | ||
+ | |||
+ | The text between '''here''' | ||
+ | <!-- comment here --> | ||
+ | '''and here''' won't be displayed | ||
+ | |||
+ | {{p}} | ||
+ | |||
+ | ==Formatting text== | ||
+ | === Wiki syntax === | ||
+ | In linguistics, syntax (from Ancient Greek σύνταξις "arrangement" from σύν syn, "together", and τάξις táxis, "an ordering") is the study of the principles and rules for constructing sentences in natural languages. | ||
+ | |||
+ | In addition to referring to the discipline, the term syntax is also used to refer directly to the '''rules and principles that govern the sentence structure of any individual language''', as in "the syntax of Modern Irish", and "the syntax of MediaWiki". | ||
+ | |||
+ | ...The term syntax is also sometimes used to refer to the rules governing the behavior of mathematical systems, such as logic, artificial formal languages, and computer programming languages[http://en.wikipedia.org/wiki/Syntax].<br> | ||
+ | |||
+ | In every section of this guide, you will find the syntax necessary to accomplish the task at hand. | ||
+ | |||
+ | For a list of syntactical items and other advanced editing help, see: <br> | ||
+ | |||
+ | <br> [http://www.textpattern.net/wiki/index.php?title=Help:MediaWiki_Syntax_Compared_to_Textile Help:MediaWiki Syntax Compared to Textile] | ||
+ | <br> | ||
+ | '''MediaWiki.org:''' <br> | ||
+ | [http://www.mediawiki.org/wiki/Help:Formatting Help:Formatting] <br> | ||
+ | [http://meta.wikimedia.org/wiki/Help:Wikitext_examples Help:Wikitext examples] <br> | ||
+ | |||
+ | |||
+ | {{p}} | ||
+ | |||
+ | === Sub/Superscript === | ||
+ | '''Superscript''': <nowiki> <sup> text to superscript </sup> </nowiki> produces: <sup> Superscript text </sup> <br> | ||
+ | '''Subscript''': <nowiki> <sub> text to superscript </sub> </nowiki> produces: <sub> Superscript text </sub> | ||
+ | |||
+ | |||
+ | === Typewriter font === | ||
+ | A '''<tt>typewriter font</tt>''' (<nowiki><tt> </tt></nowiki>), sometimes used for | ||
+ | technical terms and <code>computer code</code> (<nowiki><code> </code></nowiki>). | ||
+ | |||
+ | === Caption === | ||
+ | You can use <code><nowiki><small>small text</small></nowiki></code> | ||
+ | for captions: <small>small text</small>. | ||
+ | |||
+ | === Line break === | ||
+ | '''Line break''':<nowiki> <br> or </br> </nowiki>. Alternatively, you can use blank lines to separate paragraphs. | ||
+ | {{p}} | ||
+ | |||
+ | |||
+ | === Text box === | ||
+ | '''Text box''':<nowiki> <pre> </pre> </nowiki><br> | ||
+ | <pre>A text box looks like this </pre> | ||
+ | <br> <br> | ||
+ | |||
+ | === Table === | ||
+ | [http://meta.wikimedia.org/wiki/Tables#Row_template| From wikimedia manual]<br> | ||
+ | |||
+ | |||
+ | {|border=1 style="text-align:center;" cellspacing="5" cellpadding="2" | ||
+ | |+'''caption ''' | ||
+ | | | ||
+ | Col 1 | ||
+ | * line 1 | ||
+ | * line 2 | ||
+ | | | ||
+ | Col 2 | ||
+ | * line 1 | ||
+ | * line 2 | ||
+ | |||
+ | | style="valign: top; text-align: left; color: yellow; background-color: green;" | | ||
+ | Col 3 | ||
+ | |||
+ | * line 1 | ||
+ | * line 2 | ||
+ | |||
+ | |- | ||
+ | | next line | ||
+ | |} | ||
+ | |||
+ | Table: | ||
+ | <nowiki>{|border=1 style="border: 1px solid darkgray; background: transparent; color: black; text-align:center; width: 75%; height: 200px" cellspacing="5" cellpadding="2"</nowiki> | ||
+ | caption | ||
+ | <nowiki>|+align="bottom" |'''caption '''</nowiki> | ||
+ | heading | ||
+ | !width="50" | Column Name | ||
+ | ! !! !! | ||
+ | row | ||
+ | |- | ||
+ | row heading | ||
+ | |- | ||
+ | ! row heading | ||
+ | cell (defined one per line) | ||
+ | | | ||
+ | multiple cells (all defined on same line) | ||
+ | | || || | ||
+ | format | ||
+ | |format |cell content | ||
+ | |font-style:italic; | ||
+ | |style="float: right; background: red; color: white" valign="top" | cell content | ||
+ | | bgcolor="red" | <font color="white"> cell content </font> | ||
+ | |||
+ | By default data in tables is vertically centrally aligned | ||
+ | |||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" | ||
+ | |- | ||
+ | | Column 1 || Column 2 || Column 3 | ||
+ | |- | ||
+ | | rowspan="2" | A | ||
+ | | colspan="2" style="text-align: center;" | B | ||
+ | |- | ||
+ | | C <!-- column 1 occupied by cell A --> | ||
+ | | D | ||
+ | |- | ||
+ | | E | ||
+ | | rowspan="2" colspan="2" style="text-align: center;" | F | ||
+ | |- | ||
+ | | G <!-- column 2+3 occupied by cell F --> | ||
+ | |- | ||
+ | | colspan="3" style="text-align: center;" | H | ||
+ | |} | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | {| border="1" cellpadding="5" cellspacing="0" | ||
+ | |- | ||
+ | | Column 1 || Column 2 || Column 3 | ||
+ | |- | ||
+ | | rowspan="2" | A | ||
+ | | colspan="2" style="text-align: center;" | B | ||
+ | |- | ||
+ | | C <!-- column 1 occupied by cell A --> | ||
+ | | D | ||
+ | |- | ||
+ | | E | ||
+ | | rowspan="2" colspan="2" style="text-align: center;" | F | ||
+ | |- | ||
+ | | G <!-- column 2+3 occupied by cell F --> | ||
+ | |- | ||
+ | | colspan="3" style="text-align: center;" | H | ||
+ | |} | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | {|border=1 style="text-align:center;" cellspacing="5" cellpadding="2" | ||
+ | |+'''caption ''' | ||
+ | | | ||
+ | Col 1 | ||
+ | * line 1 | ||
+ | * line 2 | ||
+ | | | ||
+ | Col 2 | ||
+ | * line 1 | ||
+ | * line 2 | ||
+ | |||
+ | | style="valign: top; text-align: left; color: yellow; background-color: green;" | | ||
+ | Col 3 | ||
+ | |||
+ | * line 1 | ||
+ | * line 2 | ||
+ | |||
+ | |- | ||
+ | | next line | ||
+ | |} | ||
+ | </pre> | ||
+ | |||
+ | http://meta.wikimedia.org/wiki/Tables#Pipe_syntax_in_terms_of_the_HTML_produced | ||
+ | |||
+ | <pre> | ||
+ | |- | ||
+ | | valign="top"| | ||
+ | [[File:Drenthe-Position.png|thumb|left|150px|[[w:Drenthe|Drenthe]], the least crowded province]] | ||
+ | | valign="bottom"| | ||
+ | [[File:Flevoland-Position.png|thumb|left|100px|]] | ||
+ | </pre> | ||
+ | |||
+ | === Style === | ||
+ | You can also write | ||
+ | <span style="font-variant:small-caps"> | ||
+ | in small caps</span>. | ||
+ | <pre> | ||
+ | <span style="font-variant:small-caps"> | ||
+ | in small caps</span> | ||
+ | </pre> | ||
+ | |||
+ | This CSS example sets color and font size information for the text in a specific paragraph. | ||
+ | |||
+ | <P style="font-size: 12pt; color: fuchsia">Aren't style sheets wonderful? | ||
+ | <pre> | ||
+ | <P style="font-size: 12pt; color: fuchsia">Aren't style sheets wonderful? | ||
+ | </pre> | ||
+ | {{p}} | ||
+ | |||
+ | ==== Colors ==== | ||
+ | You can color a text by placing it between <span style="color:Red;"> </span> tags. In this example, the color is red. Below is a list containing other colors you can use. Simply copy a line, and type the text you want to color between the ">" and the "</span>". | ||
+ | |||
+ | {| border="1" cellpadding="5" cellspacing="0" | ||
+ | |- | ||
+ | | | ||
+ | #00FFFF Aqua | ||
+ | #000000 Black | ||
+ | #0000FF Blue | ||
+ | #FF00FF Fuchsia | ||
+ | #808080 Gray | ||
+ | #008000 Green | ||
+ | #00FF00 Lime | ||
+ | #800000 Maroon | ||
+ | #000080 Navy | ||
+ | #808000 Olive | ||
+ | #800080 Purple | ||
+ | #FF0000 Red | ||
+ | #C0C0C0 Silver | ||
+ | #008080 Teal | ||
+ | #FFFFFF White | ||
+ | #FFFF00 Yellow | ||
+ | || | ||
+ | <span style="color:Aqua;"><nowiki> <span style="color:Aqua;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Black;"><nowiki> <span style="color:Black;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Blue;"><nowiki> <span style="color:Blue;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Fuchsia;"><nowiki> <span style="color:Fuchsia;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Gray;"><nowiki> <span style="color:Gray;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Green;"><nowiki> <span style="color:Green;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Lime;"><nowiki> <span style="color:Lime;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Maroon;"><nowiki> <span style="color:Maroon;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Navy;"><nowiki> <span style="color:Navy;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Olive;"><nowiki> <span style="color:Olive;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Purple;"><nowiki> <span style="color:Purple;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Red;"><nowiki> <span style="color:Red;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Silver;"><nowiki> <span style="color:Silver;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Teal;"><nowiki> <span style="color:Teal;"> </span></nowiki> </span><br> | ||
+ | <span style="color:Yellow;"><nowiki> <span style="color:Yellow;"> </span></nowiki> </span><br> | ||
+ | <div style="background-color:#e0e0e0; border-style: ridge; border-color: #bbb; padding:0px 15px 0px 15px;"> | ||
+ | <nowiki> <span style="color:White;"> </span></nowiki> </div> | ||
+ | <span style="color:brown;"><nowiki> <span style="color:brown;"> </span></nowiki> </span><br> | ||
+ | |} | ||
+ | |||
+ | {{p}} | ||
+ | |||
+ | == Creating hyperlinks == | ||
+ | See [[help:hyperlinks|hyperlinks]] | ||
+ | |||
+ | {{p}} | ||
+ | |||
+ | == Inserting a picture == | ||
+ | #Start by uploading the picture. <br> | ||
+ | #Reference the file: to include a file in a page, use a link in one of the following forms: | ||
+ | * <nowiki>[[File:Picture.jpg]]</nowiki> will display the full version of the file | ||
+ | * <nowiki>[[File:Image.png|200px|thumb|left|caption text]]</nowiki> will display a the image in a box in the left margin with ''caption text'' as description and the image width re-sized to 200 pixels. | ||
+ | * <nowiki>[[Media:File.ogg]]</nowiki> will create a link to the file without displaying it. | ||
+ | |||
+ | === Picture insertion syntax === | ||
+ | <div style="background-color:#ADD8E6; border-style: ridge; border-color: #bbb; padding:0px 15px 15px 15px;"><br> | ||
+ | ::<nowiki>[[File:Picture.jpg]]</nowiki> | ||
+ | |||
+ | ::<nowiki>[[File:Image.png|200px|thumb|left|caption text]]</nowiki><br> | ||
+ | </div> | ||
+ | |||
+ | {{p}} | ||
+ | |||
+ | == Working with templates == | ||
+ | Templates are page sections that can inserted on any other page by using the wiki syntax: <code><nowiki>{{template name}}</nowiki></code> <br> | ||
+ | To insert the content of an existing template on the page that you are editing, replace the words "template name" in the example above with the name of the template that contain the content you want to insert. <br> | ||
+ | The standard templates used in this wiki are listed [[LinuxMCE wiki:Community Portal#Handy templates|here]]. | ||
+ | |||
+ | {{p}} | ||
+ | |||
+ | == Placing a document in the table of contents == | ||
+ | See [[:Help:Article categories|Article categories]]. | ||
+ | |||
+ | {{p}} | ||
+ | |||
+ | == More editing help == | ||
+ | See [[:Help:Editing|Editing]]. | ||
+ | |||
+ | |||
+ | |||
+ | '''MediaWiki.org:''' <br> | ||
+ | [http://www.mediawiki.org/wiki/Help:Contents Help:Contents] <br> | ||
+ | [http://www.mediawiki.org/wiki/Help:Formatting Help:Formatting] <br> | ||
+ | |||
+ | |||
+ | '''MediaWiki Handbook:''' (meta.wikimedia.org) <br> | ||
+ | [http://meta.wikimedia.org/wiki/Help:Editing Help:Editing] <br> | ||
+ | [http://meta.wikimedia.org/wiki/Help:Wikitext_examples Help:Wikitext examples] <br> | ||
+ | |||
+ | |||
{{p}} | {{p}} |
Latest revision as of 09:51, 22 June 2013
As noted in "Add a page to the wiki", this documentation is a collaborative effort. You can contribute your experience by adding to what's already written or creating new pages. To learn how to create an account, see Contributing to LMCE.
This page will help you get started on your documentation efforts.
Contents
Editing an article
An editable article page has a [Edit] tab on top of the page which can be used to enter editing mode for the whole article.
Creating sections in an article
The section heading syntax is the double equal (==) tag.
To create a section, simply add its title within a pair of double equals ( == Title of The Section == ) with nothing else on the line.
Inserting a new section
Inserting a section can be done by editing either the section before or after it. A new section is created anywhere a line starts and ends with a section tag (equal signs).
Subsections
Each additional "=" corresponds to a subsection.
- == for section
- === for subsection
- ==== for sub-subsection
- === for subsection
Editing a section
Any section of an article is editable by clicking on the [edit] link that is at the end of the line the section title is on. To make changes to the section, click the [Edit] link.
Subsections are included in the part of the section that is edited.
"__NOEDITSECTION__" anywhere on the page will remove the edit links.
Deleting or merging a section
A section is removed by deleting a heading or a heading's tags, without affecting the content of the section. Removing a section's heading appends its contents to the previous section. The contents of the two are merged.
To delete a section and remove all its contents, delete all the content along with the heading.
Writing comments that won't show
The text between '''here''' <!-- comment here --> '''and here''' won't be displayed
When placed on a page, the above will produce:
The text between here and here won't be displayed
Formatting text
Wiki syntax
In linguistics, syntax (from Ancient Greek σύνταξις "arrangement" from σύν syn, "together", and τάξις táxis, "an ordering") is the study of the principles and rules for constructing sentences in natural languages.
In addition to referring to the discipline, the term syntax is also used to refer directly to the rules and principles that govern the sentence structure of any individual language, as in "the syntax of Modern Irish", and "the syntax of MediaWiki".
...The term syntax is also sometimes used to refer to the rules governing the behavior of mathematical systems, such as logic, artificial formal languages, and computer programming languages[1].
In every section of this guide, you will find the syntax necessary to accomplish the task at hand.
For a list of syntactical items and other advanced editing help, see:
Help:MediaWiki Syntax Compared to Textile
MediaWiki.org:
Help:Formatting
Help:Wikitext examples
Sub/Superscript
Superscript: <sup> text to superscript </sup> produces: Superscript text
Subscript: <sub> text to superscript </sub> produces: Superscript text
Typewriter font
A typewriter font (<tt> </tt>), sometimes used for
technical terms and computer code
(<code> </code>).
Caption
You can use <small>small text</small>
for captions: small text.
Line break
Line break: <br> or </br> . Alternatively, you can use blank lines to separate paragraphs.
Text box
Text box: <pre> </pre>
A text box looks like this
Table
Col 1
|
Col 2
|
Col 3
|
next line |
Table:
{|border=1 style="border: 1px solid darkgray; background: transparent; color: black; text-align:center; width: 75%; height: 200px" cellspacing="5" cellpadding="2"
caption
|+align="bottom" |'''caption '''
heading
!width="50" | Column Name ! !! !!
row
|-
row heading
|- ! row heading
cell (defined one per line)
|
multiple cells (all defined on same line)
| || ||
format
|format |cell content |font-style:italic; |style="float: right; background: red; color: white" valign="top" | cell content | bgcolor="red" | cell content
By default data in tables is vertically centrally aligned
Column 1 | Column 2 | Column 3 |
A | B | |
C | D | |
E | F | |
G | ||
H |
{| border="1" cellpadding="5" cellspacing="0" |- | Column 1 || Column 2 || Column 3 |- | rowspan="2" | A | colspan="2" style="text-align: center;" | B |- | C <!-- column 1 occupied by cell A --> | D |- | E | rowspan="2" colspan="2" style="text-align: center;" | F |- | G <!-- column 2+3 occupied by cell F --> |- | colspan="3" style="text-align: center;" | H |}
{|border=1 style="text-align:center;" cellspacing="5" cellpadding="2" |+'''caption ''' | Col 1 * line 1 * line 2 | Col 2 * line 1 * line 2 | style="valign: top; text-align: left; color: yellow; background-color: green;" | Col 3 * line 1 * line 2 |- | next line |}
http://meta.wikimedia.org/wiki/Tables#Pipe_syntax_in_terms_of_the_HTML_produced
|- | valign="top"| [[File:Drenthe-Position.png|thumb|left|150px|[[w:Drenthe|Drenthe]], the least crowded province]] | valign="bottom"| [[File:Flevoland-Position.png|thumb|left|100px|]]
Style
You can also write in small caps.
<span style="font-variant:small-caps"> in small caps</span>
This CSS example sets color and font size information for the text in a specific paragraph.
Aren't style sheets wonderful?
<P style="font-size: 12pt; color: fuchsia">Aren't style sheets wonderful?
Colors
You can color a text by placing it between tags. In this example, the color is red. Below is a list containing other colors you can use. Simply copy a line, and type the text you want to color between the ">" and the "</span>".
#00FFFF Aqua #000000 Black #0000FF Blue #FF00FF Fuchsia #808080 Gray #008000 Green #00FF00 Lime #800000 Maroon #000080 Navy #808000 Olive #800080 Purple #FF0000 Red #C0C0C0 Silver #008080 Teal #FFFFFF White #FFFF00 Yellow |
<span style="color:Aqua;"> </span>
<span style="color:White;"> </span>
<span style="color:brown;"> </span> |
Creating hyperlinks
See hyperlinks
Inserting a picture
- Start by uploading the picture.
- Reference the file: to include a file in a page, use a link in one of the following forms:
- [[File:Picture.jpg]] will display the full version of the file
- [[File:Image.png|200px|thumb|left|caption text]] will display a the image in a box in the left margin with caption text as description and the image width re-sized to 200 pixels.
- [[Media:File.ogg]] will create a link to the file without displaying it.
Picture insertion syntax
- [[File:Picture.jpg]]
- [[File:Image.png|200px|thumb|left|caption text]]
- [[File:Image.png|200px|thumb|left|caption text]]
Working with templates
Templates are page sections that can inserted on any other page by using the wiki syntax: {{template name}}
To insert the content of an existing template on the page that you are editing, replace the words "template name" in the example above with the name of the template that contain the content you want to insert.
The standard templates used in this wiki are listed here.
Placing a document in the table of contents
See Article categories.
More editing help
See Editing.
MediaWiki.org:
Help:Contents
Help:Formatting
MediaWiki Handbook: (meta.wikimedia.org)
Help:Editing
Help:Wikitext examples