Phil J. wrote:

As indicated in the link:
https://www.xmlmind.com/w2x/_distrib/doc/w2x_app_help/options_wizard_style_mapping_screen.html


*This screen is **/not/**displayed when the chosen output format is
**/styled (X)HTML of any kind/*

That seems like a pretty big restriction, and I'm fairly sure that I
want to use the "styled HTML".

This is should not be a restriction at all. I mean, the "MS-Word style to XML element map" screen should have no purpose whatsoever when you generate "Styled HTML". Explanations below.

Please generate some "Styled HTML" and open the generated files in a text editor. You'll see that "Styled HTML" contains:

1) The CSS equivalent of the MS-Word styles being used, whether custom or stock.

2) Basically a bunch of HTML <p>s (and no "block" element other than <p>) styled using the above CSS styles.

One of the issues you faced is that indentation is not preserved in the styled HTML <p>s containing your code examples.

This is clearly a bug because "Styled HTML" is expected to faithfully look like the original DOCX. (Unfortunately, we currently don't know how to fix this bug.)

In a nutshell, if you just want "Styled HTML" and want to preserve indentation in the styled HTML <p>s containing your code examples,

* In a perfect world, you would have nothing special to do.

* In practice, you cannot simply map these <p>s to <pre>s using the Wizard. You'll have to write a w2x customization by hand, in the form of a small XED script.

See "6.1.1 Using a XED script to modify the styles embedded in the XHTML+CSS file", https://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#modify_embedded_styles

The example used in that section resembles you use case:
---
set-rule(".p-ProgramListing", "white-space", "pre");
---




By the way, the drop down list shown in this screen shot contains the
number 4 two times (and no number 5), which is surely a mistake.


Yes. Bug fixed now. Thanks!



---
PS: "Styled HTML" is just a by-product of what w2x can really do: generate semantic XML. I currently don't know much of our customers who is interested in this by-product.

--
XMLmind Word To XML Support List
w2x-support@xmlmind.com
https://www.xmlmind.com/mailman/listinfo/w2x-support

Reply via email to