Difference between revisions of "Mediawiki Cheatsheet"
Jump to navigation
Jump to search
| Line 91: | Line 91: | ||
* To link to an uploaded file or image, double bracket the file name only, eg <pre>[[File:Ionization.jpg]]</pre>. | * To link to an uploaded file or image, double bracket the file name only, eg <pre>[[File:Ionization.jpg]]</pre>. | ||
* If an image is too big, specify dimensions like <pre>[[File:Ionization.jpg | 150px]]</pre>. | * If an image is too big, specify dimensions like <pre>[[File:Ionization.jpg | 150px]]</pre>. | ||
| + | |||
| + | ===Text Formatting=== | ||
| + | |||
| + | {|class="wikitable" | ||
| + | !wikitext!!rendering | ||
| + | |- | ||
| + | | | ||
| + | <nowiki>You can write ''italic'', '''bold''', or '''''bold & italic'''''.</nowiki> | ||
| + | || | ||
| + | You can write ''italic'', '''bold''', or '''''bold & italic'''''. | ||
| + | |- | ||
| + | | | ||
| + | Section headings: | ||
| + | <nowiki> | ||
| + | == Level 2 == | ||
| + | |||
| + | === Level 3 === | ||
| + | |||
| + | ==== Level 4 ==== | ||
| + | </nowiki> | ||
| + | || | ||
| + | Section headings: | ||
| + | == Level 2 == | ||
| + | |||
| + | === Level 3 === | ||
| + | |||
| + | ==== Level 4 ==== | ||
| + | |- | ||
| + | | | ||
| + | <nowiki> | ||
| + | <syntaxhighlight lang="C++"> | ||
| + | // echo.hpp | ||
| + | void echo(); | ||
| + | |||
| + | // echo.cpp | ||
| + | #include <iostream> | ||
| + | #include "echo.hpp" | ||
| + | using namespace std; | ||
| + | |||
| + | void echo() { | ||
| + | cout << "Hello" << endl; | ||
| + | } | ||
| + | </syntaxhighlight></nowiki> | ||
| + | || | ||
| + | <source lang="C++"> | ||
| + | // echo.hpp | ||
| + | void echo(); | ||
| + | |||
| + | // echo.cpp | ||
| + | #include <iostream> | ||
| + | #include "echo.hpp" | ||
| + | using namespace std; | ||
| + | |||
| + | void echo() { | ||
| + | cout << "Hello" << endl; | ||
| + | } | ||
| + | </source> | ||
| + | |- | ||
| + | | | ||
| + | <nowiki></nowiki> | ||
| + | || | ||
| + | |||
| + | |} | ||
Latest revision as of 16:30, 13 December 2016
Links
- For portability of this wiki, please format pages and uploaded files as double bracket [[ link ]] internal links format like this:
| wikitext | rendering |
|---|---|
|
Internal page: [[Main Page]] |
Internal page: Main Page |
|
Uploaded file: [[File:Ionization.jpg | 150px]] |
- External link
| wikitext | rendering |
|---|---|
|
External link: [https://cita.utoronto.ca CITA] |
External link: CITA |
Make lists
| wikitext | rendering |
|---|---|
* Lists are easy to do: ** start every line * with a star ** more stars mean *** deeper levels |
|
# Numbered lists are good ## very organized ## easy to follow |
|
; Definition lists ; item : definition ; semicolon plus term : colon plus definition |
|
Type Math Formula
- This wiki supports Latex math formula rendering.
| wikitext | rendering |
|---|---|
|
<math>E=m_0c^2\sqrt{1+(\frac{p}{m_0c})^2}</math> |
[math]\displaystyle{ E=m_0c^2\sqrt{1+(\frac{p}{m_0c})^2} }[/math] |
Image and File Upload
- Use the Upload file link on the sidebar
- View uploaded files on Special:ListFiles page
- To link to an uploaded file or image, double bracket the file name only, eg
[[File:Ionization.jpg]]
. - If an image is too big, specify dimensions like
[[File:Ionization.jpg | 150px]]
.
Text Formatting
| wikitext | rendering |
|---|---|
|
You can write ''italic'', '''bold''', or '''''bold & italic'''''. |
You can write italic, bold, or bold & italic. |
|
Section headings: == Level 2 == === Level 3 === ==== Level 4 ==== |
Section headings: Level 2Level 3Level 4 |
<syntaxhighlight lang="C++">
// echo.hpp
void echo();
// echo.cpp
#include <iostream>
#include "echo.hpp"
using namespace std;
void echo() {
cout << "Hello" << endl;
}
</syntaxhighlight>
|
// echo.hpp
void echo();
// echo.cpp
#include <iostream>
#include "echo.hpp"
using namespace std;
void echo() {
cout << "Hello" << endl;
}
|
|
|