%%
%% This is file `pdfcprot.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% pdfcprot.dtx  (with options: `package')
%% 
%% Copyright (C) 2001 Carsten Schurig.
%% Copyright (C) 2004 Tobias Schlemmer.
%% Email: keinstein_junior@gmx.net
%% 
%% This program may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%% 
%% For a list of files constituting this program see README.txt. For
%% further copyright information see README.txt and LEGAL.txt.
%% 
%% ----------------------------------------------------
%% This file is part of the LaTeX2e pdfcprot bundle.
%% ----------------------------------------------------
%% Some parts of the code are based on code by the
%% authors of pdftex.
%% ----------------------------------------------------
%% 
%%  This system is distributed in the hope that it will be useful,
%%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%% 
%% 
%% IMPORTANT NOTICE:
%% 
%% For error reports in case of UNCHANGED versions see documentation.
%% 
%% Please do not request updates directly. Distribution is
%% done through Mail-Servers, Mailboxes and TeX organizations.
%% 
%% You are not allowed to change this file.
%% 
%% You are allowed to distribute this file under the condition that
%% it is distributed together with all files mentioned in README.txt.
%% See LEGAL.txt for further information.
%% 
%% If you receive only some of these files from someone, complain!
%% 
%% You are NOT ALLOWED to distribute this file alone.




