-
Notifications
You must be signed in to change notification settings - Fork 861
Markdown
Markdown is a plain text formatting syntax that easily lets you write next to plain text with special formatting to signalize textual elements like headings, bullet lists, links and so on.
Have a look at the Markdown website if you're not familiar with Markdown formatting.
A line containing three dashes, represents a slide separator (not a horizontal rule, <hr />
, like in regular Markdown). Thus, a simple Markdown text like the one below represents a slideshow with two slides:
# Slide 1
This is slide 1
---
# Slide 2
This is slide 2
To avoid having to duplicate content if a slide is going to add to the previous one, using only two dashes to separate slides will make a slide inherit the content of the previous one:
# Slide
- bullet 1
--
- bullet 2
The above text expands into the following:
# Slide
- bullet 1
---
# Slide
- bullet 1
- bullet 2
Empty lines before and after the two dashes are of significance as the preceding newline character is omitted to enable adding to the last line of the previous slide. Thus, as the extra bullet point in the above example needs to go on a separate line, an extra line is added after the two dashes to force a newline. Without the extra line, the resulting text would have been - bullet 1- bullet 2
.
Initial lines containing key-value pairs are extracted as slide properties:
name: agenda
class: middle, center
background-image: url(remarkable.jpg)
# Agenda
The name of this slide is {{ name }}.
Slide properties serve multiple purposes:
- Naming and styling slides using properties name and class.
- Using slides as templates using properties template and layout.
- Expansion of
{{ property }}
expressions to property values
Check out the list of supported slide properties.
Any occurences of one or more dotted CSS class names followed by square brackets are replaced with the contents of the brackets with the specified classes applied:
.footnote[.red.bold[*] Important footnote]
Resulting HTML extract:
<span class="footnote">
<span class="red bold">*</span> Important footnote
</span>
Content classes available include left
, center
and right
.
Github Flavored Markdown (GFM) fenced code blocks are the preferred way of creating code blocks, easily letting you specify the highlighting language:
Code: ```ruby def add(a,b) a + b end ```
A default highlighting language may be configured using the highlightLanguage configuration option. Specifying a language on a code block will override the default.
Lines prefixed with *
will automatically get highlighted with a yellow background, which can be handy for
bringing attention to specific parts of code snippets, i.e.:
Implicit return statment: ```ruby def add(a,b) * a + b end Notice how there is no return statement. ```
body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
</style>
Code:
def add(a,b)
a + b
end
</textarea>
<script src="https://remarkjs.com/downloads/remark-latest.min.js">
</script>
<script>
var slideshow = remark.create();
</script>