xieby1
🎉2022.06.10
A Simple Easy Converter
This README.md is converted to revealjs, see it here.
Bash script + Template file + Pandoc
It’s simple and esay!
Note: Ubuntu 22’s apt-installed pandoc is too old.
👍That’s it!
🎊You’ve installed markdown_revealjs!
Add revealjs.sh to your PATH env.
Add the metadata (title, author, date)
to top of your markdown file.
These info will become the first page of your slide.
syntax | meaning |
---|---|
1st-level header | New horizontal slide |
2nd/3rd/4th/5th/6th-level header | New vertical slide |
🐱
It’s simple and easy, right?
Here are predefined themes (template),
just download the source markdown,
and revealjs.sh xxx.md
!
Enjoy the themes below🎉
🔽🔽🔽
Sorted in alphabet.
All elements
in Reveal.JS
are centered
by default.
😺
Did you notice that every page has a default background?
Set default backgrounds in yml front matter, like
Set per-slide background, like
More info about background see:
It’s in one line! 🐱 🐶 🐹
[It's in one line!]{.fragment}
[🐱]{.fragment}
[🐶]{.fragment}
[🐹]{.fragment}
Normally, each level of heading will start a new slide.
If you want a heading that doesn a new slide, like this
Just use html heading!
If you want to start a new slide without headings.
Just use the markdown horizontal break ---
, like
this
Force starting a new slide!
This file is include by
```{.include}
./included.md
```
More details: https://github.com/pandoc/lua-filters/blob/master/include-files/include-files.lua
``` {include="./helloworld.c"}
```
More details: https://github.com/pandoc/lua-filters/blob/master/include-code-files/include-code-files.lua
include a chart.js plot
``` {.include}
./plots/chartjs.html
```
include a plotly.py plot
``` {.include}
./plots/plotlypy.html
```
You can label a slide by adding a name to its heading
Then you can go back to the labeled slide ⬆️ Label and Link⬆️ .
markdown_revealjs
can be used completely offline!
Assuming the path to the local repo is <REPO>
Then you can view your slides completely offline!
Bother by long table?
This | is | a | long | vertical | table |
---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 |
2 | 2 | 3 | 4 | 5 | 6 |
3 | 2 | 3 | 4 | 5 | 6 |
4 | 2 | 3 | 4 | 5 | 6 |
5 | 2 | 3 | 4 | 5 | 6 |
6 | 2 | 3 | 4 | 5 | 6 |
7 | 2 | 3 | 4 | 5 | 6 |
8 | 2 | 3 | 4 | 5 | 6 |
9 | 2 | 3 | 4 | 5 | 6 |
10 | 2 | 3 | 4 | 5 | 6 |
11 | 2 | 3 | 4 | 5 | 6 |
12 | 2 | 3 | 4 | 5 | 6 |
13 | 2 | 3 | 4 | 5 | 6 |
14 | 2 | 3 | 4 | 5 | 6 |
15 | 2 | 3 | 4 | 5 | 6 |
16 | 2 | 3 | 4 | 5 | 6 |
17 | 2 | 3 | 4 | 5 | 6 |
18 | 2 | 3 | 4 | 5 | 6 |
19 | 2 | 3 | 4 | 5 | 6 |
20 | 2 | 3 | 4 | 5 | 6 |
Write latex math equation like this
\[ F = G \frac{m_1 \times m_2}{R^2} \]
It is two columns!
This is column 1
This is column 2
::: {.container}
:::: {.col}
Column 1
::::
:::: {.col}
Column 2
::::
:::
You can add as many columns as possible.
Top alignment code:
::: {.container style="align-items: flex-start;"}
:::: {.col}
col1
::::
:::: {.col}
col2
::::
:::
Top alignment code:
::: {.container style="align-items: flex-end;"}
:::: {.col}
col1
::::
:::: {.col}
col2
::::
:::
Because markdown_revealjs
is just
a shell wrapper of pandoc.
You can override them!
See pandoc available options by pandoc -h
Override in md file metadata, like
Example:
Override by appending reveal.sh
command, like
reveal.sh <MD File> <PANDOC OPTIONS>
Example:
Slides after the specific slides
can be excluded from the total slide number.
Think about a situation where,
in your PhD defense,
there are several backup slides at the end.
You do not want them counted to the total slide number.
.slide-count-end
Add .slide-count-end
to the heading of the slide,
In this README, .slide-count-end
is added to slide QnA.
Therefore, the slides after QnA, like Backup Slides
are not counted to total slide number
See,
some key TOC entries are resident at the top of the slides?
data-name="<TOC_Entry_Name>"
data-stack-name="<TOC_Entry_Name>"
Want to hide resident TOC in specific slides?
Add data-sminvisible=true
to the slide heading, like
My 国科大计算所答辩 theme use resident TOC
Resident TOC is implemented based on revealjs plugin:
Default TOC depth is 2.
You can override it in yml front matter, like
The number of TOC columns is controlled by yml front matter:
toc-column-width
for TOC’s column widthtoc-margin
for TOC’s marginTherefore, by adjusting these two variable,
you can control how many TOC columns you have.
toc-column-width
is 290px
toc-margin
is 0 0 0 0
Here is an example of 1-column TOC
New issue and pull request is welcome!
Test the functionality of Slide Number End.
From this slide on,
the total slide number ends counting.
🐱
🐈