Skip to content

Instantly share code, notes, and snippets.

@smschauhan
Created May 9, 2014 20:55
Show Gist options
  • Save smschauhan/9bff223d3c62b3bd2dce to your computer and use it in GitHub Desktop.
Save smschauhan/9bff223d3c62b3bd2dce to your computer and use it in GitHub Desktop.
Markdown Basics

Here's what Raw Markdown Looks Like:

# Markdown Basics

This is plain text. Empty lines are interpreted as new paragraphs. Single newlines
are ignored by the markdown renderer.

## Code Samples

If you'd like to include code samples in your markdown, indent each line with
at least 4 spaces or a tab. Here's a hello world in R, for example.

        print ("hello, world!", quote = FALSE)
        print ("some more text")

## Emphasis

**For bold text, use two asterisks**. *For italics, use one*.

## Lists

Use an asterisk before each list item on a newline for unordered lists:

* this is a
* list

To produce an ordered list, use a number before each list item. Any number
will do. Markdown ignores the number prefix you provide and counts the list
items itself.

1. this is an ordered
1. list

## And here's our hello world R program

[triple backtick `]{r}
print ("hello, world!", quote = FALSE)
print ("some more text")
[triple backtick `]

This is how it looks rendered:

Markdown Basics

This is plain text. Empty lines are interpreted as new paragraphs. Single newlines are ignored by the markdown renderer.

Code Samples

If you'd like to include code samples in your markdown, indent each line with at least 4 spaces or a tab. Here's a hello world in R, for example.

    print ("hello, world!", quote = FALSE)
    print ("some more text")

Emphasis

For bold text, use two asterisks. For italics, use one.

Lists

Use an asterisk before each list item on a newline for unordered lists:

  • this is a
  • list

To produce an ordered list, use a number before each list item. Any number will do. Markdown ignores the number prefix you provide and counts the list items itself.

  1. this is an ordered
  2. list

And here's our hello world R program

print ("hello, world!", quote = FALSE)
print ("some more text")
# scratch file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment