MARkdown to Slide with panDOC — Slides as Code
RAYA Christian
(Press the spacebar or click on the right edge of the screen)
To make touch-screen navigation easier, this presentation includes invisible navigation buttons:

What You Are About To See
This deck is a live feature catalogue for MarS-Doc. Every slide that follows is built from real Markdown — the same file you would write yourself — and demonstrates one concrete capability of the tool: no screenshots, no mock-ups.
Use this map to jump around later (press M for the menu,
or O for the full overview):
.sNp, Gnuplot, MDM), Mermaid, Graphviz, nomnoml,
function-plot.vcd hardware-log extractionTip: try the ⚙️ toolbar in the bottom-left corner at any time — it works the same way throughout the whole deck.
Welcome to MarS-Doc
MarS-Doc (Markdown to Slide with panDoc)
This tool is a presentation system designed for engineers, developers, and scientists.
It solves the chronic problems of traditional presentations:
“If it’s not in version control, it doesn’t exist.”
To build this project locally, ensure your environment meets the following specifications:
make Commands
# Generate both versions
make
# CDN-dependent version
make online
# Self-contained version
make offline
# Live-reload
make watch
Two distribution modes:
slides_online.html): Uses CDNs
for Reveal.js, ECharts, etc. Ideal for keeping the Git repository
lightweight.slides_offline.html): Embeds
the LUA/JS runtime and fonts locally. Perfect for conferences without a
reliable internet connection.The Intuitive Toolbar
Look at the bottom left of your screen: a small gear wheel (⚙️) gives you access to a retractable toolbar containing essential functions:
Forget capricious USB clickers.
No app to install, everything happens directly in your phone’s browser.
Markdown Syntax
To define the time allocated to a slide (in seconds), insert this comment anywhere in the section:
<!-- timing: 10 -->
How it works
The global timer (bottom right) activates on the first slide change. It automatically calculates the expected cumulative time. The colored dot indicates your pacing:
Multi-Column Layout
Image 1
Column 1
Image 2
Column 2
Image 3
Column 3
Image 4
Column 4
Image 5
Column 5
Use the .rows-full class combined with background colors
(.bg-blue, .bg-yellow, width=30%,
height=35%, etc.) to structure space without writing any HTML:
.bg-green .rounded-tl
.bg-red .rounded-bl
.bg-orange .rounded-tr
.bg-black .rounded-br
Use the .cols-full class combined with background colors
(.bg-blue, .bg-yellow, width=25%,
height=30%, etc.) to structure space without writing any HTML:
.bg-green .rounded-tl
.bg-orange
.bg-black .rounded-tr
.bg-blue .rounded-bl
.bg-yellow
.bg-red .rounded-br
This uses Reveal.js’s native fragments: click through the list below, each step lights up in turn while the previous ones dim — a simple way to narrate a workflow without extra slides.
make online or
make offline.CSV File Import
The LUA script directly reads your .csv files and
generates the appropriate Pandoc tables on the fly.
| Composant | Boîtier | Fonction principale | Statut |
|---|---|---|---|
| LFCN-80+ | FV1206 |
Filtre Passe-Bas (DC - 80 MHz); Tolérance serrée | Validé |
| GALI-39+ | SOT-89 |
Amplificateur RF gain élevé (20 dB @ 1 GHz) | En test |
| BAT15-04W | SOT-323 |
Diode Schottky pour détection de puissance RF | À valider |
{.csv src="assets/table.csv" sep=";" header="true" align="l,c,l,r" limit=3}
Double click on the image to view it in full screen
Drop a standard Apache
ECharts JSON configuration straight into a {.echarts}
block — no external file, no build step. The chart below is fully
interactive (hover for tooltips, click the legend to toggle series) and
mixes lines, an area fill, and a bar series in one config.
Touchstone .sNp files are the standard format
RF/microwave engineers use to store S-parameter measurements from a
Vector Network Analyzer. MarS-Doc parses
.s1p–.s4p files in MA,
DB, or RI formats natively.
S2P Smith Chart
Plot magnitude in dB
The same file, viewed through two other modes=
selections — a polar diagram and linear-scale magnitudes:
S2P Polar Chart
Plot magnitude in linear
MarS-Doc converts .gnu file to an interactive ECharts
figure
Polar S-parameters from Gnuplot
XY Gnuplot Script
The converter also recognises Gnuplot’s smooth frequency
+ boxes histogram idiom.
Histogram from Gnuplot
Histogram with Gaussian function from Gnuplot
Directly reading your Keysight IC-CAP .mdm files.
Ic(Vce) plot from mdm file
-Ic(Ib) plot from mdm file
Support also SMITH_PLOT or POLAR_PLOT
directly from .mdm files
S parameters plot from mdm file
S parameters plot from mdm file
Support also Real vs. Imaginary parts on plain RI_GRAPH
directly from .mdm files
S parameters plot from mdm file
S parameters plot from mdm file
nomnoml is a lightweight text-to-UML DSL: describe boxes and arrows on one line each, and the JS renderer lays the graph out for you — no coordinates to compute by hand.
Markmap turns ordinary Markdown headings and lists straight into an interactive, zoomable, collapsible mind map — no coordinates, no separate DSL: the structure you already write is the diagram.
Click a node to collapse/expand its branch, scroll to zoom, drag to pan.
Graphviz’s DOT language is ideal for hierarchies, dependency graphs, and state machines. MarS-Doc renders DOT client-side via Viz.js — no server, no binary install, just a fenced .dot block:
Need to plot a mathematical function live? The
.function-plot block wraps the function-plot/D3
library: list one or more fn: expressions and get a
pannable, zoomable graph — no image export needed.
f(x) = x^3 ; g(x) = x^2 - 4 ; h(x) = sin(x) * 2
WaveDrom draws digital timing diagrams and bit-field/logic schematics from a compact JSON description — no drawing tool required.
Support of WaveDrom diagrams — hand-written JSON,
describing each signal’s waveform as a short string
(p=clock pulse, 0/1=levels,
x=don’t-care, ==data value):
Prefer keeping diagrams in their own file? Point
external= at a .json file with the same
WaveDrom structure — handy for diagrams you reuse across several
decks.
Include WaveDrom: ./assets/wavedrom.json
Beyond hand-written JSON, MarS-Doc can extract a real timing diagram
straight out of a hardware simulation dump (a .vcd — Value
Change Dump — file from a logic simulator or test bench). Pick the
signals= you care about and a time window
(start=/stop=); the filter figures out the
sampling grid on its own, using clock= to lock resolution
onto your fastest reference clock and clocks= to draw clean
rising/falling edge arrows on the clock traces.
Include vcd=“./assets/input.vcd”
Support of WaveDrom symbols — the same JSON syntax can also describe logic/bitfield schematics (here, an 8-input XOR-then-AND-enable network) instead of a time-based waveform:
Asciinema - External File
Terminal session recordings (.cast files, made with the
asciinema CLI) replay as a real,
character-by-character terminal — perfect for CLI demos without the risk
of a live terminal. The file is embedded directly as base64 at compile
time, so there’s no separate asset to ship.
Include asciinema: ./assets/asciinema.cast
Porphyry in markdown
Porphyry.js turns a simple JSON tree into an interactive, collapsible mind map — great for brainstorms, taxonomies, or breaking a big topic into digestible branches. Try panning, zooming, and collapsing nodes below.
Include porphyry: ./assets/porphyry.json
Rough-Notation draws hand-sketched annotations — underline, box, circle, highlight, strike-through — around any span of text, and can be synchronised with Reveal.js fragments so the sketch appears exactly when you click.
This is an important point.
The key concept is highlighted right here.
Step A Step B
A highly positive outcome
And a completely negative result
.mk ClassA second, independent emphasis system — lighter-weight than Rough-Notation, with no sketch animation, just clean CSS-driven marks (box, underline, highlight, strike-through) in a colour of your choosing.
This framework delivers mission-critical metrics instantly.
Always focus on the core system architecture.
Achieved a 45% performance boost in the latest build.
We no longer support legacy ANSI C80 styles.
Hover over any word to reveal a contextual tooltip, powered by Tippy.js.
Example with a hoverable word inside a regular paragraph.
Options: bottom placement, light theme, interactive mode.
Mermaid.js renders flowcharts,
sequence diagrams, and Gantt charts straight from text —
version-controlled architecture diagrams that update as fast as you can
edit a fenced ```mermaid block.
Reveal.js organises slides on a 2D grid:
| Direction | Key | Meaning in this deck |
|---|---|---|
| → Right | → |
Next thematic section |
| ↓ Down | ↓ |
Deeper technical detail |
| ← Left | ← |
Previous section |
| ↑ Up | ↑ |
Previous slide (same section) |
Tip: press
Ofor the Overview to visualise the full grid at a glance.
| Key | Mode | Description |
|---|---|---|
S |
Speaker | Opens speaker view with notes + timer |
O |
Overview | Full 2D grid of all slides |
F |
Fullscreen | Hides browser chrome |
B |
Blackout | Black screen — refocuses audience |
V |
Pause | Pause without leaving the slide |
G |
Jump | Jump directly to a slide number |
P |
Previous | Previous slide |
N |
Next | Next slide |
M |
Menu | Table of Contents |
Esc |
Back | Exits current mode |
Fragments — Step-by-Step Reveal
The most useful fragment classes in practice:
.fade-in — soft
appearance (default).fade-in-then-out —
appears, then disappears on next click.highlight-red —
red highlight without shifting layout.highlight-current-blue
— blue on active item, grey on others.fade-out — gradual
disappearancedata-fragment-index[Text]{.fragment .fade-in data-fragment-index=1}
Live demonstration — multiple elements share the same index:
🔴 Object C —
grow at click 3, exactly when A disappears
Each slide can declare its own background:
| Attribute | Example |
|---|---|
data-background-color |
"#1a1a2e" |
data-background-image |
"./assets/bg.png" |
data-background-video |
"./assets/loop.mp4" |
data-background-iframe |
"https://example.com" |
data-background-gradient |
"linear-gradient(...)" |
Pandoc syntax — inline attribute on the heading:
## My Section {data-background-color="#1a1a2e"}
Progressive Syntax Highlighting
Thanks to highlight.js and the
fix-highlight.lua script, you can animate code line by
line.
def demo_pipeline():
print("🚀 Initializing MarS-Doc...")
tools = ["Pandoc", "Reveal.js", "ECharts", "Mermaid", "Alpine.js"]
for tool in tools:
print(f" ✅ Loading: {tool}")
data-line-numbers="all|1-2|4|5-6"
Native LaTeX rendering is enabled via the --mathjax
flag:
Schrödinger equation:
\[i\hbar\frac{\partial}{\partial t} \Psi(\mathbf{r},t) = \hat{H} \Psi(\mathbf{r},t)\]
Fourier transform:
\[\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x)\ e^{-2\pi i x \xi}\,dx\]
ABC notation is a compact
plain-text format for folk and traditional music. MarS-Doc renders the
score with ABCJS and, with audio="true", adds an
interactive MIDI player so the audience can actually hear the tune — not
just read it.

Ready to compile!
Your complete, versionable, and interactive presentation environment is now operational.
Useful links: