%%
%% This is file `textcase.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% textcase.dtx  (with options: `package')
%% 
%% Source File: textcase.dtx
%% Copyright 1997 1998 2019 2022 2023 2025 David Carlisle
%%
%% This file may be distributed under the terms of the LPPL.
%% See 00readme.txt for details.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{textcase}
       [2025/02/16 v1.05 Text only upper/lower case changing (DPC)]
\ifx\AddToNoCaseChangeList\@undefined\else
  \DeclareOption{overload}{}
  \ProcessOptions
  \PackageInfo{textcase}{Defining Legacy names}
\ExplSyntaxOn
\cs_set_protected:Npn \reserved@a #1
 {
  \cs_generate_variant:cn { text_ \str_lowercase:n {#1} case:nn } { V }
  \ExpandArgs { cnx } \NewExpandableDocumentCommand
    { MakeText#1case }
    { O{} +m }
    { \exp_not:c { MakeText#1case \c_space_tl \c_space_tl \c_space_tl }
                           [####1] {####2} }
  }
\reserved@a { Upper }
\reserved@a { Lower }
\IfFormatAtLeastTF{2024-11-12}{\def\textcase@case{case}}{\def\textcase@case{}}
\cs_new_protected:cpn {
   MakeTextLowercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
  {%{
    \let \OE \oe
    \@@text@case@aux { lower \textcase@case } {#1} {#2}
  }%}
\cs_new_protected:cpn {
   MakeTextUppercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
  {%{
    \let \oe \OE
    \@@text@case@aux { upper \textcase@case } {#1} {#2}
  }%}
\ExplSyntaxOff
  \expandafter\endinput
\fi
\def\@uclcnotmath#1#2#3#4{\begingroup
      #1%
      \def\({$}\let\)\(%
      \let\UTF@two@octets@noexpand\@empty
      \let\UTF@three@octets@noexpand\@empty
      \let\UTF@four@octets@noexpand\@empty
      \def\NoCaseChange##1{\noexpand\NoCaseChange{\noexpand##1}}%
      \@nonchangecase\label
      \@nonchangecase\ref
      \@nonchangecase\ensuremath
      \def\cite##1##{\toks@{\noexpand\cite##1}\@citex}%
      \def\@citex##1{\NoCaseChange{\the\toks@{##1}}}%
      \def\reserved@a##1##2{\let#2\reserved@a}%
      \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
      \protected@edef\reserved@a{\endgroup
          \noexpand\@skipmath#3#4$\valign$}%
      \reserved@a}
\def\@nonchangecase#1{\def#1##1{\NoCaseChange{#1{##1}}}}
\let\NoCaseChange\@firstofone
\def\@skipmath#1#2$#3${%
  \@skip@nonchangecase#1#2\NoCaseChange\valign
  \ifx\valign#3%
  \else
    $#3$%
    \expandafter\@skipmath\expandafter#1%
  \fi}
\def\@skip@nonchangecase#1#2\NoCaseChange#3{%
  #1{#2}%
  \ifx\valign#3%
  \else
    #3%
    \expandafter\@skip@nonchangecase\expandafter#1%
  \fi}
\DeclareRobustCommand\MakeTextUppercase{%
  \@uclcnotmath{\def\i{I}\def\j{J}}{##1##2}\uppercase}
\protected@edef\MakeTextUppercase#1{\MakeTextUppercase{#1}}
\DeclareRobustCommand\MakeTextLowercase{%
  \@uclcnotmath{}{##2##1}\lowercase}
\protected@edef\MakeTextLowercase#1{\MakeTextLowercase{#1}}
\DeclareOption{overload}{%
  \expandafter\let\csname MakeUppercase \expandafter\endcsname
                  \csname MakeTextUppercase \endcsname
  \expandafter\let\csname MakeLowercase \expandafter\endcsname
                  \csname MakeTextLowercase \endcsname}
\ProcessOptions
\endinput
%%
%% End of file `textcase.sty'.
