Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for numbering level overrides #30

Merged
merged 4 commits into from
Apr 12, 2017

Conversation

felipeochoa
Copy link
Contributor

Level overrides allow two different numbering schemes to share a single abstract numbering definition if they only differ in a few places. Beyond the usual styling properties, this allows you to override the numbering sequence, e.g., to skip a number:

1. Option 2
2. Option 3
5. [eliding option 4] Option 5

The api for this is:

const numbering = new Numbering();
const abs = numbering.createAbstractNumbering();
abs.createLevel(0, "lowerLetter", "%1)", "start").indent(1260, 540);
// ... create more levels
const num = numbering.createConcreteNumbering(abs);
num.overrideLevel(levelNum, newStart).level.indent(1500, 780);  // Can set indent, font, etc.

@dolanmiu dolanmiu merged commit a706455 into dolanmiu:master Apr 12, 2017
@felipeochoa felipeochoa deleted the overrides branch April 14, 2017 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants