cogProvides the User Interface for Paragraphs Numbering
TypeXAR
CategoryApplication
Developed by

Manuel Leduc, Michael Hamann

Active Installs0
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

XWiki 14.0+

Installable with the Extension Manager

Description

This application allows to add numbers on paragraphs. This application depends on Numbered Headings Application.

Paragraph Numbering

Example

In the example below, a table of content is inserted at the top of the paragraphs-numbering macro using the tableOfParagraphs parameter.
The sixth header is not numbered using the skip="true" parameter.
Finally, third heard from the end is re-numbering at 10 using the start="10" style="--numbered-heading-start: 9;" parameters.

{{paragraphs-numbering tableOfParagraphs="true"}}
= Lorem ipsum dolor sit ame =

== consectetur adipiscing elit. Aliquam in nisi eget eros lacinia ==

=== laoreet a sit amet elit. Ut gravida massa nibh [...] Nam mattis dui vel ex vehicula convallis. ===

=== Morbi vehicula dui id orci maximus dignissim [...]. Nunc vitae metus eu quam congue sagittis. Quisque fringilla volutpat lectus, ac feugiat dolor posuere sit amet. ===

=== Nam tempor, enim convallis convallis euismod, [...] ac sollicitudin lorem laoreet id. In quis euismod turpis. Nam porttitor nulla turpis, in sagittis odio tempor sed. ===

(% data-xwiki-rendering-protected="true" %)
= Nullam vestibulum nulla iaculis =

(% data-numbered-headings-start="10" style="--numbered-headings-start: 9;" %)
== odio mollis laoreet. Proin venenatis mi nisi, quis aliquet nibh bibendum a. ==

=== Donec feugiat nibh id blandit dapibus. Sed et tristique lectus [...] Vestibulum congue molestie fringilla. ===

=== Proin malesuada lectus magna, eu hendrerit quam scelerisque placerat [...] at dapibus risus. Sed porta massa vel rhoncus ornare. ===
{{/paragraphs-numbering}}

Template

A template named Paragraphs Numbering Template is provided. It creates a document containing a paragraphs numbering macro with a short placeholder content.

Paragraphs Numbering Macro

The macro id is paragraphs-numbering.

Macro Parameters

Parameter nameDescriptionTypeDefault value
tableOfParagraphsWhen set to true, inserts a Table of Paragraphs at the top of the macro.Booleanfalse

Table of Paragraphs Macro

This macro inserts a table of the paragraphs in the current document. The macro id is top.

Macro Parameters

Parameter nameDescriptionTypeDefault value
depthDefine the heads levels included in the table of paragraphs. Header with a level lower or equal to the depths are included.Integer (1,2,3,4,5,6)2
scopeDefines the scope of the Table of Paragraphs. When PAGE is select, the Table of paragraphs includes all the Paragraphs Numbering macros of the Page. When LOCAL is selected, only the headers of the containing Table of Paragraphs macro are included.Enumeration (LOCAL/PAGE)PAGE

CKEditor Integration

All the CKEditor Integeration of Numbered Headings Application are also applicable inside the Table of Paragraphs macro.

1.1+ When the content of the macro is empty, the content is reset with an empty level 1 heading. That way, a numbered is displayed on the margin and the CKEditor actions are directly available.

Continue on Enter

When the cursor is locate in a heading inside a Table of Paragraphs macro. Pressing Enter inserts a heading of the same level in the next line (instead of a normal style line by default).
Pressing Enter on an empty heading replaces it with a normal style line.
Shift+Enter can be used to continue on the next line in the same paragraph.

Known Limitations

The same limitations as Numbered Headings Application regarding WYSIWYG and numbering inside groups are applicable to the Table of Paragraph.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Release Notes

v1.1

v1.0

Dependencies

Dependencies for this extension (org.xwiki.contrib.paragraph.numbering:application-paragraph-numbering-ui 1.1):

Tags:
    

Get Connected