Markdown Basics
Contents
2. Markdown Basics¶
Markdown is an incredible tool for developing readable files for people to view. Using Markdown you can present your code and ideas in a format that is much easier to understand.
2.1. Tables¶
The table making process in markdown is interesting. You need to actually make a table with |
this symbol and dash marks -
For example:
| Column 1 | Column 2 | Column 3 |
|---------------|---------------|-----------|
| Row 1 | | |
| Row 2 | | |
| Row 3 | | |
This piece of code would look like this when run throw markdown:
Column 1 |
Column 2 |
Column 3 |
---|---|---|
Row 1 |
||
Row 2 |
||
Row 3 |
2.2. Now a quick rundown of all the boring things that people should know but aren’t worth an entire talk on¶
What it is? |
How You do it? |
Example code |
Shown example |
---|---|---|---|
Italics |
Surround the words you want to use with a single asterisk |
|
like this or this way |
Bold |
Surround the words you want to use with two single asterisk |
|
example text or other example text |
Bold AND Italic |
Surround the words you want to use with three single asterisk |
|
Last One or I promise |
Strike-through |
Surround text with two tiltes |
|
~~This is what it looks like~~ |
Links |
Place the text you want in brackets next to the link you want in parenthesis |
|
|
Images |
same as a URL link but with an |
|
Other things that need to be shared cannot go into the table so here are the rest of the basics
2.3. Numbering¶
If you put a number in front of the point it numbers it
Here is an example of the text
1. It's that easy
2. Just like this
You can actually number them however you’d like
If you start with 7 it begins at 7
But from there on out
You can do
Whatever you want
7. If you start with 7 it begins at 7
2. But from there on out
1. You can do
35. Whatever you want
2.4. Titles¶
Use #
the pound sign. Each of the numbers correspondes to the number of pound signs
2.6. Bullet Points and other listing¶
You just put a
-
,*
, or+
before the word making sure to give a space between them- Just like that
or* or use this
or+ or this
Also if you tab in you can put a bullet further in
You
Can
Keep
Going
Forever
2.7. Block quotes¶
This is a block quote. You make it by putting
>
this in frontPut two to make a nested block quote
You can then put info in between the breaks as long as there is a full line with nothing between them
Then hop right back in. I think this would help with citations or general notes
You
Can
Also
Do
This
Forever
Additionally, when wanting multiple lines you can’t put two block quotes back to back. Let me show you.
>Hello
>Good Day
Comes out as
Hello Good Day
But if you do this
>You are great
>
>You deserve to be happy
It comes our correctly as
You are great
You deserve to be happy
2.8. Highlighting Info¶
Placing a back dash around code gives inline code
or can be used to highlight important information
- This is the symbol `
- Do not use the normal which looks like this -> ' You want this-> `
2.9. In-line code¶
Different Programming Languages can be used in markdown
2.9.1. Any generic code¶
{If you surroudning the code in three back dashes
You can do literally anything and it'll
display as you'd expect normally}
[by adding the name of the language after the first set
of back dashes you can have the words color as
you'd expect in the language]
2.9.2. Java¶
var s = "This is java";
alert(s);
2.9.3. Python¶
s = "This is Python"
print s
2.10. Task list¶
Personally, I love task list more than is probably reasonable for a person but they’re the only way I can get things done
Creating them in Markdown is easy.
- [x] Done
- [ ] Not done
[x] Done
[ ] Not done
2.11. Additional fun tricks using HTML¶
2.11.2. Aligning images with the different sides of the sheet¶
This is the code you need to align images to the left:
<img align="left" width= "50" height="50" src="https://supplyroom.s3.amazonaws.com/F/FS-/FS-P/FS-PA-1_W.png">
This is the code you need to align images to the right:
<img align="right" width= "50" height="50" src="https://supplyroom.s3.amazonaws.com/F/FS-/FS-P/FS-PA-1_W.png">
If you do nothing it will automatically allign with the middle.
2.11.3. Changing Font Color¶
To make blue or green or red text you just need to change that setting the code like this.
<span style="color:blue">blue text</span>.
2.12. Mathematical and Statistical operations¶
As we are in a stat class I think it is only right that I show how to make mathematical formulas
The Name |
the Code |
The Image |
---|---|---|
Addition |
|
\(+\) |
Subtraction |
|
\(-\) |
Multiplication |
|
\(*\) |
Division |
|
\(/\) |
Equal |
|
\(=\) |
Fractions |
|
\(\frac{n}{k}\) |
Square |
|
\(n^2\) |
General Power |
|
\(n^k\) |
Square Root |
|
\(\sqrt{k}\) |
General Root |
|
\(\sqrt[n]{k}\) |
Sine |
|
\(\sin\) |
Cosine |
|
\(\cos\) |
Tangent |
|
\(\tan\) |
Alpha |
|
\(\alpha\) |
Beta |
|
\(\beta\) |
Gamma |
|
\(\gamma\) |
Pi |
|
\(\pi\) |
Phi |
|
\(\phi\) |
Chi |
|
\(\chi\) |
Delta |
|
\(\delta\) |
Lambda |
|
\(\lambda\) |
Theta |
|
\(\theta\) |
Limit |
|
\(\lim\) |
Expected |
|
\(\exp\) |
To |
|
\(\to\) |
Infinity |
|
\(\infty\) |
Choose |
|
\(\binom{n}{k}\) |
Sigma Notation |
|
\(\sum\) |
Pi Notation |
|
\(\prod\) |
Prime |
|
\(a’\) |
Integral |
|
\(\int_0^\infty \mathrm{x},\mathrm{d}x\) |
Hat |
|
\(\hat{a}\) |
Bar |
|
\(\bar{a}\) |
2.13. Other Fun Helpful notes¶
Triple Underscore, Asterisk, or dash gives you a line to break up text
Adding a
<br>
in your code will force a line break
a. This can be very helpful for keeping lines condensed in a readable format
b. For example, in this code right here the sublist (a,b) function doesn’t exist so I forced line breaks and added it
Here’s the code
2. Adding a <br> in your code will force a line break
a. This can be very helpful for keeping lines condensed in a readable format
b. For example, in this code right herem the sublist (a,b) function doesn''t exist so I forced line break and added it
Without the line breaks it would look like this
Adding a
<br>
in your code will force a line break a. This can be very helpful for keeping lines condensed in a readable format b. For example, in this code right here the sublist (a,b) function doesn’t exist so I forced line break and added it
You can use HTML formatting to display things
I found this useful because some things cannot be displayed in Markdown because their functions prevent it
By using HTML you can type whatever you’d like and the functions of those symbols wont interfer
Displaying the symbol for highlighting things was very difficult until I did that
If you are using the back ticks to show information and would like to show the back ticks there is a trick for it
This line right here is in back ticks but `I can still` show the back ticks
This can be done by starting the string with a double set of back ticks and using a single back tick for the info inside the back ticks
The line above looks like this
This line right here is in back ticks but `I can still` show the back ticks
In some situations you can display code or other text using a single tab for convenience
`Notice how you an see the back dash here````` That’s because this line is tabbed in once’You can also cancel any special character by putting a
\
before it\*I like volleyball\*
should display like this
I like volleyball
not like this
I like volleyball
Thank you!