Difference between revisions of "Tutorial:AdvancedTutorialPage1g"
(Start page) |
(→Sections: fmt) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
:H<sub>2</sub>SO<sub>4</sub> + 2 NaOH → Na<sub>2</sub>SO<sub>4</sub> + 2 H<sub>2</sub>O | :H<sub>2</sub>SO<sub>4</sub> + 2 NaOH → Na<sub>2</sub>SO<sub>4</sub> + 2 H<sub>2</sub>O | ||
+ | |||
+ | ---- | ||
Often on discussion pages, people add gradually increasing numbers of colons before their comments to show that a new person is commenting, as in: | Often on discussion pages, people add gradually increasing numbers of colons before their comments to show that a new person is commenting, as in: | ||
Line 16: | Line 18: | ||
::That's not fair! Give me just one example of something provocative I've written! Martin A. Walker 01:38, 24 May 2011 (EDT) | ::That's not fair! Give me just one example of something provocative I've written! Martin A. Walker 01:38, 24 May 2011 (EDT) | ||
How about [[WikiChem:Demonstration/George Washington]] for a start! Walkerma is clearly pushing his anti-American POV! User:Joe Smith. | How about [[WikiChem:Demonstration/George Washington]] for a start! Walkerma is clearly pushing his anti-American POV! User:Joe Smith. | ||
− | :::Even when he's not pushing a POV, his writing is dreadful | + | :::Even when he's not pushing a POV, his writing is dreadful. Take a look at [[WikiChem:Demonstration/Adirondacks]]. User:Dan Jones |
− | + | ::You both know those pages weren't written by me! My account was hacked, and someone wrote those pages to try and get me blocked. Martin A. Walker 01:39, 24 May 2011 (EDT) | |
==Adding links without transcluding== | ==Adding links without transcluding== | ||
− | On the previous tutorial page, I included a ''link'' to a template, but the template didn't appear on the tutorial page. Such links are very useful when discussing things, or in tutorials like this. If you want to add a link without tranclusion of the linked template (or image, or category), just stick a colon in front of the link, as in <nowiki>[[:Template:WikiProject Chemicals]]</nowiki>. Here are some examples: | + | On the previous tutorial page, I included a ''link'' to a template, but the template didn't appear on the tutorial page. Such links are very useful when discussing things, or in tutorials like this. If you want to add a link without tranclusion of the linked template (or image, or category), just stick a colon in front of the link, as in '''<nowiki>[[</nowiki>:Template:WikiProject Chemicals<nowiki>]]</nowiki>'''. Here are some examples: |
− | * | + | * One example of a resource template is '''[[:Template:ClimateChangeResources]]'''. |
* Who do you prefer - [[:File:Tom cruise 1989.jpg|Tom Cruise]] or [[:File:JenniferAnistonFeb09.jpg|Jennifer Aniston]]? | * Who do you prefer - [[:File:Tom cruise 1989.jpg|Tom Cruise]] or [[:File:JenniferAnistonFeb09.jpg|Jennifer Aniston]]? | ||
* This page definitely does not belong in [[:Category:Awards]]. | * This page definitely does not belong in [[:Category:Awards]]. | ||
+ | |||
+ | ==Sections== | ||
+ | Other than the section headers we have seen so far, which use two, three or four equals signs, there are other ways of formatting content and subheadings: | ||
+ | |||
+ | Putting a semicolon in front of some text makes it bold, but does not add the subheading into the table of contents. If you end the subheading with a colon, it tells the browser to put the text from the next line onto a new line. For example: | ||
+ | |||
+ | <nowiki>;This is a subheading:</nowiki><br/><nowiki>This is the text following that subheading</nowiki> | ||
+ | |||
+ | PRODUCES | ||
+ | |||
+ | ;This is a subheading: | ||
+ | This is the text following that subheading | ||
+ | |||
+ | |||
+ | You can also use four small dashes (<nowiki>----</nowiki>) to draw a horizontal line across the page, as I did above in the "adding a margin" section to separate out the use of in discussions. | ||
+ | |||
+ | For more sophisticated sectioning, both horizontal and vertical, you can use the HTML <nowiki><div></nowiki> tag and/or tables. For an example of both together see the '''[http://pluto.potsdam.edu/wikichem/index.php?title=Main_Page&action=edit Main Page code]'''. (NOTE: I simply "stole" this formatting from a page on Wikipedia and adapted it for the main page. It uses templates to deliver different types of content) | ||
+ | |||
+ | ==Altering text== | ||
+ | Colored or large/small text can be achieved using HTML tags: | ||
+ | *<nowiki><span style="color:red">Some red text</span></nowiki> produces <span style="color:red">Some red text</span> | ||
+ | *<nowiki><big>This is big</big> <small> but this is small</small></nowiki> produces <big>This is big</big> <small> but this is small</small> | ||
+ | |||
+ | ==Noinclude and includeonly== | ||
+ | When transcluding content, sometimes you want to leave one part "untranscluded" - not displayed on the other page. In cases like this, the part to be left out goes inside <nowiki><noinclude></noinclude></nowiki> tags. This is often done with categories for templates or for certain content in transcluded quiz questions. For an example, take a look at the code for [[:Template:WikiProject Chemicals]]. | ||
+ | |||
+ | At other times, you ONLY want certain content to appear after transclusion, and you don't want it showing on the original template. In these cases, you put the content inside <nowiki><includeonly></includeonly></nowiki>. | ||
+ | |||
+ | '''[[Tutorial:AdvancedTutorialPage1h|Next page]]''' | ||
[[Category:Tutorial pages]] | [[Category:Tutorial pages]] |
Latest revision as of 01:16, 24 May 2011
Here are a few useful tips on editing and formatting text:
Contents
Adding a margin
The colon symbol (:) acts rather like the "tab" key, and it moves the text a small distance to the right. If you want it even further, just use two or three colons. This can be useful for formatting things to look nice. For example:
Sulfuric acid reacts with one mole of sodium hydroxide to produce sodium bisulfate, or with two moles of sodium hydroxide to produce sodium sulfate.
- H2SO4 + NaOH → NaHSO4 + H2O
- H2SO4 + 2 NaOH → Na2SO4 + 2 H2O
Often on discussion pages, people add gradually increasing numbers of colons before their comments to show that a new person is commenting, as in:
I think we should block User:Walkerma on this site. He writes too many provocative pages, and he has a very arrogant attitude towards other users. User:Joe Smith
- I agree, he's a pain in the **** User:Jane Doe
- That's not fair! Give me just one example of something provocative I've written! Martin A. Walker 01:38, 24 May 2011 (EDT)
How about WikiChem:Demonstration/George Washington for a start! Walkerma is clearly pushing his anti-American POV! User:Joe Smith.
- Even when he's not pushing a POV, his writing is dreadful. Take a look at WikiChem:Demonstration/Adirondacks. User:Dan Jones
- You both know those pages weren't written by me! My account was hacked, and someone wrote those pages to try and get me blocked. Martin A. Walker 01:39, 24 May 2011 (EDT)
Adding links without transcluding
On the previous tutorial page, I included a link to a template, but the template didn't appear on the tutorial page. Such links are very useful when discussing things, or in tutorials like this. If you want to add a link without tranclusion of the linked template (or image, or category), just stick a colon in front of the link, as in [[:Template:WikiProject Chemicals]]. Here are some examples:
- One example of a resource template is Template:ClimateChangeResources.
- Who do you prefer - Tom Cruise or Jennifer Aniston?
- This page definitely does not belong in Category:Awards.
Sections
Other than the section headers we have seen so far, which use two, three or four equals signs, there are other ways of formatting content and subheadings:
Putting a semicolon in front of some text makes it bold, but does not add the subheading into the table of contents. If you end the subheading with a colon, it tells the browser to put the text from the next line onto a new line. For example:
;This is a subheading:
This is the text following that subheading
PRODUCES
- This is a subheading
This is the text following that subheading
You can also use four small dashes (----) to draw a horizontal line across the page, as I did above in the "adding a margin" section to separate out the use of in discussions.
For more sophisticated sectioning, both horizontal and vertical, you can use the HTML <div> tag and/or tables. For an example of both together see the Main Page code. (NOTE: I simply "stole" this formatting from a page on Wikipedia and adapted it for the main page. It uses templates to deliver different types of content)
Altering text
Colored or large/small text can be achieved using HTML tags:
- <span style="color:red">Some red text</span> produces Some red text
- <big>This is big</big> <small> but this is small</small> produces This is big but this is small
Noinclude and includeonly
When transcluding content, sometimes you want to leave one part "untranscluded" - not displayed on the other page. In cases like this, the part to be left out goes inside <noinclude></noinclude> tags. This is often done with categories for templates or for certain content in transcluded quiz questions. For an example, take a look at the code for Template:WikiProject Chemicals.
At other times, you ONLY want certain content to appear after transclusion, and you don't want it showing on the original template. In these cases, you put the content inside <includeonly></includeonly>.