.. :  

************************
 chm 
************************
..  <chminfo>
        <decoration>
            <topic/>
            <a href="#" onclick="mychminfo.style.display=(mychminfo.style.display=='')?'none':''">chminfo  </a>
            <pre id="mychminfo" style="display:none">
                <subst node="chminfo" asxml="1"/>
            </pre>
        </decoration>
        <alinks>_1cpp_chm_create_</alinks>
        <href>
            <a href="self"><title to="self"/></a>
        </href>
        <hrefcombine>
            <ul>
                <foreach><li><item/></li></foreach>
            </ul>
        </hrefcombine>
    </chminfo>

.. contents:: 
    :backlinks: none

      chm-  
html-,  reSt'.   
   1++,      
 .

  reSt' html-   chm-
  "html2chm.js".
   -       
` `__      
  - "",      ,
       "HTML Help WorkShop" :

- html-   (**),      html-
-    (\*.hhp)
-   (\*.hhc)
-    (\*.hhk)

   bat-,     
  ,   bat-.

.. __ : `   `_

  chm-   "hhc", 
 *"HTML Help Workshop"*.


    
-----------------------------------
..  <chminfo>
        <klinks>
            
            
        </klinks>
    </chminfo>

  chm-     :

- MSXML   4.0
- WSH 5.6
- HTML Help Workshop

  chm-  ::

    cscript "  html2chm.js" //nologo "  html-" ["  chm-"]

       .
   chm-  ,    
 .

       ,
  chm-   "    .hhp".

**    ""  (\*.css,    )
      .**


    hhc.exe::

    hhc.exe "   chm  (.hhp)"

    -    .
         
    *"Settings"*.   
  "Win32 CHM"    *"Custom build"*
,        :

Description:
     ,      
Commands:
    ::

        set intname="$(IntDir)\$(InputName).html"
        set hhpname="$(IntDir)\$(InputName).hhp"
        set chmname="$(OutDir)\$(InputName).chm"
        if exist %intname% del %intname%
        rst2html.py --output-encoding=CP1251 "$(InputPath)" %intname%
        if not exist %intname% (
            echo Error create %intname%
            exit 1
        )
        cscript "$(ProjDir)\html2chm.js" //nologo //d %intname% "$(OutDir)"
        if not exist %hhpname% (
            echo Error create %hhpname% and project files
            exit 1
        )
        if exist %chmname% del %chmname%
        if exist %chmname% (
            echo Error delete old %chmname%
            exit 1
        )
        hhc %hhpname% > nul
        if not exist %chmname% (
            echo Error create %chmname%
            exit 1
        )
        call "$(IntDir)\$(InputName)del.bat"
        del "$(IntDir)\$(InputName)del.bat"
        exit 0

Outputs:
    $(OutDir)\$(InputName).chm


     rst2html.py 
 .

,      hhc.exe (HTML Help WorkShop)
     MS VC++::
    
    Tools -> Options -> Directories -> Show directories for -> Executable Files

          
rst2html.py

    chm-   
 .


   
---------------------------
..  <chminfo>
        <klinks>
            
        </klinks>
    </chminfo>


****.
        , 
    ,  reSt'.

       **** 
   ,     chm-.
        ::

    *****************************
      
    *****************************
    .. contents:: 
        :backlinks: none

         .

       
    --------------------------

        CHM View,
     ""  
  .    .
  ,     -  ,
   contents  .


   
-----------------------------------------
..  <chminfo>
        <klinks>
            
        </klinks>
        <alinks>
            _split_topics_
            alink_klink_use
        </alinks>
    </chminfo>

   -      "",
    ,  reSt'.

      , 
 chm-.
     xml-,  
  `chminfo`_ *(chm-)*.
    chm-,  ``__  
,   .
      , 
    html-.
      ,
  ,        `chminfo`_.
      .
  chm- - ,   
 ,   .

::

     
    ----------------------
    ..  <chminfo>
        </chminfo>
    
     .....

.. __ : ` `_

 chm-  ,      
chm-,      ,
    `insert`_,    
  chm-.     
**<xml><common>**.        .
         
 ,       include.


  html- 
-------------------------------------------------
..  <chminfo splitchild="0">
        <toc><self/></toc>
    </chminfo>

      :

  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      MSXML .
       codepage CP1251
 windows-1251,     `chminfo`_.
    MSXML .   
     .
     ,  
`   *alink*  *klink*`__.

