This project provides an inline macro which dot:leader["left", "right"]
which inserts leaders between the values.
Dot . . . . . . . . . . . . . . . . . . . . . . . . Leaders
It currently supports three backends:
-
AsciiDoctor (Ruby) -
backend-html5
-
AsciiDoctor-PDF (Ruby) -
backend-pdf
-
AsciiDoctor.js -
backend-webview-html5
- See AsciiDoctor.js Dot Leader Inline Macro
Markup And Usage Manual
Markup examples, rendered output examples, and extensive compatibility information is provided for multiple output formats in multiple formats:
-
Or clone the project and open the dot_leader_example.adoc file with Visual Studio Code’s Asciidoc’s preview window.
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:
-
Install the library.
-
Create an
.asciidoctor/lib/
folder in the root of the asciidoctor project. -
Set up the target project directory to use the extension by using either of these methods:
-
Copy the
.dot_leader.js
file to the.asciidoctor/lib/
folder. -
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')
-
-
Enable the AsciiDoc Extension’s ability to use extensions in the Preview function using either of these methods:
-
Set this configuration flag:
"asciidoc.extensions.registerWorkspaceExtensions": true
-
Enable the Asciidoc > Extensions: Register Workspace Extensions option.
-
-
Open a document containing
dot:leader[]
inline macros, and press the Preview button.
Copyright
Copyright © 2025-present 白一百 baiyibai Free use of this software is granted under the terms of the MIT License.
-
The image The «Public Domain Mark» icon from Creative Commons with transparent background. is in the public domain and taken from:
https://commons.wikimedia.org/wiki/File:Cc-public_domain_mark.svg -
The CSS taken from https://www.w3.org/Style/Examples/007/leaders.en.html.
For the full text of the license, see the LICENSE file.