\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{pdfcprot}[2002/02/27 v1.5 character protruding using
pdflatex (cs)]
\RequirePackage{ifthen}
\RequirePackage{keyval}
\newcounter{CPROT@family}
\newcounter{CPROT@family@temp}
\newcounter{CPROT@series}
\newcounter{CPROT@series@temp}
\newcounter{CPROT@shape}
\newcounter{CPROT@shape@temp}
\newcounter{CPROT@size}
\newcounter{CPROT@size@temp}
\newboolean{CPROT@textcomp}
\newboolean{CPROT@quiet}
\setboolean{CPROT@quiet}{true}
\newcounter{CPROT@temp@chars}
\newcommand*{\CPROT@lowlevel@encoding}{}
\newcommand*{\CPROT@lowlevel@family}{}
\newcommand*{\CPROT@lowlevel@series}{}
\newcommand*{\CPROT@lowlevel@shape}{}
\newcommand*{\CPROT@resetall}{%
  \setcounter{CPROT@family}{0}%
  \setcounter{CPROT@series}{0}%
  \setcounter{CPROT@shape}{0}%
  \setcounter{CPROT@size}{0}%
  \setboolean{CPROT@textcomp}{false}%
  \edef\CPROT@lowlevel@encoding{}%
}
\newcommand*{\CPROT@setprotcodes@}{}
\newcommand*{\CPROT@setprotcodes@add}{%
  \setcounter{CPROT@family@temp}{\value{CPROT@family}}%
  \CPROT@aac@encoding%
}
\newcommand*{\CPROT@setprotcodes@temp}{}
\newcommand{\CPROT@packageinfo}[1]{%
  \PackageInfo{pdfcprot}{#1}%
  }
\newcommand{\CPROT@packagewarning}[1]{%
  \PackageWarning{pdfcprot}{#1}%
  }
\newcommand{\CPROT@packageerror}[1]{%
  \PackageError{pdfcprot}{#1}%
  }
\newcommand{\CPROT@packageinfo@or@warning}[1]{%
  \ifthenelse{\boolean{CPROT@quiet}}{%
    \CPROT@packageinfo{#1}%
    }{%
    \CPROT@packagewarning{#1}%
    }%
  }%
\define@key{CPROT}{encoding}{%
  \ifthenelse{\equal{#1}{encodingdefault}}{%
    \edef\CPROT@lowlevel@encoding{\encodingdefault}% \encodingdefault will be set.
  }{% I assume a low level encodingname is given
    \renewcommand*{\CPROT@lowlevel@encoding}{#1}%
  }%
}
\define@key{CPROT}{family}{%
  \ifthenelse{\equal{#1}{rmfamily}}{%
    \setcounter{CPROT@family}{2}% \rmfamily will be set
    }{%
    \ifthenelse{\equal{#1}{sffamily}}{%
      \setcounter{CPROT@family}{1}% \sffamily will be set
      }{% I assume a low level fontname is given
      \setcounter{CPROT@temp@chars}{0}%
      \expandafter\@tfor\expandafter\@tempb\expandafter:\expandafter=#1\do{%
        \stepcounter{CPROT@temp@chars}%
        }%
      \ifthenelse{\value{CPROT@temp@chars}>4}{%
        \CPROT@packageinfo@or@warning{None of the keywords 'all',\MessageBreak
          'rmfamily' or 'sffamily' was found. I assume you gave a\MessageBreak
          low level font name but it is at least unusual that a\MessageBreak
          TeX-fontname has more than 4 characters. I assume you know\MessageBreak
          what you're doing and continue, but the selection of the\MessageBreak
          font may fail!%
          }%
        \CPROT@packageinfo{It seem's as you want to use a low level\MessageBreak
          command for font selection. -- You're for yourself.%
          }%
        }{}%
      \setcounter{CPROT@family}{-1}%
      \renewcommand*{\CPROT@lowlevel@family}{#1}%
      }%
    }%
  }
\define@key{CPROT}{series}{%
  \ifthenelse{\equal{#1}{mdseries}}{% medium series
    \setcounter{CPROT@series}{2}%
    }{%
    \ifthenelse{\equal{#1}{bfseries}}{% bold series
      \setcounter{CPROT@series}{1}%
      }{% here the low level interface is suspected
      \setcounter{CPROT@temp@chars}{0}%
      \expandafter\@tfor\expandafter\@tempb\expandafter:\expandafter=#1\do{%
        \stepcounter{CPROT@temp@chars}%
        }%
      \ifthenelse{\value{CPROT@temp@chars}>4}{%
        \CPROT@packageinfo@or@warning{None of the keywords 'all',\MessageBreak
          'mdseries' or 'bfseries' was found. I assume you gave a\MessageBreak
          low level font name but a series identifier should consist\MessageBreak
          of 4 characters at maximum. I assume you know what you're\MessageBreak
          doing and continue, but the selection of the font will\MessageBreak
          very likely fail!%
          }%
        \CPROT@packageinfo{It seem's as you seem want to use a low level\MessageBreak
          command for font selection. -- You're for yourself.%
          }%
        }{}%
      \setcounter{CPROT@series}{-1}%
      \renewcommand*{\CPROT@lowlevel@series}{#1}%
      }%
    }%
  }%
\define@key{CPROT}{shape}{%
  \ifthenelse{\equal{#1}{upshape}}{%
    \setcounter{CPROT@shape}{8}%
    }{%
    \ifthenelse{\equal{#1}{itshape}}{%
      \setcounter{CPROT@shape}{4}%
      }{%
      \ifthenelse{\equal{#1}{slshape}}{%
        \setcounter{CPROT@shape}{2}%
        }{%
        \ifthenelse{\equal{#1}{scshape}}{%
          \setcounter{CPROT@shape}{1}%
          }{% low lewel format
          \setcounter{CPROT@temp@chars}{0}%
          \expandafter\@tfor\expandafter\@tempb\expandafter:\expandafter=#1\do{%
            \stepcounter{CPROT@temp@chars}%
            }%
          \ifthenelse{\value{CPROT@temp@chars}>2}{%
            \CPROT@packageinfo@or@warning{None of the keywords 'all',\MessageBreak
              'upshape', 'itshape', 'slshape' or 'scshape' was\MessageBreak
              found. I assume you gave a low level font name but it\MessageBreak
              is at least unusual that a shape identifier has more\MessageBreak
              than 2 characters. I assume you know what you're doing\MessageBreak
              and continue, but the selection of the font will very\MessageBreak
              likely fail!%
              }%
            \CPROT@packageinfo{It seem's as you seem want to use a low level\MessageBreak
              command for font selection. -- You're for yourself.%
              }%
            }{}%
          \setcounter{CPROT@shape}{-1}%
          \renewcommand{\CPROT@lowlevel@shape}{#1}%
          }%
        }%
      }%
    }%
  }
\define@key{CPROT}{size}{%
  \ifthenelse{\equal{#1}{Huge}}{%
    \setcounter{CPROT@size}{512}%
    }{%
    \ifthenelse{\equal{#1}{huge}}{%
      \setcounter{CPROT@size}{256}%
      }{%
      \ifthenelse{\equal{#1}{LARGE}}{%
        \setcounter{CPROT@size}{128}%
        }{%
        \ifthenelse{\equal{#1}{Large}}{%
          \setcounter{CPROT@size}{64}%
          }{%
          \ifthenelse{\equal{#1}{large}}{%
            \setcounter{CPROT@size}{32}%
            }{%
            \ifthenelse{\equal{#1}{normalsize}}{%
              \setcounter{CPROT@size}{16}%
              }{%
              \ifthenelse{\equal{#1}{small}}{%
                \setcounter{CPROT@size}{8}%
                }{%
                \ifthenelse{\equal{#1}{footnotesize}}{%
                  \setcounter{CPROT@size}{4}%
                  }{%
                  \ifthenelse{\equal{#1}{scriptsize}}{%
                    \setcounter{CPROT@size}{2}%
                    }{%
                    \ifthenelse{\equal{#1}{tiny}}{%
                      \setcounter{CPROT@size}{1}%
                      }{% low lewel format
                      \CPROT@packageerror{%
                        None of the keywords 'all', 'normal' or any LaTeX2e\MessageBreak
                        font name was found. \MessageBreak
                        \space For more information how to use\MessageBreak
                        \string\setupcharprotrudingnumeral see the
                        pdfcprot manual.%
                        }%
                      }{}%
                    }%
                  }%
                }%
              }%
            }%
          }%
        }%
      }%
    }%
  }
\define@key{CPROT}{textcomp}{%
  \ifthenelse{\equal{#1}{true}\or\equal{#1}{on}\or\equal{#1}{1}\or\equal{#1}{yes}}{%
    \setboolean{CPROT@textcomp}{true}%
    }{%
    \ifthenelse{\equal{#1}{false}\or\equal{#1}{off}\or\equal{#1}{0}\or\equal{#1}{no}}{%
      \setboolean{CPROT@textcomp}{false}%
      }{%
      \CPROT@packageerror{%
        ``#1'' is no setting for ``textcomp''. Use\MessageBreak
        one of 'true', 'on', 'yes', '1', or 'false', 'off', \MessageBreak
        'no', '0' instead.\MessageBreak
        }%
      }%
    }%
  }
\define@key{CPROTnum}{encoding}{%
  \ifthenelse{\equal{#1}{0}}{%
    \renewcommand*{\CPROT@lowlevel@encoding}{}% No encoding will be set.
  }{%
    \ifthenelse{\equal{#1}{1}}{%
      \edef\CPROT@lowlevel@encoding{\encodingdefault}% \encodingdefault will be set.
    }{%
      \ifthenelse{\equal{#1}{encodingdefault}}{%
        \edef\CPROT@lowlevel@encoding{\encodingdefault}% \encodingdefault will be set.
      }{% I assume a low level encodingname is given
        \renewcommand*{\CPROT@lowlevel@encoding}{#1}%
      }%
    }%
  }%
}
\define@key{CPROTnum}{family}{%
  \ifthenelse{#1>0 \and #1<4}{%
    \setcounter{CPROT@family}{#1}%
    }{%
    \ifthenelse{#1=0}{%
      \CPROT@packageinfo{%
        As you selected '0' (that means 'none') for\MessageBreak
        selection of the font family, no font will\MessageBreak
        be set up for char protruding.%
        }%
      }{%
      \CPROT@packageerror{%
        Your given value '#1' to family in \string\setupcharprotrudingnumeral\MessageBreak
        is not valid. Sensible values are between 1 and 3 (inclusive).\MessageBreak
        For further information see the pdfcprot manual.%
        }%
      }%
    }%
  }
\define@key{CPROTnum}{series}{%
  \ifthenelse{#1>0 \and #1<4}{%
    \setcounter{CPROT@series}{#1}%
    }{%
    \ifthenelse{#1=0}{%
      \CPROT@packageinfo{%
        As you selected '0' (that means 'none') for\MessageBreak
        selection of the font series, no font will\MessageBreak
        be set up for char protruding.%
        }%
      }{%
      \CPROT@packageerror{%
        Your given value '#1' to series in \string\setupcharprotrudingnumeral\MessageBreak
        is not valid. Sensible values are between 1 and 15 (inclusive).\MessageBreak
        For further information see the pdfcprot manual.%
        }%
      }%
    }%
  }
\define@key{CPROTnum}{shape}{%
  \ifthenelse{#1>0 \and #1<16}{%
    \setcounter{CPROT@shape}{#1}%
    }{%
    \ifthenelse{#1=0}{%
      \CPROT@packageinfo{%
        As you selected '0' (that means 'none') for\MessageBreak
        selection of the font shape, no font will\MessageBreak
        be set up for char protruding.%
        }%
      }{%
      \CPROT@packageerror{%
        Your given value '#1' to shape in \string\setupcharprotrudingnumeral\MessageBreak
        is not valid. Sensible values are between 1 and 15 (inclusive).\MessageBreak
        For further information see the pdfcprot manual.%
        }%
      }%
    }%
  }
\define@key{CPROTnum}{size}{%
  \ifthenelse{#1>0 \and #1<1024}{%
    \setcounter{CPROT@size}{#1}%
    }{%
    \ifthenelse{#1=0}{%
      \CPROT@packageinfo{%
        As you selected '0' (that means 'none') for\MessageBreak
        selection of the font size, no font will\MessageBreak
        be set up for char protruding.%
        }%
      }{%
      \CPROT@packageerror{%
        Your given value '#1' to size in \string\setupcharprotrudingnumeral\MessageBreak
        is not valid. Sensible values are between 1 and 1023 (inclusive).\MessageBreak
        For further information see the pdfcprot manual.%
        }%
      }%
    }%
  }
\define@key{CPROTnum}{textcomp}[true]{%
  \setkeys{CPROT}{textcomp=#1}%
}
\define@key{CPROTpackage}{activate}[normal]{%
  \ifthenelse{\equal{#1}{normal}}{%
    \CPROT@setupcharprotruding@normal%
    \ifthenelse{\equal{\CPROT@setprotcodes@}{}}{%
    }{% just activate char prot when something was set
      \activatecharprotruding[true]%
    }%
  }{%
    \ifthenelse{\equal{#1}{none}}{%
    }{%
      \CPROT@packageerror{%
        Value of activate can be 'normal' or 'none'.\MessageBreak%
        \space For more low level setup use \string\setupcharprotruding\MessageBreak%
        and see the manual%
        }%
      }%
    }%
  }%
\define@key{CPROTpackage}{quiet}[true]{%
  \ifthenelse{\equal{#1}{true}\or\equal{#1}{on}\or\equal{#1}{yes}\or\equal{#1}{1}}{%
    \setboolean{CPROT@quiet}{true}%
    }{%
    \ifthenelse{\equal{#1}{false}\or\equal{#1}{off}\or\equal{#1}{no}\or\equal{#1}{0}}{%
      \setboolean{CPROT@quiet}{false}%
      }{%
      \CPROT@packageerror{%
        Value of quiet should be 'true' ('on', 'yes, '1') or\MessageBreak%
        'false' ('off', 'no', '0'). You didn't seem to use any\MessageBreak%
        of them.%
        }%
      }%
    }%
  }%
\newcommand{\CPROT@aac@encoding}{%
  \ifthenelse{\equal{\CPROT@lowlevel@encoding}{}}{%
      \setcounter{CPROT@family@temp}{\value{CPROT@family}}%
      \CPROT@aac@family{}%
    }{%
      \@for \CPROT@aac@encoding@first:=\CPROT@lowlevel@encoding \do {%
        \setcounter{CPROT@family@temp}{\value{CPROT@family}}%
        \expandafter\ifx\csname T@\CPROT@aac@encoding@first\endcsname\relax%
          \ifthenelse{\boolean{CPROT@quiet}}{%
            \CPROT@packagewarning{Encoding \CPROT@aac@encoding@first not defined\MessageBreak
              (see log file for more information)}
          }{}%
          \CPROT@packageinfo@or@warning{%
            You've requested char protruding for \CPROT@aac@encoding@first encoding\MessageBreak
            but \CPROT@aac@encoding@first encoding doesn't seem to be loaded.\MessageBreak
            Maybe you forgot a '\string\usepackage[\CPROT@aac@encoding@first]{fontenc}'.%
          }%
        \else
          \CPROT@aac@family{\protect\fontencoding{\CPROT@aac@encoding@first}\selectfont}%
        \fi
      }%
    }%
  }
\newcommand{\CPROT@aac@family}[1]{%
  \ifthenelse{\value{CPROT@family@temp}>1}{%
    \protected@edef\CPROT@setprotcodes@temp{#1\protect\rmfamily}%
    \setcounter{CPROT@series@temp}{\value{CPROT@series}}%
    \CPROT@aac@series{\CPROT@setprotcodes@temp}%
    \addtocounter{CPROT@family@temp}{-2}%
    \CPROT@aac@family{#1}%
    }{%
    \ifthenelse{\value{CPROT@family@temp}>0}{%
      \protected@edef\CPROT@setprotcodes@temp{#1\protect\sffamily}%
      \setcounter{CPROT@series@temp}{\value{CPROT@series}}%
      \CPROT@aac@series{\CPROT@setprotcodes@temp}%
      \addtocounter{CPROT@family@temp}{-1}%
      \CPROT@aac@family{#1}%
    }{%
      \ifthenelse{\value{CPROT@family@temp}<0}{%
      \protected@edef\CPROT@setprotcodes@temp{#1\fontfamily{\CPROT@lowlevel@family}\selectfont}%
      \setcounter{CPROT@series@temp}{\value{CPROT@series}}%
      \CPROT@aac@series{\CPROT@setprotcodes@temp}%
    }{}%
      }%
    }%
  }
\newcommand{\CPROT@aac@series}[1]{%
  \ifthenelse{\value{CPROT@series@temp}>1}{%
    \protected@edef\CPROT@setprotcodes@temp{#1\protect\mdseries}%
    \setcounter{CPROT@shape@temp}{\value{CPROT@shape}}%
    \CPROT@aac@shape{\CPROT@setprotcodes@temp}%
    \addtocounter{CPROT@series@temp}{-2}%
    \CPROT@aac@series{#1}%
    }{%
    \ifthenelse{\value{CPROT@series@temp}>0}{%
      \protected@edef\CPROT@setprotcodes@temp{#1\protect\bfseries}%
      \setcounter{CPROT@shape@temp}{\value{CPROT@shape}}%
      \CPROT@aac@shape{\CPROT@setprotcodes@temp}%
      \addtocounter{CPROT@series@temp}{-1}%
      \CPROT@aac@series{#1}%
      }{%
      \ifthenelse{\value{CPROT@series@temp}<0}{%
        \protected@edef\CPROT@setprotcodes@temp{%
          #1\fontseries\expandafter{\CPROT@lowlevel@series}\selectfont}%
        \setcounter{CPROT@shape@temp}{\value{CPROT@shape}}%
        \CPROT@aac@shape{\CPROT@setprotcodes@temp}%
        }{}%
      }%
    }%
  }
\newcommand{\CPROT@aac@shape}[1]{%
  \ifthenelse{\value{CPROT@shape@temp}>7}{%
    \protected@edef\CPROT@setprotcodes@temp{#1\protect\upshape}%
    \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
    \CPROT@aac@size{\CPROT@setprotcodes@temp}%
    \addtocounter{CPROT@shape@temp}{-8}%
    \CPROT@aac@shape{#1}%
    }{%
    \ifthenelse{\value{CPROT@shape@temp}>3}{%
      \protected@edef\CPROT@setprotcodes@temp{#1\protect\itshape}%
      \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
      \CPROT@aac@size{\CPROT@setprotcodes@temp}%
      \addtocounter{CPROT@shape@temp}{-4}%
      \CPROT@aac@shape{#1}%
      }{%
      \ifthenelse{\value{CPROT@shape@temp}>1}{%
        \protected@edef\CPROT@setprotcodes@temp{#1\protect\slshape}%
        \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
        \CPROT@aac@size{\CPROT@setprotcodes@temp}%
        \addtocounter{CPROT@shape@temp}{-2}%
        \CPROT@aac@shape{#1}%
        }{%
        \ifthenelse{\value{CPROT@shape@temp}>0}{%
          \protected@edef\CPROT@setprotcodes@temp{#1\protect\scshape}%
          \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
          \CPROT@aac@size{\CPROT@setprotcodes@temp}%
          \addtocounter{CPROT@shape@temp}{-1}%
          \CPROT@aac@shape{#1}%
          }{%
          \ifthenelse{\value{CPROT@shape@temp}<0}{%
            \protected@edef\CPROT@setprotcodes@temp{%
              #1\fontshape\expandafter{\CPROT@lowlevel@shape}\selectfont}%
            \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
            \CPROT@aac@size{\CPROT@setprotcodes@temp}%
            }{}%
          }%
        }%
      }%
    }%
  }
\newcommand{\CPROT@aac@size}[1]{%
  \ifthenelse{\value{CPROT@size@temp}>511}{%
    \protected@edef\CPROT@setprotcodes@temp{#1\protect\Huge}%
    \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
    \addtocounter{CPROT@size@temp}{-512}%
    \CPROT@aac@size{#1}%
    }{%
    \ifthenelse{\value{CPROT@size@temp}>255}{%
      \protected@edef\CPROT@setprotcodes@temp{#1\protect\huge}%
      \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
      \addtocounter{CPROT@size@temp}{-256}%
      \CPROT@aac@size{#1}%
      }{%
      \ifthenelse{\value{CPROT@size@temp}>127}{%
        \protected@edef\CPROT@setprotcodes@temp{#1\protect\LARGE}%
        \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
        \addtocounter{CPROT@size@temp}{-128}%
        \CPROT@aac@size{#1}%
        }{%
        \ifthenelse{\value{CPROT@size@temp}>63}{%
          \protected@edef\CPROT@setprotcodes@temp{#1\protect\Large}%
          \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
          \addtocounter{CPROT@size@temp}{-64}%
          \CPROT@aac@size{#1}%
          }{%
          \ifthenelse{\value{CPROT@size@temp}>31}{%
            \protected@edef\CPROT@setprotcodes@temp{#1\protect\large}%
            \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
            \addtocounter{CPROT@size@temp}{-32}%
            \CPROT@aac@size{#1}%
            }{%
            \ifthenelse{\value{CPROT@size@temp}>15}{%
              \protected@edef\CPROT@setprotcodes@temp{#1\protect\normalsize}%
              \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
              \addtocounter{CPROT@size@temp}{-16}%
              \CPROT@aac@size{#1}%
              }{%
              \ifthenelse{\value{CPROT@size@temp}>7}{%
                \protected@edef\CPROT@setprotcodes@temp{#1\protect\small}%
                \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
                \addtocounter{CPROT@size@temp}{-8}%
                \CPROT@aac@size{#1}%
                }{%
                \ifthenelse{\value{CPROT@size@temp}>3}{%
                  \protected@edef\CPROT@setprotcodes@temp{#1\protect\footnotesize}%
                  \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
                  \addtocounter{CPROT@size@temp}{-4}%
                  \CPROT@aac@size{#1}%
                  }{%
                  \ifthenelse{\value{CPROT@size@temp}>1}{%
                    \protected@edef\CPROT@setprotcodes@temp{#1\protect\scriptsize}%
                    \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
                    \addtocounter{CPROT@size@temp}{-2}%
                    \CPROT@aac@size{#1}%
                    }{%
                    \ifthenelse{\value{CPROT@size@temp}>0}{%
                      \protected@edef\CPROT@setprotcodes@temp{#1\protect\protect\tiny}%
                      \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
                      }{}%
                    }%
                  }%
                }%
              }%
            }%
          }%
        }%
      }%
    }%
  }
\newcommand{\CPROT@aac@textcomp}[1]{%
  \ifthenelse{\boolean{CPROT@textcomp}}{%
    \@ifundefined{T@TS1}{%
      \CPROT@packageinfo@or@warning{%
        You've requested char protruding for TS1 encoding\MessageBreak
        but TS1 encoding doesn't seem to be loaded.\MessageBreak
        Maybe you forgot a '\string\usepackage{textcomp}'.%
        }%
      \setboolean{CPROT@textcomp}{false}%
      }{}%
    }{}%
  \ifthenelse{\boolean{CPROT@textcomp}}{%
    \protected@xdef\CPROT@setprotcodes@{%
      \CPROT@setprotcodes@{%
        #1\protect\CPROT@setprotcodes@font{%
          \fontencoding{TS1}\selectfont\protect\CPROT@setprotcodes@font%
          }%
        }%
      }%
    }{%
    \protected@xdef\CPROT@setprotcodes@{%
      \CPROT@setprotcodes@{%
        #1\protect\CPROT@setprotcodes@font%
        }%
      }%
    }%
  }
\newcommand*{\activatecharprotruding}[1][true]{%
  \ifpdftex{%
    \ifthenelse{\equal{#1}{true}\or\equal{#1}{on}\or\equal{#1}{1}\or\equal{#1}{yes}}{%
      \CPROT@good@pdftex@version{%
        \global\pdfprotrudechars=2%
       }
      }{%
      \ifthenelse{\equal{#1}{compatibility}\or\equal{#1}{compatible}}{%
        \CPROT@good@pdftex@version{%
          \global\pdfprotrudechars=1%
          }%
        }{%
        \ifthenelse{\equal{#1}{false}\or\equal{#1}{off}\or\equal{#1}{0}\or\equal{#1}{no}}{%
          \global\pdfprotrudechars=0%
          }{%
          \CPROT@packageerror{%
            ``#1'' is no setting for \activatecharprotruding. Use\MessageBreak
            one of 'true', 'on', 'yes', '1', or 'false', 'off', \MessageBreak
            'no', '0', or 'compatible', 'compatibility' instead.%
            }%
          }{%
          \CPROT@packageinfo@or@warning{%
            You want to activate char protruding, but it does\MessageBreak
            look as your are NOT using pdftex. So I can't\MessageBreak
            activate it, as ``pdfcprot.sty'' only supports\MessageBreak
            pdftex.}%
          }%
        }%
      }%
    }{}%
  }
\newcommand*{\setupcharprotruding}[1]{%
  \ifpdftex{%
    \CPROT@resetall{}%
    \@ifundefined{CPROT@save@KV@errx}{%
      \let\CPROT@save@KV@errx=\KV@errx%
      \renewcommand*{\KV@errx}[1]{%
        \CPROT@packageerror{option ##1 for \string\setupcharprotruding}{%
          You've tried to use the option ##1 with \string\setupcharprotruding.\MessageBreak
          But there is no option with that name.\MessageBreak
          See the manual of ``pdfcprot.sty'' for information
          about the usage of \string\setupcharprotruding.%
          }%
        }%
      \setkeys{CPROT}{#1}%
      \let\KV@errx=\CPROT@save@KV@errx%
      \let\CPROT@save@KV@errx=\relax%
      }{%
      \setkeys{CPROT}{#1}%
      }%
    \CPROT@setprotcodes@add{}%
    }{%
    \CPROT@packageinfo@or@warning{%
      You want to setup char protruding, but it does\MessageBreak
      look as if you're NOT using pdftex. So I can't\MessageBreak
      setup it, as ``pdfcprot.sty'' only supports\MessageBreak
      pdftex.}%
    }%
  }
\@onlypreamble\setupcharprotruding%
\newcommand*{\setupcharprotrudingnumeral}[1]{%
  \ifpdftex{%
    \CPROT@resetall{}%
    \@ifundefined{CPROT@save@KV@errx}{%
      \let\CPROT@save@KV@errx=\KV@errx%
      \renewcommand*{\KV@errx}[1]{%
        \CPROT@packageerror{option ##1 for \string\setupcharprotrudingnumeral}{%
          You've tried to use the option ##1 with \string\setupcharprotrudingnumeral.\MessageBreak
          But there is no option with that name.\MessageBreak
          See the manual of ``pdfcprot.sty'' for information
          about the usage of \string\setupcharprotrudingnumeral.%
          }%
        }%
      \setkeys{CPROTnum}{#1}%
      \let\KV@errx=\CPROT@save@KV@errx%
      \let\CPROT@save@KV@errx=\relax%
      }{%
      \setkeys{CPROTnum}{#1}%
      }%
    \CPROT@setprotcodes@add{}%
    }{%
    \CPROT@packageinfo@or@warning{%
      You want to setup char protruding, but it does\MessageBreak
      look as if you're NOT using pdftex. So I can't\MessageBreak
      setup it, as ``pdfcprot.sty'' only supports\MessageBreak
      pdftex.}%
    }%
  }
\@onlypreamble\setupcharprotrudingnumeral
\newcommand{\ifpdftex}{%
  \ifx\pdftexversion\@undefined
    \expandafter\@secondoftwo
  \else
    \ifx\pdftexversion\relax
      \expandafter\expandafter\expandafter\@secondoftwo
    \else
      \expandafter\expandafter\expandafter\@firstoftwo
    \fi
  \fi
}
\newcommand{\CPROT@packageerror@bad@pdftex}{%
  \CPROT@packageerror{You used a pdftex version older than 0.14f.\MessageBreak
    pdfcprot does not support such old versions of pdftex. \MessageBreak
    Please install a new version of pdftex.}%
}
\newcommand{\CPROT@good@pdftex@version}[1]{%
  \ifnum\pdftexversion < 14
    \CPROT@packageerror@bad@pdftex %
  \else
    \ifnum\pdftexversion = 14
      \ifnum \expandafter`\pdftexrevision < `f
        \CPROT@packageerror@bad@pdftex %
      \else
        #1
      \fi
    \else
      #1
    \fi
  \fi
}
\newcommand*{\CPROT@ifpdfoutput}{%
  \ifcase 0%
          \ifx\pdfoutput\@undefined 1%
          \else
            \ifx\pdfoutput\relax    1%
            \else
              \ifcase\pdfoutput     1%
              \fi
            \fi
          \fi
          \space
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\@ifundefined{ifpdfoutput}{\let\ifpdfoutput\CPROT@ifpdfoutput}{%
  \CPROT@packageinfo{%
    \string\ifpdfoutput\space already defined.\MessageBreak
    That may happen when using KOMA-Script together\MessageBreak
    with ``pdfcprot.sty''. I have changed the definition\MessageBreak
    from Markus' KOMA-Script, so if you experience errors\MessageBreak
    try \string\let\string\ifpdfoutput\string\relax\space before loading ``pdfcprot.sty''.}%
  }
\newcommand*{\CPROT@packageoptions}[1]{%
  \@ifundefined{CPROT@save@KV@errx}{%
    \let\CPROT@save@KV@errx=\KV@errx%
    \renewcommand*{\KV@errx}[1]{%
      \PackageError{pdfcprot}{unknown option ``#1''}{%
        You've tried to use the option ``#1''.\MessageBreak
        But there is no option with that name.\MessageBreak
        See the manual of ``pdfcprot.sty'' for information
        about known options.%
        }%
      }%
    \setkeys{CPROTpackage}{#1}%
    \let\KV@errx=\CPROT@save@KV@errx%
    \let\CPROT@save@KV@errx=\relax%
    }{%
    \setkeys{CPROTpackage}{#1}%
    }%
  }
\DeclareOption{DVIoutput}{%
  \CPROT@packagewarning{%
    It is not a good idea to use the DVIoutput package
    option.\MessageBreak
    Use it only if you experience some using other
    packages.\MessageBreak
    And don't forget to file a bug report against these
    packages.\MessageBreak
    The best is to add just \string\pdfoutput=0\space at the beginning\MessageBreak
    of your preamble or even before \string\documentclass.
  }
  \ifpdftex{%
    \pdfoutput=0%
    \let\pdfoutput\undefined
    }{}%
  }
\DeclareOption*{%
  \ifpdftex{%
    \expandafter\CPROT@packageoptions\expandafter{\CurrentOption}%
    }{}%
  }%
\newcommand*{\CPROT@fallbackfont}{pplmn}
\newcommand*{\setfallbackfont}[1]{\renewcommand*{\CPROT@fallbackfont}{#1}}
\newcommand*{\CPROT@setupcharprotruding@normal}{%
  \setupcharprotrudingnumeral{family=3,series=1,shape=8,size=60,textcomp=1}%
  \setupcharprotrudingnumeral{family=2,series=2,shape=12,size=60,textcomp=1}%
  \setupcharprotrudingnumeral{family=1,series=2,shape=14,size=60,textcomp=1}%
  }
\newcommand*{\setupcharprotrudingforencoding}[1]{%
  \setupcharprotrudingnumeral{encoding={#1},family=3,series=1,shape=8,size=60,textcomp=1}%
  \setupcharprotrudingnumeral{encoding={#1},family=2,series=2,shape=12,size=60,textcomp=1}%
  \setupcharprotrudingnumeral{encoding={#1},family=1,series=2,shape=14,size=60,textcomp=1}%
  }
\@onlypreamble\setupcharprotrudingforencoding
\InputIfFileExists{pdfcprot.cfg}
           {\typeout{***************************************^^J%
                     * Local config file pdfcrpot.cfg used *^^J%
                     ***************************************}}
           {}
\ProcessOptions\relax
\newcommand*{\CPROT@actualfont}{%
  \f@family%
  \f@series%
  \f@shape%
  \f@encoding%
  }
\@onlypreamble\setfallbackfont%
\newcommand*{\CPROT@cpa@toload}{}
\newcommand*{\CPROT@setprotcodes@font}{%
  \renewcommand*{\CPROT@cpa@toload}{\CPROT@actualfont.cpa}%
  \IfFileExists{\CPROT@cpa@toload}{%
    \expandafter\@ifundefined\expandafter{\CPROT@actualfont}{%
      \input{\CPROT@cpa@toload}
      }{}
    \csname\CPROT@actualfont\endcsname%
    \CPROT@adjustprotcodes{\font}%
    \CPROT@packageinfo{%
      File \CPROT@cpa@toload{} for the adjustment of\MessageBreak
      the char protruding used. It seems to be _fit_\MessageBreak
      to the font you requested.%
      }%
    }{%
    \CPROT@packageinfo@or@warning{%
      I didn't find \CPROT@cpa@toload.\MessageBreak%
      \space As a fallback I will try \CPROT@fallbackfont\f@encoding.cpa.%
      }%
    \renewcommand*{\CPROT@cpa@toload}{\CPROT@fallbackfont\f@encoding.cpa}%
    \IfFileExists{\CPROT@cpa@toload}{%
      \expandafter\@ifundefined\expandafter{\CPROT@fallbackfont\f@encoding}{%
        \input{\CPROT@cpa@toload}%
        }{}%
      \csname\CPROT@fallbackfont\f@encoding\endcsname%
      \CPROT@adjustprotcodes{\font}%
      \CPROT@packageinfo{%
        File \CPROT@cpa@toload{} used for the adjustment\MessageBreak
        of the char protruding. It seems that it isn't the one\MessageBreak
        you intended to use.%
        }%
      }{%
      \CPROT@packageinfo@or@warning{%
        Even the fallback font was not found. Maybe it's\MessageBreak
        not the right font encoding. Currently ``pdfcprot''\MessageBreak
        bundles only with cpa's for T1, OT1 and TS1 encoding.%
        }%
      }%
    }%
  }
\newif\ifCPROT@adjustprotcodes@
\newcommand*{\CPROT@adjustprotcodes}[1]{%
  \CPROT@adjustprotcodes@false
  \ifnum\pdftexversion > 14
    \CPROT@adjustprotcodes@true
  \else
    \ifnum\pdftexversion = 14
      \ifnum \expandafter`\pdftexrevision > `g
        \CPROT@adjustprotcodes@true
      \fi
    \fi
  \fi
  \ifCPROT@adjustprotcodes@
    \@tempcnta=0
    \loop
      \ifcase\lpcode#1\@tempcnta\else
        \CPROT@adjustprotcodes@@\lpcode{#1}\@tempcnta
      \fi
      \ifcase\rpcode#1\@tempcnta\else
        \CPROT@adjustprotcodes@@\rpcode{#1}\@tempcnta
      \fi
      \advance\@tempcnta 1
    \ifnum\@tempcnta < 256 \repeat
   \fi
  }
\def\CPROT@adjustprotcodes@@#1#2#3{%
  \setbox0=\hbox{\the#2\char#3}%
  \@tempcntb=\wd0%
  \multiply\@tempcntb #1#2#3%
  \divide\@tempcntb \fontdimen6 #2%
  #1#2#3=\@tempcntb%
  }

\newcommand*{\CPROT@setprotcodes}{%
  \ifpdftex{%
    \ifthenelse{\equal{\CPROT@setprotcodes@}{}}{%
      }{%
      \CPROT@setprotcodes@%
      }%
    }{}%
  }

\AtBeginDocument{%
  \CPROT@setprotcodes\relax%
  }
\endinput
%%
%% End of file `pdfcprot.sty'.
