"Fossies" - the Fresh Open Source Software Archive

Member "hevea-2.35/deepcut.hva" (16 Jan 2021, 2243 Bytes) of package /linux/www/hevea-2.35.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2 %% Instruct hacha to cut everywhere from part to subsection %%
    3 %% Some code contributed by Gilles Gregoire                 %%
    4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    6 % Inactivate cutting macros %
    7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    8 \let\dc@cutdef\cutdef
    9 \let\dc@cutend\cutend
   10 %%%%%%%%%%%%%%%%%%%
   11 %% cut footnotes  %
   12 %%%%%%%%%%%%%%%%%%%
   13 \let\deepcut@thefootnotes\thefootnotes
   14 \let\enddeepcut@thefootnotes\endthefootnotes
   15 \renewenvironment{thefootnotes}[2][]
   16 {\begin{cutflow}{Notes}\begin{deepcut@thefootnotes}{#2}}
   17 {\end{deepcut@thefootnotes}\end{cutflow}}
   18 %%%
   19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   20 %% sectionning commands
   21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   22 \newif\ifcutchapter\cutchapterfalse
   23 \let\dc@part\part\let\dc@part*\part*
   24 \renewcommand{\part}[2][]
   25 {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse
   26 \ifcutsection\dc@cutend\fi\cutsectionfalse
   27 \ifcutchapter\dc@cutend\fi
   28 \ife#1\dc@part{#2}\else\dc@part[#1]{#2}\fi
   29 \dc@cutdef{chapter}\cutchaptertrue}
   30 \renewcommand{\part*}[1]
   31 {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse
   32 \ifcutsection\dc@cutend\fi\cutsectionfalse
   33 \ifcutchapter\dc@cutend\fi
   34 \dc@part*{#1}%
   35 \dc@cutdef{chapter}\cutchaptertrue}
   36 %%%%%%%%%%%%%%%%%%
   37 \newif\ifcutsection\cutsectionfalse
   38 \@ifundefined{chapter}{}
   39 {\let\dc@chapter\chapter\let\dc@chapter*\chapter*
   40 \renewcommand{\chapter}[2][]
   41 {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse
   42 \ifcutsection\dc@cutend\fi
   43 \ife#1\dc@chapter{#2}\else\dc@chapter[#1]{#2}\fi
   44 \dc@cutdef{section}\cutsectiontrue}
   45 \renewcommand{\chapter*}[1]
   46 {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse
   47 \ifcutsection\dc@cutend\fi
   48 \dc@chapter*{#1}%
   49 \dc@cutdef{section}\cutsectiontrue}}
   50 %%%%%%%%%%%%%%%%%%
   51 \newif\ifcutsubsection\cutsubsectionfalse
   52 \let\dc@section\section
   53 \let\dc@section*\section*
   54 \renewcommand{\section}[2][]
   55 {\ifcutsubsection\dc@cutend\fi
   56 \ife#1\dc@section{#2}\else\dc@section[#1]{#2}\fi
   57 \dc@cutdef{subsection}\cutsubsectiontrue}
   58 \renewcommand{\section*}[1]
   59 {\ifcutsubsection\dc@cutend\fi
   60 \dc@section*{#1}%
   61 \dc@cutdef{subsection}\cutsubsectiontrue}
   62 %%%%%Check that!
   63 \AtEndDocument
   64 {\ifcutsubsection\dc@cutend\fi\ifcutsection\dc@cutend\fi\ifcutchapter\dc@cutend\fi}
   65