Markdown is used for formatting text cells.
Double click on the markdown cells in this document (including this cell) for examples.
Make new paragraphs with empty lines.
Make new lines when the line above has at least two trailing spaces.
You can put raw html in markdown cells if you want.
You can insert images, pdf files, etc. into the document.
Make horizontal lines with three or more dashes, or underscores, or asterisks:
Make a list like this:
Here is a numbered list:
Make hyperlinks like this [Link text](http://somesite.com)
For example: Google it
You can link to locations inside the document. This is convenient for making, say, a linked table of contents. Here's how:
<a id='my_target_name'></a>
[Link text](#my_target_name)
</a id="the_top"></a>
Here is how to make colored text:
<font color='green'>This is colored</font>
Italicize text between *'s: *This will be italic*
Bold text between **'s: **This will be bold**
No markdown for underline, use html tags instead: <u>This will be underlined</u>
strikethrough between ~~'s: ~~this will be strikethrough~~
To write code snipets, like those above, you can just tab indent them, or surround with back-quotes: ``this is code\
If the first line is like this: ``````python``````
then subsequent lines will get syntax coloring, which is nice:
if a<2.2 :
print("Hi there")
Block style quotes are offset with >
This text will be a quote. If the quote is really long it will continue onto the next line automatically depending on how wide your browser is.
| Left-aligned | Center-aligned | Right-aligned |
|:-------------|:--------------:|--------------:|
| Pressure | P | (Pa) |
| Temperature | T | (K) |
| Velocity | v | (m^3) |
Left-aligned | Center-aligned | Right-aligned |
---|---|---|
Pressure | P | (Pa) |
Temperature | T | (K) |
Velocity | v | (m^3) |
Images can be inserted with this ![alt text](my_image.png)
But in Jupyter, html is much more flexible <img src=my_image.png width=300>
from IPython.display import IFrame
IFrame("https://ignite.byu.edu/che263/lectures/lecture_06_review.pdf", width=600, height=300)
Equations are entered using LaTeX format.
In-line equations are surrounded with $
like this: $a=b$
. That code becomes $a=b$
Single-line equations are surrounded with $$
like this:
$$a = b$$
$$a = b$$
Greek symbols are entered as \alpha
or \gamma
, or \Gamma
, etc.
So $\alpha = \Gamma$
becomes $\alpha = \Gamma$.
Superscripts: ^
$a^b$
gives $a^b$Subscripts: _
$a_b$
gives $a_b$For more than one character, surround with {}
$T_max$
gives $T_max$, but $T_{max}$
gives $T_{max}$.Fractions
$\frac{Numerator}{Denominator}$
$P = \frac{nRT}{V}$
gives $P = \frac{nRT}{V}$Some key symbols
\partial
$\partial$\infty
$\infty$\rightarrow
$\rightarrow$a\cdot b
$a\cdot b$ (note the space before b).\nabla
$\nabla$\Delta
$\Delta$\le
$\le$, \ge
$\ge$Sums and integrals
$\int_a^bf(x)dx$
$\int_a^bf(x)dx$$\sum_{i=1}^{n_{pts}} w_i$
$\sum_{i=1}^{n_{pts}} w_i$Big parenthesis with \left(
and \right)
, etc.
$$\left(\frac{a}{b}\right)$$ = \left[\frac{x+y}{2}\right]^\delta$$
Use \left.
or \right.
to skip one side, as in
Add space with \,
$f(x)=a,\,\,x>5$
$f(x)=a,\,\,\,x>5$
\phantom{xxx}
is also useful (puts in the xxx without showing it, xxx is anything you want).
$f(x)=a,\phantom{xxx}x>5$
Add text with \mbox{some text}
Align equations: use & as the alignment character, and \\ for new line:
\begin{align}
\frac{dv}{dt} &= a + b^c + \alpha^2, \\
\frac{dx}{dt} &= x.
\end{align}
becomes \begin{align} &\frac{dv}{dt} = \xi + b^c + \Gamma^2, \\ &\frac{dx}{dt} = x. \end{align}
Type backslash then the letter name then hit the tab key.
π = 3.14159265358979
π
3.14159265358979