Note: Some of this is from Karl Broman’s Markdown tutorial.
There is an interactive markdown tutorial here: http://www.markdowntutorial.com/
Plain text becomes html. Html looks like this, but it doesn’t matter because we don’t need to know it!
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<h1>Markdown example</h1>
<p>This is a simple example of a Markdown document.</p>
<p>Use a blank link between paragraphs.
You can use a bit of <strong>bold</strong> or <em>italics</em>. Use backticks to indicate
<code>code</code> that will be rendered in monospace.</p>
Note that there are six levels of headers, with tags <h1>, <h2>, <h3>, …, <h6>
. Think of these as the title, section, subsection, sub-subsection, …
here’s my bold list
now italics
Markdown is a formatting syntax, but it’s also a software tool; in particular, it’s a Perl script. So one approach to converting a Markdown document to html is to download and use that perl script.
Many programs convert markdown files (.md) to html files. The easiest for us is R or Rstudio, but non-R users have been using markdown for other uses and have their own converters.
RStudio uses the rmarkdown package to convert from Markdown to html. This uses pandoc for the actual conversion.
R Markdown combines markdown and R code and require .Rmd extensions.
Link to things.
This text is displayed verbatim / preformatted
blockquotes:
Here is a quote, followed by a code chunk:
x = 1:10 rev(x^2)
here we go: \(\alpha+\beta=\gamma\). Note this is not supported by native markdown. You probably want to try RStudio, or at least the R package markdown, or the function knitr::knit2html()
.
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet