help for slideviewer

Manage and navigate SMCL slides in the Stata Viewer

slideviewer
[filename | keyword]
[, subdir(path) navbar post clear]

Description

slideviewer is a navigation engine for SMCL files (slides) displayed in the Stata Viewer.
It allows for easy traversal of a slide deck stored in a subdirectory, automatic table of contents
generation, and an optional interactive navigation bar.

Version 2.0 is optimized for Stata 16+ and supports UTF-8 encoding.

Navigation Keywords

Instead of a filename, you can use the following keywords:

next Moves to the next slide in alphabetical order. Wraps to the first slide after the last.

prev Moves to the previous slide in alphabetical order. Wraps to the last slide from the first.

first Jumps to the alphabetically first slide.

last Jumps to the alphabetically last slide.

toc Generates a clickable Table of Contents of all .smcl files in the subdirectory.

Options

subdir(path) defines the directory where the .smcl slides are stored. Once set,
this path is remembered across calls until changed or cleared. The default is a folder named
"ignore" in the current working directory.

navbar injects a navigation header and footer into the viewer. This provides clickable
links for [First] [Prev] [TOC] [Next] [Last] without needing to modify your individual slide files.
It works by generating a temporary SMCL file that wraps your content.

post stores the name of the current slide in r(lastslide).

clear resets the persistent state (clears the remembered subdirectory and current slide).

Examples

Example 1: Basic setup

1. Create a folder named "myslides" in your current directory.

2. Put three files in it: slide1.smcl, slide2.smcl, slide3.smcl.

3. Start the viewer:

. slideviewer first, subdir("myslides")

Now you can navigate from the command line or via links in the slides:

. slideviewer next

Example 2: Using the Navigation Bar

To enable an interactive navigation bar that appears automatically on every slide:

. slideviewer first, subdir("myslides") navbar

Every slide will now show navigation links at the top and bottom.

Example 3: Creating a custom TOC

. slideviewer toc

Author

Eric A. Booth

eric.a.booth@gmail.com

http://www.eric-booth.com

https://github.com/ericabooth

Also see

On-line: help for view, smcl