... | ... | @@ -4,13 +4,13 @@ See page on the original [Pre-alpha Specs](pre-alpha-specs) (before redesign) |
|
|
|
|
|
HTMLevator supports structural induction and "section type inferencing" in conversion of data from (appropriately coded) `.docx` files into HTML. It is designed to be used with XSweet.
|
|
|
|
|
|
*Structural induction* means HTMLevator will produce `<section>` elements where needed to "wrap" (structure) unorganized contents. *Section type inferencing* means recognizing, for example, a "Conclusions" section (by means of its title and/or other properties) and submitting it to appropriate handling -- including validation, to detect whether and where such a section is permitted).
|
|
|
*Structural induction* means HTMLevator will produce `<section>` elements where needed to "wrap" (structure) unorganized contents. *Section type inferencing* means recognizing, for example, a **Conclusions** section (by means of its title and/or other properties) and submitting it to appropriate handling -- including validation, to detect whether and where such a section is required, expected or permitted.
|
|
|
|
|
|
HTMLevator relies on XSweet (a companion project) via its Header Promotion pathway to produce HTML h1-h6 in HTML extracted from Word `docx` files wherever Paragraph Styles are assigned named "Header 1" through "Header 6".
|
|
|
HTMLevator relies on [XSweet](../XSweet) (a companion project) via its Header Promotion pathway to produce HTML h1-h6 in HTML extracted from Word `docx` files wherever Paragraph Styles are assigned named "Header 1" through "Header 6".
|
|
|
|
|
|
Prepare Word file for HTMLevator requires by assigning Header 1 - Header 6 styles to your section titles at their respective levels of hierarchy. Within Word (since by default these styles are bound to the appropriate Outline level), this nominal structure can ordinarily be displayed in the Outline View (even before XSweet/HTMLevator are run).
|
|
|
Prepare your Word file for HTMLevator by assigning "Header 1" - "Header 6" styles to your section titles at their respective levels of hierarchy. (Assign the style to the first line of the title only. Subtitles or subsequent lines of multi-line titles should not use these styles.) Within Word (since by default these styles are bound to the appropriate Outline level), this nominal structure can ordinarily be displayed in the Outline View (even before XSweet/HTMLevator are run).
|
|
|
|
|
|
Given these Paragraph Style assignments, XSweet and HTMLevator do the rest - XSweet makes HTML with h1-h6, then HTMLevator makes nested sections for the detected headers. (And goes from there to do things with these sections if/as necessary).
|
|
|
When the Word file has these Paragraph Style assignments, XSweet and HTMLevator do the rest - XSweet makes HTML with h1-h6, then HTMLevator makes nested sections for the detected headers. (And goes from there to do things with these sections if/as necessary).
|
|
|
|
|
|
HTMLevator can also be used on files with no such preparation but YMMV - its efficacy depends entirely on whether/how XSweet header promotion works to detect h1-h6 on your file.
|
|
|
|
... | ... | @@ -18,8 +18,6 @@ More details: |
|
|
|
|
|
## Structural induction
|
|
|
|
|
|
Interpolate `<section>` elements appropriately.
|
|
|
|
|
|
Any sequence of HTML elements leading with a header (h1-h6) is wrapped as a section. Within the section, the h1-h6 plus its elements is following by sections for contiguous (subsequent) lower level sections.
|
|
|
|
|
|
I.e. h1 h2 h2 h3 h1 h2 h3 becomes section (h1 section (h2) section (h2 section (h3) ) ) section (h1 section (h2 (section h3) ) ).
|
... | ... | |