Parameters

About prefix "wh-"

Whc also accepts the parameters below prefixed with "wh-". For example, it accepts collapse-toc as well as wh-collapse-toc. This prefix is required when whc is embedded in XMLmind DITA Converter, XMLmind Ebook Compiler, XMLmind XSL Utility and XMLmind XML Editor.

Parameter Value Description

--CSS_VAR_NAME

String. A valid CSS property value.

No default.

This kind of parameter may be used to override any of the default values of the CSS variables specified in any of the NNtheme.css template files (all found in whc_install_dir/whc_template/_wh/).

For example, the main NNtheme.css template file:

body {
    ...
    --navigation-width: 33%;
    ...
}

The --navigation-width CSS variable is used as follows in NNcommon.css, another CSS template file:

#wh-navigation {
    ...
    width: var(--navigation-width);
    ...
}

Therefore parameter --navigation-width may be used to give the navigation side of the generated Web Help a different initial width. Example: -p --navigation-width "25%".

More examples in "Getting started".

add-index

yes or no.

Default value: no.

Specifies whether an "index.html" file should be automatically created if this output file does not already exist.

This automatic "index.html" file is created simply by copying the first page generated out of the first file passed to the compiler.

Note that the actual file suffix used for this file is not always ".html". It's the same file suffix as the copied page (if no suffix, ".html").

collapse-toc

yes or no.

Default value: no.

Specifies whether the TOC should be initially collapsed.

default-language

A language code conforming RFC 3066. Examples: de, fr-CA.

Default value: en.

Specifies the language used when an XHTML input page does not specify a xml:lang or lang attribute on its html root element.

favicon

Filename or absolute URI of an image file. A relative filename is relative to the current working directory.

Specifies the favicon to be added to all the XHTML pages decorated by the compiler.

This file is copied to output_directory/_wh/user/.

Example:

-p favicon wh_resources/favicon.png

causes the following link element to be added to all the XHTML pages generated by the compiler:

<link href="_wh/user/favicon.png"
      rel="icon" type="image/png" />

index-numbers

yes or no.

Default value: no.

Specifies whether words looking like numbers are to be indexed.

Examples of such number-like words: 3.14, 3,14, 3times4equals12, +1, -1.0, 3px, 1,2cm, 100%, 1.0E+6, 1,000.00$.

inherit-font-and-colors

yes or no.

Default value: no.

By default, the navigation pane of the generated Web Help uses fonts and colors of its own, which will generally differ from those used for the content of the Web Help.

Setting inherit-font-and-colors to yes lets you use for the navigation pane the same fonts and colors as those used for the content of the Web Help.

Basically this parameter is a shorthand for:

-p --navigation-font-family inherit \
-p --navigation-font-size inherit \
-p --navigation-color inherit \
-p --navigation-background-color inherit

See above --CSS_VAR_NAME parameters.

jquery

Relative or absolute URI. A relative URI is relative to the URI of a page of the Web Help.

Default value: absolute URI of the corresponding file (minified but not “slim”) found on the Google CDN.

Specifies the location of the JavaScript file containing jQuery.

Example: https://code.jquery.com/jquery-3.7.1.slim.min.js.

Specifying an "https:" URL is recommended when the generated Web Help is stored on an HTTPS server.

local-jquery

yes or no.

Default value: no.

Specifies whether all jQuery files should be copied to _wh/jquery/, where _wh/ is the directory containing the other Web Help files.

By default, the jQuery files are accessed from the Web (typically from a CDN).

Note that this parameter is applied after JQuery has been possibly customized using parameter jquery. For example, "-p jquery https://code.jquery.com/jquery-3.7.1.js" copies a file downloaded from https://code.jquery.com/ to _wh/jquery/.

layout

The name of a layout.

Default value: classic.

Selects a layout for the generated Web Help.

For now, only 3 layouts are supported: classic, simple and corporate.

responsive-ui

yes or no.

Default value: yes.

Specifies whether the generated Web Help should be “responsive”, that is, whether it should adapt its layout to the size of the screen.

ui-language

"browser" or "document" or a language code conforming RFC 3066. Examples: de, fr-CA.

Default value: "browser".

Specifies which language should be used for the messages (tab labels, button tool tips, etc) of the generated Web Help.

Default value "browser" means that this language is the one used by the Web browser for its own messages. This language may often be specified in the user preferences of the Web browser.

Value "document" means that the language of the document (the lang attribute of the html root element of the first XHTML source page if any; value of parameter default-language otherwise) should be used.

A language code such as en, en-US, es, es-AR, etc, may be used to explicitly specify which language should be used.

use-stemming

yes or no.

Default value: yes.

Specifies whether stemming should be used to implement the search facility.

By default, stemming is used whenever possible, that is,

  1. when the main language of the XHTML pages to be compiled can be determined;
  2. when this main language is one of: Danish, Dutch, English, Finnish, French, German, Hungarian, Italian, Norwegian, Portuguese, Russian, Spanish, Swedish, Romanian, Turkish.

The main language of the XHTML pages to be compiled is specified by the lang or xml:lang attribute found on the root element of the first XHTML page; otherwise the main language is specified using parameter default-language; otherwise, it is assumed to be "en".

user-css

Filename or absolute URI of a CSS file. A relative filename is relative to the current working directory.

Specifies the user's CSS stylesheet which is to be added to an XHTML page decorated by the compiler.

This file is copied to output_directory/_wh/user/.

Sample user's CSS wh_resources/header_footer.css as used in the following example:

-p user-header wh_resources/header.html \
-p user-footer wh_resources/footer.html \
-p user-css wh_resources/header_footer.css \
-p user-resources wh_resources/header_footer_files

Filename or absolute URI of an XHTML file. A relative filename is relative to the current working directory.

Specifies the user's footer which is to be added to each XHTML page decorated by the compiler.

The content of the body element of user-footer is inserted as is in the <div id="wh-footer"> found in each XHTML page decorated by the compiler.

Same remark as for parameter user-header about the resources referenced by a user's footer.

Sample user's footer wh_resources/footer.html as used in the following example:

-p user-header wh_resources/header.html \
-p user-footer wh_resources/footer.html \
-p user-css wh_resources/header_footer.css \
-p user-resources wh_resources/header_footer_files

More examples in "Getting started".

user-header

Filename or absolute URI of an XHTML file. A relative filename is relative to the current working directory.

Specifies the user's header which is to be added to each XHTML page decorated by the compiler.

The content of the body element of user-header is inserted as is in the <div id="wh-header"> found in each XHTML page decorated by the compiler.

If a user's header references resources (e.g. image files), then these resources must either be referenced using absolute URLs or these resources must be found in a user's resource directory and parameter user-resources must be specified.

Example:

  • The user's resource directory is called header_footer_files/ and contains header_footer_files/logo100x50.png.
  • whc is passed parameters -p user-resources PATH_TO/header_footer_files and -p user-header PATH_TO/header.html.
  • header.html looks like this:
    <html>
    ...
    <body>
    ...
    <img src="_wh/user/header_footer_files/¬
    logo200x100.png" />
    ...
    </body>
    </html>

    Notice the path used to reference logo200x100.png.

Sample user's header wh_resources/header.html as used in the following example:

-p user-header wh_resources/header.html \
-p user-footer wh_resources/footer.html \
-p user-css wh_resources/header_footer.css \
-p user-resources wh_resources/header_footer_files

More examples in "Getting started".

user-resources

Filename or absolute "file:" URI of a directory. URI schemes other than "file" (e.g. "http") are not supported for this parameter. A relative filename is relative to the current working directory.

Specifies a user's resource directory which is to be recursively copied to output_directory/_wh/user/.

This directory typically contains image files referenced by the user's header, footer or CSS stylesheet.

Sample user's resource directory wh_resources/header_footer_files/ as used in the following example:

-p user-header wh_resources/header.html \
-p user-footer wh_resources/footer.html \
-p user-css wh_resources/header_footer.css \
-p user-resources wh_resources/header_footer_files

More examples in "Getting started".