# deckroadmap: Give your slides a sense of direction




<p>Last weekend, I drove to New York.</p>
<p>Along the way, I kept passing signs that said things like “New York City 150 miles,” then later “88 miles”, then less and less as we got closer. The thing is, with GPS on, I barely needed those signs. The map was already telling me where we were, how far we had left, and what was coming next.</p>
<p>That constant sense of orientation is easy to take for granted. Somewhere during that drive, it hit me: <strong>Presentations need that too.</strong></p>
<p>When people sit through a talk, they do not just want to know what slide they are on. They want to know where they are in the story.</p>
<ul>
<li><p><em>Are we still in the setup?</em></p></li>
<li><p><em>Are we already in the analysis?</em></p></li>
<li><p><em>Is the recommendation coming next?</em></p></li>
</ul>
<p>In PowerPoint, people often hack this together with manual shapes on every slide. But for those of us building <strong>Reveal.js slides via Quarto or R Markdown</strong>, there hasn’t been an automated way to keep the audience oriented.</p>
<p>That thought stayed with me, and by the time the weekend was over, it had turned into <a href="https://github.com/CodingTigerTang/deckroadmap"><code>deckroadmap</code></a><a href="https://CRAN.R-project.org/package=deckroadmap"><img src="https://www.r-pkg.org/badges/version/deckroadmap" alt="CRAN status" /></a>, a lightweight R package for adding roadmap footers to Quarto and R Markdown Reveal.js presentations, so audiences can see what has been covered, what section is active, and what is coming next.</p>
<p><img src="/posts/deckroadmap_files/deckroadmap-logo.png" /></p>
<div id="the-problem" class="section level2">
<h2>The problem</h2>
<p>Reveal.js already has a built-in progress bar, and it does its job well. But it answers a different question.</p>
<p>A slide progress bar tells you about <strong>distance</strong>.</p>
<p>A roadmap footer tells you about <strong>structure</strong>.</p>
<table>
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">Feature</th>
<th align="left">revealjs Progress Bar</th>
<th align="left"><code>deckroadmap</code></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left"><strong>Focus</strong></td>
<td align="left">Linear Progress</td>
<td align="left">Narrative Milestones</td>
</tr>
<tr class="even">
<td align="left"><strong>Question Answered</strong></td>
<td align="left">“How many slides left?”</td>
<td align="left">“What part of the story is this?”</td>
</tr>
<tr class="odd">
<td align="left"><strong>Audience Impact</strong></td>
<td align="left">Passive tracking</td>
<td align="left">Active orientation</td>
</tr>
</tbody>
</table>
<p>And in many presentations, structure is what people actually care about.</p>
</div>
<div id="getting-started" class="section level2">
<h2>Getting started</h2>
<p>The workflow is intentionally simple. You can install the stable version directly from <strong>CRAN</strong>:</p>
<pre class="r"><code>install.packages(&quot;deckroadmap&quot;)</code></pre>
<p>For the latest development version, you can also install from GitHub:</p>
<pre class="r"><code># install.packages(&quot;pak&quot;)
pak::pak(&quot;CodingTigerTang/deckroadmap&quot;)</code></pre>
<p><strong>1. Define your roadmap</strong></p>
<p>In your setup chunk, define the major sections of your talk:</p>
<pre class="r"><code>library(deckroadmap)

use_roadmap(
  c(&quot;Intro&quot;, &quot;Problem&quot;, &quot;Analysis&quot;, &quot;Recommendation&quot;, &quot;Next Steps&quot;),
  style = &quot;pill&quot;
)</code></pre>
<p><strong>2. Tag your slides</strong></p>
<p>Use the <code>{data-roadmap}</code> attribute in your Quarto or R Markdown headers to link a slide to a specific section:</p>
<pre class="markdown"><code>## Welcome {data-roadmap=&quot;Intro&quot;}

## The problem {data-roadmap=&quot;Problem&quot;}

## Analysis overview {data-roadmap=&quot;Analysis&quot;}

## Recommendation {data-roadmap=&quot;Recommendation&quot;}

## Next steps {data-roadmap=&quot;Next Steps&quot;}</code></pre>
</div>
<div id="three-built-in-styles" class="section level2">
<h2>Three built-in styles</h2>
<p>I wanted <code>deckroadmap</code> to be useful right away without requiring users to write custom CSS. It ships with three distinct “personalities”:</p>
<ul>
<li><code>pill</code>: a rounded floating footer with a polished presentation feel.<br />
</li>
<li><code>minimal</code>: a lighter text-first version with less visual weight.</li>
<li><code>progress</code>: a more structured roadmap bar that makes done/current/upcoming very explicit.</li>
</ul>
<p><img src="/posts/deckroadmap_files/preview-all.png" /></p>
</div>
<div id="a-feature-for-iteration-preview_roadmap" class="section level2">
<h2>A feature for iteration: <code>preview_roadmap()</code></h2>
<p>One thing I did not originally plan, but now really love, is <code>preview_roadmap()</code>.</p>
<p>It allows you to preview a roadmap design locally before rendering an entire slide deck. That turned out to be surprisingly helpful while experimenting with styles, colors, and section names.</p>
</div>
<div id="why-a-package" class="section level2">
<h2>Why a package?</h2>
<p>This could have stayed as a one-off CSS and JavaScript hack. But by packaging it, the workflow becomes cleaner and more shareable:</p>
<ul>
<li><strong>Consistency</strong>: Use one function across multiple decks.</li>
<li><strong>Compatibility</strong>: Native support for both Quarto and R Markdown (Reveal.js).</li>
<li><strong>Speed</strong>: No more hunting for that one .css file you used six months ago.</li>
<li><strong>Reliability</strong>: Now available on CRAN, ensuring the package meets community standards for documentation and cross-platform compatibility.</li>
</ul>
</div>
<div id="lastly" class="section level2">
<h2>Lastly</h2>
<p>Presentations are not just about putting content on slides. They are about helping people follow a line of thought. Sometimes that means better visuals, and sometimes it just means helping people answer a simple question: <strong>Where are we right now?</strong></p>
<p>If you want to give your next Reveal.js deck a sense of direction, give <code>deckroadmap</code> a try.</p>
<ul>
<li>CRAN: <a href="https://cran.r-project.org/package=deckroadmap">deckroadmap</a></li>
<li>GitHub: <a href="https://github.com/CodingTigerTang/deckroadmap">CodingTigerTang/deckroadmap</a>.</li>
<li>Docs: <a href="https://codingtigertang.github.io/deckroadmap/">deckroadmap</a>.</li>
</ul>
<p>Sometimes a road sign is all it takes to start a package idea.</p>
</div>