.. __: `      `_

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ,    ,
      . 
      . 
  :

-    chm- .
-    `insert`_  chm-.
-  ``__ chm-  
    .
-   `    `__.
-   ,     .
-         
    ,     .

.. __: ` `_
.. __: `  `_

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ,     .
   -    ,  
  "" ,     
        , 
     .   
  :

-   `subst`_  chm- .
-  `   `__  chm- .
-  ` `__,   .
-  `   `__,   
     .
-  ` `__ chm-   .
-     :

  -  `   `__,   
      .
  -  `html `__ (title) .
  -  ``__ .
  -    .
  -     ,    
     .

.. __: `   `_
.. __: `      `_
.. __: `    `_
.. __: `    `_
.. __: `    `_
.. __: ` html- `_
.. __: ` `_


  chm-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ,   , 
 "HTML Help Workshop"   chm-.

-  .
-  .
-   .
-  ,     .

       chm
 ``__.

.. __: `   chm-`_


  chm-
---------------------------------------

  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      
      .
   ,   :

1.  `chminfo`_   "split"
   
   +  - .2
   +  - .3
    
2.  split="0"
    
   +  -  
   +  - 
    
3.     `chminfo`_   "splitchild"
    
   +  - .4
   +  - .5
    
4. splitchild="0"
    
   +  -  
   +  - 
    
5.      
    
   +  - 
   +  -  

    ,      .

  chm-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. <chminfo><alinks>collection_processing</alinks></chminfo>

       
  ,      
 `insert`_.     
      <xml><`common`_>,     ,
   `nochilds`_.

`. |collection_processing <alink>`_

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   chm-  ,   
,   ""  chm-
     .     
  `chminfo`_,     ,    .
       ,
  `chminfo`_  .

    :

1. .     ,
       .
  
   ,      `decoration`_,  
         .

2.    -   `chminfo`_.
  
   ::

     :
        <chminfo>
            <decoration>
                <title to="selfremove"/>
            </decoration>
        </chminfo>
    
     :
        <chminfo>
            <decoration>
            </decoration>
        </chminfo>

    decoration/title  .

3.    2.   
       `childs`_,  
      ,    ,
        `chminfo`_.  1.
   .

   ::

     :
        <chminfo>
            <decoration>
                <title to="selfremove"/>
            </decoration>
            <childs>
                <decoration>
                    <title to="parent"/>::<title to="selfremove"/>
                </decoration>
            </childs>
        </chminfo>
    
       :
        <chminfo>
        </chminfo>

       :
        <chminfo>
            <decoration>
                <title to="parent"/>::<title to="selfremove"/>
            </decoration>
        </chminfo>
#.   :
   
   - `alinks`_
   - `klinks`_
   - `nochilds`_
   - `toc`_

#.   - `chminfo`_   .


   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..	<chminfo><alinks>subst_processing</alinks></chminfo>

   ,   html- 
,    ,   
        .

   

- `title`_
- `subst`_

 ,    <a> ()  
href,   .

::

  <title to="parent"/>

      , 

::

  <a href="next"></a>

  

::

  <a href="    "></a>


`. |subst_processing <alink>`_


      
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..  <chminfo><alinks>process_keywords</alinks></chminfo>

  chm      : klink  alink.

klink - **** ,     ,
        ,  
 ()  .  ,   
  ,    .

alink - **** ,  ,   
    .  
    ,     .

  alink  klink    
*" "*,        
chm-,    ,   .

  :

,     
    **  (alink).    
  ,     chm-
  ,    ,  
 ,    .
     ,    
 .         
.  ,     
      ,    
 alink,      .

      `alinks`_  `klinks`_.
    `chminfo`_  `autokw`_ 
   .

  ,      ,
    ::

     klink
  ` | 1[|  ...] <klink>`_

     alink
  ` | 1[|  ...] <alink>`_

     ::

   1...

    
  -------------------------
  .. <chminfo>
       <alinks>_the_best_topic_</alinks>
     </chminfo>
  
   

   2...

    `  |_the_best_topic_ <alink>`_?

 ,       
  ,      ,
    ::

    " .chm::/  chm"

    :

    `  <TableField.chm::/TableField0.html>`_


`. |process_keywords <alink>`_


    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. <chminfo><alinks>href_processing</alinks></chminfo>


       
    chm-   
    ,     
        .

       `href`_
  **** .     ""
