Difference between revisions of "Jeff8356:Common wikitext"
(Added new section for pre and nowiki) |
(→Basic text formatting: Changed formatting) |
||
Line 144: | Line 144: | ||
== Basic text formatting == | == Basic text formatting == | ||
=== Italics === | === Italics === | ||
− | + | ''Italics'' = <code><nowiki>''Italics''</nowiki></code> | |
=== Bold === | === Bold === | ||
− | + | '''Bold''' = <code><nowiki>'''Bold'''</nowiki></code> | |
=== Italics and Bold === | === Italics and Bold === | ||
− | + | '''''Italics and bold''''' = <code><nowiki>'''''Italics and bold'''''</nowiki></code> | |
=== Strikethrough === | === Strikethrough === | ||
− | + | <s>Strikethrough text</s> = <code><nowiki><s>Strikethrough text</s></nowiki></code> | |
=== Underline === | === Underline === | ||
− | + | <u>Underlined text</u> = <code><nowiki><u>Underlined text</u></nowiki></code> | |
=== Highlighting and coloring text === | === Highlighting and coloring text === | ||
− | + | <span style="background:yellow"> Some highlighted text </span> and some plain text. = <code><nowiki><span style="background:yellow"> Some highlighted text </span> and some plain text.</nowiki></code> | |
− | + | <span style="color:#FF0000"> This text will be red </span> = <code><nowiki><span style="color:#FF0000"> This text will be red </span></nowiki></code> | |
More info on highlighting and coloring can be found here: [https://meta.wikimedia.org/wiki/Wiki_color_formatting_help Wiki color formatting help] | More info on highlighting and coloring can be found here: [https://meta.wikimedia.org/wiki/Wiki_color_formatting_help Wiki color formatting help] |
Revision as of 18:10, 12 September 2022
This page is for common wikitext used on Apnea Board and sort of a pseudo sandbox to test out new stuff I find. Feel free to use the talk function or copy any of the source. This page was created as more of a semi-permanent home for common code since the official Sandbox page gets reset occasionally.
Most of the sample code here is taken from the Wikitext help pages from Wikipedia. Although they use a lot of templates to get the job done, there are usually alternative ways of achieving the same results without templates. All the code used here does not require any special templates unless noted. Click the "Edit" or "View Source" links above to see the actual code used.
Mediawiki help pages are another good source for wikitext.
Contents
Images and text flow
Larger images
Some text above...
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Some text below
Text will not wrap the image if you use "center" or "none" after |thumb|
The sample code for the above images: [[file:FL EPR.jpg|thumb|center|1000px|Untreated Inspiratory Flow Limitation]]<br />
No tables, flowing text
Testing images and text flow using <br clear=all> and also <div style="clear:both"></div>
Both do the same thing as seen below.
No tables involved
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<br clear=all> used here
Some other stuff. Does not wrap the image. Any amount of text can be added between the images.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<div style="clear:both"></div> used here
Even more text that does not wrap the image
Tables with borders
Using tables with borders
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Tables without borders
Using tables without borders
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Citations and Notes
Citations
We currently do not have a citation template but simple citations can still be done.
Searching Apnea Board [1]
Help using Apnea Board [2]
These will appear in the References section at the end of the page using <references /> under the heading.
Notes
This part of the text requires clarification.[note 1] And this needs even more clarification.[note 2]
These will appear in the notes section at the end of the page using <references group="note" /> under the heading.
Using both together
An example of using citations and notes together inline:
You can set the time zone in your cpap machine. [3] Some machines may have special requirements. [note 3]
Math symbols
π·r2·h | E=mc2 | H2O | CO2 = π·r<sup>2</sup>·h E=mc<sup>2</sup> H<sub>2</sub>O CO<sub>2</sub>
To convert Hours:minutes:seconds to decimal. Example: 8:23:17
(hour × 1) + (minutes ÷ 60) + (seconds ÷ 3600) 8 × 1 + 23 ÷ 60 + 17 ÷ 3600 8 + 0.3833 + 0.0047 = 8.388 hours
Tables
Standard table with headers
header 1 | header 2 | header 3 |
---|---|---|
row 1, cell 1 | row 1, cell 2 | row 1, cell 3 |
row 2, cell 1 | row 2, cell 2 | row 2, cell 3 |
Lists
Bulleted list
- Bulleted list item
- Item 2
- Item 2.1
- Item 2.2
- Item 2.2.1
- Item 3
Numbered list
- Numbered list item
- Item 2
- Item 2.1
- Item 2.1.1
- Item 2.1.2
- Item 2.2
- Item 2.1
- Item 3
Invisible text (comments)
You can leave comments in the code that will not be visible when viewing the page:
<!-- This text will normally only appear in Edit or View Source mode. It's typically used to leave notes for other wiki editors. -->
Basic text formatting
Italics
Italics = ''Italics''
Bold
Bold = '''Bold'''
Italics and Bold
Italics and bold = '''''Italics and bold'''''
Strikethrough
Strikethrough text = <s>Strikethrough text</s>
Underline
Underlined text = <u>Underlined text</u>
Highlighting and coloring text
Some highlighted text and some plain text. = <span style="background:yellow"> Some highlighted text </span> and some plain text.
This text will be red = <span style="color:#FF0000"> This text will be red </span>
More info on highlighting and coloring can be found here: Wiki color formatting help
Limiting text formatting
Leading space
Sample text in a text block (Similar to <nowiki>, <pre>, or <code>) but still interprets wiki code, and preserves extra spaces.
Testing multiple lines Line 2 Line 3
Just indent the line with a space(s) and the text is placed in a block like above. No tags required. Preserves formatting and extra spaces.
<pre>
<pre></pre> Does not interpret wikicode, and preserves extra spaces. Displays special characters.Some sample text using <pre> with [[wikimarkup]] tags and extra spaces. Also displays special characters using &
<nowiki>
<nowiki></nowiki> Does not interpret wikicode, but strips extra spaces and new lines. Also displays special characters. Does not use a text block like <pre> or "leading space".
Some sample text with [[wikimarkup]], but strips extra spaces. Displays special characters using &
References
- ↑ Searching Apnea Board - http://www.apneaboard.com/forums/search.php
- ↑ Getting Help - http://www.apneaboard.com/forums/misc.php?action=help
- ↑ Time Zone Map - https://www.timeanddate.com/time/map/
Notes
Donate to Apnea Board