%% Copyright (c) 2001 Marius Gedminas <marius@gedmin.as>
%%
%% Requires some TeX lithuanization files from www.vtex.lt
%%
%% $Id: lt.sty,v 1.1 2003/04/08 20:25:58 mg Exp $

\ProvidesPackage{lt}

% This replaces \usepackage[cpRIM]{inputenc}
\providecommand{\uplow}[3]{\global\uccode#1=#2\global\lccode#1=#3}
\catcode`\�=\active\relax\def�{\k{a}}
\catcode`\�=\active\relax\def�{\v{c}}
\catcode`\�=\active\relax\def�{\k{e}}
\catcode`\�=\active\relax\def�{\.{e}}
\catcode`\�=\active\relax\def�{\k{i}}
\catcode`\�=\active\relax\def�{\v{s}}
\catcode`\�=\active\relax\def�{\k{u}}
\catcode`\�=\active\relax\def�{\={u}}
\catcode`\�=\active\relax\def�{\v{z}}
\catcode`\�=\active\relax\def�{\k{A}}
\catcode`\�=\active\relax\def�{\v{C}}
\catcode`\�=\active\relax\def�{\k{E}}
\catcode`\�=\active\relax\def�{\.{E}}
\catcode`\�=\active\relax\def�{\k{I}}
\catcode`\�=\active\relax\def�{\v{S}}
\catcode`\�=\active\relax\def�{\k{U}}
\catcode`\�=\active\relax\def�{\={U}}
\catcode`\�=\active\relax\def�{\v{Z}}

% Use iso-8859-13 instead of windows-1257 (cpRIM)
\catcode`\�=\active\relax\def�{,,}
\catcode`\�=\active\relax\def�{``}

% This replaces \usepackage{addltenc}
\usepackage{times}
\usepackage[T1]{fontenc}

% This replaces \usepackage[english,lithuani]{babel}
% ...

% Use some TeX magic
\makeatletter

% Lithuanian standards

% Maybe be consistent with Lithuanian traditions?
%\renewcommand{\tan}{\mathop{\operator@font tg}\nolimits} 
%\renewcommand{\arctan}{\mathop{\operator@font arctg}\nolimits} 
%\renewcommand{\cot}{\mathop{\operator@font ctg}\nolimits} 
%\renewcommand{\arccot}{\mathop{\operator@font arcctg}\nolimits} 

\renewcommand{\labelenumii}{\theenumii)}

% Say "X-th part" instead of "Part X"
\def\@part[#1]#2{%
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >\m@ne
       \Large\bfseries \thepart~\MakeLowercase{\partname}
       \par\nobreak
     \fi
     \huge \bfseries #2%
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}

% Back to reality
\makeatother

