No commit activity in last 3 years
No release in over 3 years
Asciidoctor legal extension
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 1.3
~> 1.6
~> 10.5

Runtime

 Project Readme

Asciidoctor Legal Extension

Asciidoctor Legal is an simple extension that adds features useful for writing legal documents in Asciidoctor.

Warning
This is in very early development stages and currently has one feature: numbered paragraphs.

Installation

Asciidoctor Legal is a RubyGem and can be installed via gem or bundle commands:

$ gem install asciidoctor-legal

Paragraph Numbering

Legal documents require paragraph numbering and cross linking. This functionality seems to be supported with the docbook backend of Asciidoctor but not with the html5 backend.

This extension provides an InlineMacro that allows numbering of paragraph in documents. To use it simply add the inlime macro to the paragraphs you want numbered:

legal:p1[] This is a numbered paragraph.

legal:p2[] This is another numbered paragraph.

This is a non numbered paragraph.

This is an xref link to the numbered paragraph <<p1>>.

The resulting HTML5 rendering will look like:

*[0001]* This is a numbered paragraph.

*[0002]* This is another numbered paragraph.

This is a non numbered paragraph.

This is an xref link to the numbered paragraph [0001].

The first paragraph contains the legal inline macro with p1 as target. This target can be used anywhere in the document to create cross links with [p1]. Any valid attribute name can be used as target.