On 01/07/2020 09:33 PM, Phil J. wrote:
I have just tried out the DocX to HTML conversion, in particular
conversion to the "Web Help" format.
This fits my needs to high degree, but I have two questions:
[1]
Indentation of code blocks
The document I used for testing contained code examples, for example
<UserControl.Resources>
<ResourceDictionary>
...
</ResourceDictionary>
</UserControl.Resources>
(Sorry, that looks awful. That is a problem with my Email program
Thunderbird.)
In the converted output, all of the indentation was lost
<UserControl.Resources>
<ResourceDictionary>
...
</ResourceDictionary>
</UserControl.Resources>
In fact all of the spacing was lost as well.
As it stands, that is not acceptable.
Is there some option in your program, or a formatting option in Word,
which would fix that?
[2]
I would want to links from my application into specific pages in the Web
Help, for context sensitive help.
I notice that the links for the Table of Contents are fairly cryptic.
Is there a way to influence the names used for the links?
Are the links guaranteed to be the same if the web help is regenerated?
I also noticed that the Web Help is in fact one large HTML page, where
the TOC links to anchors within the page. Is this the only option? I
think that I would prefer one HTML page for every item in the contents
(which is what your online conversion tool generates.)
I'm almost sure that w2x can be configured to solve problems [1], [2]
and [3].
[1] Map the custom MS-Word style you use for your code examples (e.g.
"CodeExample") to HTML <pre>. There is a "wizard" for that in the
w2x-app desktop application:
https://www.xmlmind.com/w2x/_distrib/doc/w2x_app_help/options_wizard_style_mapping_screen.html
[2] Add MS-Word bookmarks to your headings and/or, if you generate
"semantic HTML" and not "styled HTML", use an option like
-p edit.ids.generate-section-ids yes
Search for "ids.generate-section-ids" in
https://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#edit_step
[3] About the "Web Help as a single HTML page" issue:
a) Make sure to use for your headings, the MS-Word stock styles or
custom MS-Word styles having an outline level. If MS-Word cannot
automatically generate a nice TOC in the DOCX, then the Web Help cannot
be OK.
b) Use option
-p webhelp.split-before-level 8
See https://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#webhelp_step
Search for "split-before-level" in
https://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#split_step
----------------------------------------------------------------------
If you want, you can send me a sample (but realistic) DOCX of yours
having these problems and I'll send you an w2x option file which solves
them. It's quicker for me to do that than explain what to do.
Also tell me if you want to generate Web Help containing "semantic HTML"
(to be restyled by using a custom CSS) or "styled HTML" (looking like
the DOCX because it contains equivalent CSS styles).
----------------------------------------------------------------------
---
PS: Generated Web Help in future w2x v1.9 (March 2020) will be *much*
nicer and also will be "responsive" by default. The following Web helps
show you how they'll look like:
* Classic layout:
https://www.xmlmind.com/ditac/_distrib/doc/manual/webhelp/index.html
* Simple layout:
https://www.xmlmind.com/ditac/_distrib/doc/manual/webhelp2/index.html
Do not hesitate to open these also on your mobile phone.
--
XMLmind Word To XML Support List
w2x-support@xmlmind.com
https://www.xmlmind.com/mailman/listinfo/w2x-support