This project provides an inline macro which dot:leader["left", "right"] which inserts leaders between the values.

Dot . . . . . . . . . . . . . . . . . . . . . . . . Leaders

It currently supports three backends:

PDF

example pdf adoc formatted

HTML5

example html5 roles

AsciiDoctor.js

example webview html5 inline passthroughs

Markup And Usage Manual

Markup examples, rendered output examples, and extensive compatibility information is provided for multiple output formats in multiple formats:

Todo

There are a few items which need fixing:

  • PDF

    • ❏ Upload gem to rubygems.org

  • HTML5

    • ❏ Include .css automatically?

  • webview-html5 (Asciidoctor.js) for Microsoft Visual Studio Code and possibly others

    • ❏ Release on npm

Ruby GEM Build Instructions (for 白一百 baiyibai)

gem build asciidoctor-dot-leader.gemspec
gem install ./asciidoctor-dot-leader-1.0.0.gem

AsciiDoctor.js Dot Leader Inline Macro

This project provides an inline macro, dot:leader["left", "right"], which inserts dot leaders between the provided values.

Target Application

This has only been tested with the Microsoft Visual Studio Code’s AsciiDoc extension’s Preview function which uses the backen-webview-html5.

Usage

Complete these steps to enable the dot:leader[] macro:

  1. Install the library.

  2. Create an .asciidoctor/lib/ folder in the root of the asciidoctor project.

  3. Set up the target project directory to use the extension by using either of these methods:

    1. Copy the .dot_leader.js file to the .asciidoctor/lib/ folder.

    2. Create a .dot_leader_linker.js file in the .asciidoctor/lib/ folder and copy and modify this content to it:

      module.exports = require('../../asciidoctorjs-extension/dot_leader.js')
      
      // TODO: Install locally and test if it works
      // module.exports = require('asciidoctor-dot-leader')
  4. Enable the AsciiDoc Extension’s ability to use extensions in the Preview function using either of these methods:

    1. Set this configuration flag:

      "asciidoc.extensions.registerWorkspaceExtensions": true
    2. Enable the Asciidoc > Extensions: Register Workspace Extensions option.

  5. Open a document containing dot:leader[] inline macros, and press the Preview button.

Copyright © 2025-present 白一百 baiyibai Free use of this software is granted under the terms of the MIT License.

For the full text of the license, see the LICENSE file.