You are on page 1of 1

Markdown Quick Reference Plain Code Blocks

Plain code blocks are displayed in a fixed-width font but not evaulated
Markdown is an easy-to-write plain text format for creating web
``` 
content. See Using Markdown with RStudio to learn more.
This text is displayed verbatim / preformatted 
``` 
Emphasis
*italic*   **bold**  Inline Code
 
_italic_   __bold__  We defined the `add` function to  
compute the sum of two numbers. 

Headers
LaTeX Equations
Header 1 
=========================  See also: Using Equations with Markdown
  Inline Equation
Header 2  $equation$ 
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐   
  $latex equation$ 
### Header 3   
  \( equation \) 
#### Header 4 
Display Equation
$$ equation $$ 
Lists
 
Unordered List $$latex equation $$ 
* Item 1   
* Item 2  \[ equation \] 
  * Item 2a 
  * Item 2b  Horizontal Rule / Page Break
Ordered List Three or more asterisks or dashes:
1. Item 1  ****** 
2. Item 2   
3. Item 3  ‐‐‐‐‐‐ 
   * Item 3a 
   * Item 3b 
Tables
Manual Line Breaks First Header  | Second Header 
‐‐‐‐‐‐‐‐‐‐‐‐‐ | ‐‐‐‐‐‐‐‐‐‐‐‐‐ 
End a line with two or more spaces:
Content Cell  | Content Cell 
Roses are red,     Content Cell  | Content Cell 
Violets are blue. 

Reference Style Links and Images


Links
Links
Use a plain http address or add a link to a phrase:
A [linked phrase][id].  
http://example.com   
  At the bottom of the document: 
[linked phrase](http://example.com)   
[id]: http://example.com/ "Title" 
Images Images
Images on the web or local files in the same directory: ![alt text][id] 
![alt text](http://example.com/logo.png)   
  At the bottom of the document: 
![alt text](figures/img.png)   
[id]: figures/img.png "Title" 

Blockquotes
Miscellaneous
A friend once said: 
  superscript^2 
> It's always better to give    
> than to receive.  ~~strikethrough~~ 

R Code Blocks Typographic Entities


R code will be evaluated and printed ASCII characters are transformed into typographic HTML entities:
```{r} 
summary(cars$dist)   Straight quotes ( " and ' ) into “curly” quotes
summary(cars$speed)   Backtick quotes (``like this'') into “curly” quotes
```   Dashes (“‐‐” and “‐‐‐”) into en- and em-dash entities
 Three consecutive dots (“...”) into an ellipsis entity
 Fractions 1/4, 1/2, and 3/4 into ¼, ½, and ¾.
Inline R Code  Symbols (c), (tm), and (r) into ©, ™, and ®
There were `r nrow(cars)` cars studied 

You might also like