html-,        
  . ::

   <href>
       <div>: <a href="self"><span style="color:red"><title to="self"/></span></a></div>
   </href>

     `href`_ html   
     . ,  `href`_
,    .

       `hrefcombine`_
 ,    .   
   html ,     
`foreach`_  `item`_.        
  (,     ),  
   `hrefcombine`_,       
""  `foreach`_,    `item`_ 
 .        
 . ::

    <hrefcombine>
        <ul>
            <foreach>
                <li><item/></li>
            </foreach>
        </ul>
    </hrefcombine>

`. |href_processing <alink>`_

    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
 `cnttitle`_  `toc`_.

`cnttitle`_        
.          .
        
.

`toc`_        .
    ,   
   ,     
   .

  `toc`_  :

- `folder`_,   .
- `self`_,      .
- `childstoc`_,     
  .
- `merge`_,       .

 1::

    <toc>
        <self>
            <childs/>
            <folder name=" ">
                <merge file="addon1"/>
                <merge file="addon2"/>
            </folder>
        </self>
    </toc>

      ,    
,       " ",
      addon1.chm  addon2.chm.

 2::

    <toc>
        <self/>
    </toc>

    ,   
 `  html- `_

 3::

    <toc>
        <self>
            <childs/>
        </self>
        <merge file="other"/>
    </toc>

       other.chm

 4::

    <toc>
        <folder name=" 4">
            <self>
                <childstoc/>
            </self>
            <folder name=" 4.2">
                <merge file="volume4_2"/>
            </folder>
        </folder>
    </toc>

 html- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         
 <head><title>,     
    chm-,  
 ,    .

    `chmtitle`_,  
    .    ,
        .

 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
    `decoration`_,   
 html-,      
  ,       `topic`_
    .

   chm-
-----------------------------------------
.. <chminfo><alinks>collection_processing</alinks></chminfo>

      chm-  
    , <xml><common>.
    `collection`_.
   - ,   , 
 .

 -       
       .

`. |collection_processing <alink>`_

  
-----------------------------------


chminfo
~~~~~~~~~~~~~~~~~~~~~
   chm- .
   chminfo   .

**:**
    [*split*]
         "0"      .
    [*splitchild*]
             split 
         chminfo  .
**:**
      chminfo,   
     .
** :**
    .

     chminfo,  .
   chminfo  ``__ 
  chminfo  .  split  splitchild
 ``__    .

.. __ : ` `_
.. __ : `  `_

autokw
~~~~~~~~~~~~~~~~~~~~~
..  <chminfo><alinks>process_keywords</alinks></chminfo>

      
 .

**:**
    *mode*
            . 
           :
        
        - 1 -       .
          (    ",")
        - 2 -      , 
               .  
           : `, "," ";" ":" "/" "\\"`
        -       .

**:**
         `chminfo`_. 
** :**
    .
    
        `childs`_
 ,        
.

`. |process_keywords <alink>`_

alinks
~~~~~~~~~~~~~~~~~~~~~
..  <chminfo><alinks>process_keywords</alinks></chminfo>

  **   .

**:**
    .
**:**
         `chminfo`_. 
** :**
      .

      "" ,
       
chm-,    " ".    
,        .
      ,    ,
     ,  .

    ,  - 
.

`. |process_keywords <alink>`_


klinks
~~~~~~~~~~~~~~~~~~~~~
..  <chminfo><alinks>process_keywords</alinks></chminfo>

  **   .

**:**
    .
**:**
         `chminfo`_. 
** :**
      .

       .
     .   
  ,    ,    
         .

    ,  - 
.

  ""  .  
   . ::

    <klinks>
        
        , chminfo
        , childs
    </klinks>

    ::

    
        chminfo
        childs

`. |process_keywords <alink>`_


decoration
~~~~~~~~~~~~~~~~~~~~~
 html- .

**:**
    .
**:**
         `chminfo`_. 
** :**
    html-, `topic`_, `subst`_, `title`_.

   "" html-,  
      ,   
 <BODY> html-.     
decoration   `topic`_.   ,
     decoration.

    ` 
 `__.

.. __ : `   `_

topic
~~~~~~~~~~~~~~~~~~~~~
      
`decoration`_.

**:**
    .
**:**
        `decoration`_. 
** :**
    .


href
~~~~~~~~~~~~~~~~~~~~~
.. <chminfo><alinks>href_processing</alinks></chminfo>

     ,   .

**:**
    .
**:**
         `chminfo`_. 
