"Fossies" - the Fresh Open Source Software Archive

Member "hevea-2.35/labeltype.hva" (16 Jan 2021, 772 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 \ProvidesPackage{labeltype}
    2 %%%internal package for getting section type info for labels
    3 %%Redefinitions of \refstepcounter and \label to catch label types
    4 %%NB: label type is counter name
    5 \def\currentlabeltype{none}
    6 \let\@rt@oldrefstepcounter\refstepcounter
    7 \renewcommand{\refstepcounter}[1]
    8 {\def\currentlabeltype{#1}\@rt@oldrefstepcounter{#1}}
    9 \let\@rt@old@label\label
   10 \renewcommand{\label}[2][]
   11 {\@rt@old@label[#1]{#2}%
   12 \@auxdowrite{\@print{\@deflabeltype}\{#2\}\{\currentlabeltype\}\@print{
   13 }}}
   14 %%Hum also redefines \enumerate...
   15 \let\@rt@oldenumerate\enumerate
   16 \renewcommand{\enumerate}{\def\currentlabeltype{item}\@rt@oldenumerate}
   17 %NB:It is up to client packages to
   18 % (1) redefine/extend \@deflabeltype
   19 % (2) define \@lt@item@type
   20 \newcommand{\@deflabeltype}[2]{}