17.1 Cut Points

We make the following temporary definitions so to cheat CutAt and the likes that definitions for the keywords exist.

<..book / report / article cut points..>
 \Configure{UndefinedSec}{likepart}
 \Configure{UndefinedSec}{likechapter}
 \Configure{UndefinedSec}{likesection}
 \Configure{UndefinedSec}{likesubsection}
 -_-_-

<..ams art, proc, book..>
 \Configure{UndefinedSec}{likepart}
 \Configure{UndefinedSec}{likechapter}
 \Configure{UndefinedSec}{likesection}
 \Configure{UndefinedSec}{likesubsection}
 -_-_-

<..latex html cut points..>
 \def\cut:gr#1{\lk:#1like<.par del.>%
     \ifx \:temp\empty \expand:after{%
        \expand:after{\expandafter\let\csname #1\endcsname=}%
                                      \csname :#1\endcsname
        \ct:gr{#1}%
        \expand:after{\expandafter\let\csname :#1\endcsname=}%
                                      \csname #1\endcsname
        \expandafter\let\csname #1\endcsname=\:UnDef}%
     \else
         \expand:after{\ct:gr{#1}}%
     \fi}
  \def\ct:gr#1{%
    \edef\:temp{%
       \let\:csname \HP:file : #1\endcsname =\:csname #1\endcsname
       \let\:csname \HP:file :Cut:#1\endcsname =\:csname Cut:#1\endcsname
       \def\:csname #1\endcsname{%
          \noexpand \@ifnextchar*{\noexpand\after:gobble
                                       \:csname :like#1\endcsname}%
                                 {\:csname \HP:file :#1-\endcsname}}%
       \def\:csname \HP:file :#1-\endcsname####1{%
          \noexpand\cond:cs{\HP:file}{####1}%
          \:csname \HP:file : #1\endcsname{####1}}%
       \def\:csname Cut:#1\endcsname####1{%
          \noexpand\cond:cs{Cut:\HP:file}{####1}%
          \noexpand\cond:cs{\HP:file :Cut:#1}{####1}}%
    }\:temp }
 \def\lk:#1like#2<.par del.>{\def\:temp{#1}}
 \def\after:gobble#1#2{#1}
 -_-_-