You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ The gem currently does the following:
31
31
* Resize any local images in the HTML file to fit within the maximum page size. (Word will otherwise crash on reading the document.)
32
32
* Optionally apply list styles with predefined bullet and numbering from a Word CSS to the unordered and ordered lists in the document, restarting numbering for each ordered list.
33
33
* Convert all lists to native Word HTML rendering (using paragraphs with `MsoListParagraphCxSpFirst, MsoListParagraphCxSpMiddle, MsoListParagraphCxSpLast` styles)
34
+
* Generate additional list styles in CSS for any ordered lists with a new start number.
34
35
* Convert any internal `@id` anchors to `a@name` anchors; Word only hyperlinks to the latter.
35
36
* Generate a filelist.xml listing of all files to be bundled into the Word document.
36
37
* Assign the class `MsoNormal` to any paragraphs that do not have a class, so that they can be treated as Normal Style when editing the Word document.
@@ -43,7 +44,7 @@ For a representative generator of HTML that uses this gem in postprocessing, see
43
44
44
45
This gem generates `.doc` documents. Future versions may upgrade the output to `docx`.
45
46
46
-
Because `.doc` is the format of an older version of Microsoft Word, the output of this gem do *not* support SVG graphics. (Word itself converts SVG into PNG when it saves documents as Word HTML, which is the input to this gem.)
47
+
Because `.doc` is the format of an older version of Microsoft Word, the output of this gem do *not* support SVG graphics. Word itself converts SVG into PNG when it saves documents as Word HTML, which is the input to this gem. External consumers of this gem in Metanorma convert SVG to EMF.
47
48
48
49
There there are two other Microsoft Word vendors in the Ruby ecosystem.
49
50
@@ -150,7 +151,9 @@ left-aligned or right-aligned, add `style="text-align:left"` or
150
151
151
152
152
153
=== Lists
153
-
Natively, Word does not use `<ol>`, `<ul>`, or `<dl>` lists in its HTML exports at all: it uses paragraphs styled with list styles. If you save a Word document as HTML in order to use its CSS for Word documents generated by HTML, those styles will still work (with the caveat that you will need to extract the `@list` style specific to ordered and unordered lists, and pass it as a `liststyles` parameter to the conversion). Word HTML understands `<ol>, <ul>, <li>`, but its rendering is fragile: in particular, any instance of `<p>` within a `<li>` is treated as a new list item (so Word HTML will not let you have multi-paragraph list items if you use native HTML.) This gem now exports lists as Word HTML prefers to see them, with `MsoListParagraphCxSpFirst, MsoListParagraphCxSpMiddle, MsoListParagraphCxSpLast` styles. You will need to include these in the CSS stylesheet you supply, in order to get the right indentation for lists.
154
+
Natively, Word does not use `<ol>`, `<ul>`, or `<dl>` lists in its HTML exports at all: it uses paragraphs styled with list styles. If you save a Word document as HTML in order to use its CSS for Word documents generated by HTML, those styles will still work (with the caveat that you will need to extract the `@list` style specific to ordered and unordered lists, and pass it as a `liststyles` parameter to the conversion). The gem will duplicate the ordered list style definition to provide new styles, in order to deal with custom numbering.
155
+
156
+
Word HTML understands `<ol>, <ul>, <li>`, but its rendering is fragile: in particular, any instance of `<p>` within a `<li>` is treated as a new list item (so Word HTML will not let you have multi-paragraph list items if you use native HTML.) This gem now exports lists as Word HTML prefers to see them, with `MsoListParagraphCxSpFirst, MsoListParagraphCxSpMiddle, MsoListParagraphCxSpLast` styles. You will need to include these in the CSS stylesheet you supply, in order to get the right indentation for lists.
0 commit comments