** :**
    html-, `subst`_, `title`_.

  `   `__  ,
        
.

.. __ : `   `_

`. |href_processing <alink>`_

hrefcombine
~~~~~~~~~~~~~~~~~~~~~
.. <chminfo><alinks>href_processing</alinks></chminfo>

      .

**:**
    .
**:**
         `chminfo`_. 
** :**
    html-, `subst`_, `title`_, `foreach`_, `item`_.

    ` 
 `__.

   c   "" ,
       .   
  hrefcombine,    
      `foreach`_,
   `item`_     .

.. __ : `   `_

`. |href_processing <alink>`_


foreach
~~~~~~~~~~~~~~~~~~~~~
       
html-    `hrefcombine`_.

**:**
    .
**:**
        `hrefcombine`_
** :**
    html-, `subst`_, `title`_, `item`_.

    ` 
 `__.

.. __ : `   `_

item
~~~~~~~~~~~~~~~~~~~~~
       
 `foreach`_.

**:**
    .
**:**
        `foreach`_
** :**
    .


childs
~~~~~~~~~~~~~~~~~~~~~
 ,    ``__ 
   .

.. __ : ` `_

**:**
    .
**:**
         `chminfo`_. 
** :**
    .

   childs  
     ,   
   `chminfo`_  .
        
      .

  childs  .


nochilds
~~~~~~~~~~~~~~~~~~~~~
   .

**:**
    .
**:**
    . 
** :**
    .

    ,   
   .  
   ,  
    `insert`_  `subst`_.

chmtitle
~~~~~~~~~~~~~~~~~~~~~
   <head><title>   .

**:**
    .
**:**
         `chminfo`_. 
** :**
    , `title`_, `subst`_.

        ,
   .   
`   `__  chmtitle,
     .

.. __ : `   `_

  .         ,
        ,
  `cnttitle`_.

cnttitle
~~~~~~~~~~~~~~~~~~~~~
       chm-.

**:**
    .
**:**
         `chminfo`_. 
** :**
    , `title`_, `subst`_.

 `  `__    
,     .  
 `   `__  cnttitle,
       .

.. __ : `    `_
.. __ : `   `_

  .         ,
       .

toc
~~~~~~~~~~~~~~~~~~~~~
(Table Of Contents)

  `  `__   .

.. __ : `    `_

**:**
    .
**:**
         `chminfo`_. 
** :**
    `self`_, `folder`_, `merge`_, `childstoc`_.

      toc 
  ,    
 ,       
   .

  .      
          .


self
~~~~~~~~~~~~~~~~~~~~~
   ,    ,  ,
 `cnttitle`_,  `  `__ 
 .

.. __ : `    `_


**:**
    .
**:**
        `toc`_. 
** :**
    `folder`_, `merge`_, `childstoc`_.

   self   `toc`_,   
  .

childstoc
~~~~~~~~~~~~~~~~~~~~~
    ,  
  `  `__   .

.. __ : `    `_

**:**
    .
**:**
        `toc`_. 
** :**
    .

   childstoc   `toc`_,   
   .


folder
~~~~~~~~~~~~~~~~~~~~~
     
`  `__   .

.. __ : `    `_

**:**
    *name* -    .
**:**
        `toc`_. 
** :**
    `self`_, `folder`_, `merge`_, `childstoc`_.


merge
~~~~~~~~~~~~~~~~~~~~~
     chm- 
`  `__   .

.. __ : `    `_

**:**
    *file* -    chm-,  
      ,   chm.
**:**
        `toc`_. 
** :**
    .


insert
~~~~~~~~~~~~~~~~~~~~~~~~~~
..	<chminfo><alinks>subst_processing</alinks></chminfo>

 .

**:**
    *node*
            XPath,   
        selectSingleNode   `chminfo`_.
    *nodes*
            XPath,   
        selectNodes   `chminfo`_.
    *asxml*
           "1"    
         ,  xml- .
**:**
       `chminfo`_
** :**
    .

        
 .     
  chm-   ,   
     . ::

       :
    <chminfo>
        ...
        <nochilds>
            <decorformethods>
                <decoration>
                    ....
                </decoration>
            </decorformethods>
        </nochilds>
    </chminfo>

       :
    <chminfo>
        <insert node="//decorformethods/*"/>
    </chminfo>

   , *node*  *nodes* .
      .

    `subst`_, insert   
 `chminfo`_,   .  ,
   insert,   , 
     .

   ,     
  insert.   ,  
 insert,    ,  
 ,  .

`. |subst_processing <alink>`_

subst
~~~~~~~~~~~~~~~~~~~~~~~~~~
..	<chminfo><alinks>subst_processing</alinks></chminfo>

 .

**:**
    *node*
            XPath,   
        selectSingleNode   .
    *nodes*
            XPath,   
        selectNodes   .
    *asxml*
           "1"    
         ,  xml- .
**:**
       .
** :**
    .

        
 .      
   ,   
   . ::

       :
    <chminfo>
        <decoration>
            <table>
                <tr>
                    <td>:</td>
                    <td><subst nodes="topictitle/node()"/></td>
                </tr>
            </table>
        </decoration>
        <topictitle><title to="self"/></topictitle>
    </chminfo>

  <topictitle>   ,
   subst  <title to="self"/>.
       <topictitle>,
    `decoration`_::

    <chminfo>
        <topictitle>
            <a href="parent"><title to="parent"/></a>::<title to="self"/>
        </topictitle>
    </chminfo>

   , *node*  *nodes* .
      .

    `insert`_, subst   
  ,  ,   
 subst,        ,
       .

 ,    *node*  *nodes* 
   `chminfo`_,    .

   ,     
  subst.   ,  
 subst,    ,  
 ,  .

`. |subst_processing <alink>`_

title
~~~~~~~~~~~~~~~~~~~~~
..	<chminfo><alinks>subst_processing</alinks></chminfo>

    .

**:**
    *to*
        ,    . :

        - self -   
        - selfremove -    c  
        - next -   
        - prev -   
        - home -   
        - parent, parent[] -     .
             ,  *parent* == *parent[0]*

**:**
       `chminfo`_
** :**
    .

      html-.
        
title   *to*  "selfremove",   
  .

`. |subst_processing <alink>`_

a
~~~~~~~~~~~~~~~~~~~~~
..	<chminfo><alinks>subst_processing</alinks></chminfo>

   *"a"* html- (anchor, ),
  - html- chm-, 
  *href*,   .
    ,    
.

   *href*:
    self
            .  
          `href`_
    next
            
    prev
            
    home
            
    parent, parent[]
            
         .    ,  *parent* == *parent[0]*

 ,       *href*, 
*"alink"*  *"klink"*.       *"HHCtrl"*,
 ,   *ALink*  *KLink*,  
,    .
. `      `_.

   `chmlinks`_,  *href*,  *"click"*,
     *"HHCtrl"*

`. |subst_processing <alink>`_

chmlinks
~~~~~~~~~~~~~~~~~~~~~
  HHCtrl,   ALink  KLink.

**:**
    *type*
          .    :
        - ALink
        - KLink
**:**
       `chminfo`_. 
** :**
    html-, `keys`_.

   chm- HHCtrl,   
  ALinks  KLinks,    .
    `keys`_.    ,
 ,   chmlinks   .

  html-    'a'  
*href*,  "click".      .

keys
~~~~~~~~~~~~~~~~~~~~~
    `chmlinks`_

**:**
    .
**:**
       `chmlinks`_
** :**
      .

    .

common
~~~~~~~~~~~~~~~~~~~~~
.. <chminfo><alinks>collection_processing</alinks></chminfo>

     .

**:**
    .
**:**
       *xml*.
** :**
    .

    chm-,    
      .   
      chm-.

    ,  ::

    .. raw:: html
        <xml><common>
        ...
        </common></xml>

         
include::

    *************************************
      
    *************************************
    .. include:: commonchm.txt

 ..raw   ,     
 xml-,  <xml> -    
  html-,   chm.

  chm  <xml>,  <common>,    
.

    common   `collection`_.

`. |collection_processing <alink>`_

collection
~~~~~~~~~~~~~~~~~~~~~
.. <chminfo><alinks>collection_processing</alinks></chminfo>

    chm-.

**:**
    *master*
           .
    *title*
          ,   
         .
**:**
         `common`_. 
** :**
    `file`_.

 chm- -    , 
  .    ,   ,
   alinks.     ,
        ,  
       .

  collection  `file`_    .
        ,  
 .

`. |collection_processing <alink>`_

file
~~~~~~~~~~~~~~~~~~~~~
.. <chminfo><alinks>collection_processing</alinks></chminfo>

  .

**:**
    *name*
            ,   .
**:**
         `collection`_. 
** :**
    .

`. |collection_processing <alink>`_
