%% Copyright (c) 2001 Marius Gedminas <mgedmin@delfi.lt>
%% LaTeX paketas studijų konspektams
%%
%% $Id: konspekt.sty,v 1.1 2001/10/05 20:55:11 mg Exp $

\ProvidesPackage{konspekt}

\usepackage{lt}

\usepackage{theorem}
\usepackage{amsmath}
\usepackage{amssymb}

% -- Titulinis puslapis-------------------------------------------------------

% Naudoti \title viduje: \title{XXX \subtitle{yyy}}
\newcommand{\subtitle}[1]{\par\medskip{\small #1\par}}

% -- Puslapių valdymas -------------------------------------------------------

% Puslapių valdymas
\newcommand{\longpage}{\enlargethispage{\baselineskip}}
\newcommand{\shortpage}{\enlargethispage{-\baselineskip}}

% -- Teksto žymėjimai --------------------------------------------------------

% \Def{xxx} - apibrėžiamų žodžių išryškinimas
\newcommand{\Def}[1]{\textit{\textbf{#1}}}

% -- Lietuviškos tradicijos --------------------------------------------------

% Simbolių išvaizda
\newcommand{\eps}{\varepsilon}
\renewcommand{\le}{\leqslant}
\renewcommand{\ge}{\geqslant}

\renewcommand{\phi}{\varphi}
\renewcommand{\emptyset}{\varnothing}
\renewcommand{\liminf}{\varliminf}
\renewcommand{\limsup}{\varlimsup}

% 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} 

% -- Matematika --------------------------------------------------------------

% Pagalbiniai simboliai
\newcommand{\tada}{\ensuremath{\quad\Longrightarrow\quad}}
\newcommand{\ttt}{\ensuremath{\quad\Longleftrightarrow\quad}}

% Graikiškos raidės
\newcommand{\Beta}{\mathrm{B}}

% Aibės
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\RR}{\overline{\mathbb{R}}}
\newcommand{\C}{\mathbb{C}}

% Integravimas
\newcommand{\ud}{\mathrm{d}}
\newcommand{\dx}{\ud x}
\newcommand{\dy}{\ud y}
\newcommand{\dz}{\ud z}
\newcommand{\dt}{\ud t}
\newcommand{\du}{\ud u}
\newcommand{\dv}{\ud v}
\newcommand{\dr}{\ud r}
\newcommand{\dl}{\ud l}
\newcommand{\dphi}{\ud\phi}
\newcommand{\dtheta}{\ud\theta}

% Funkcijos
\newcommand{\const}{\mathop{\operator@font const}\nolimits}
\newcommand{\sgn}{\mathop{\operator@font sgn}\nolimits}
\newcommand{\grad}{\mathop{\operator@font grad}\nolimits}
\newcommand{\arccot}{\mathop{\operator@font arccot}\nolimits}

% -- "Teoremos" --------------------------------------------------------------

\theoremstyle{change}
\theorembodyfont{\rmfamily}

% Numeruojamos teoremos
\newtheorem{ap}{apibrėžimas.}[section]
\newtheorem{app}[ap]{apibrėžimai.}
\newtheorem{tg}[ap]{teiginys.}
\newtheorem{tgg}[ap]{teiginiai.}
\newtheorem{tr}[ap]{teorema.}
\newtheorem{trr}[ap]{teoremos.}
\newtheorem{lm}[ap]{lema.}
\newtheorem{lmm}[ap]{lemos.}
\newtheorem{ps}[ap]{pastaba.}
\newtheorem{pss}[ap]{pastabos.}
\newtheorem{isv}[ap]{išvada.}
\newtheorem{isvv}[ap]{išvados.}
\newtheorem{pvz}[ap]{pavyzdys.}
\newtheorem{pvzz}[ap]{pavyzdžiai.}

% Pagalbinė aplinka
\newenvironment{pseudo*}[1]%
  {\par\normalfont\noindent\textbf{#1}}%
  {}

% Nenumeruojamos teoremos
\newenvironment{ap*}%
  {\begin{pseudo*}{Apibrėžimas.}}%
  {\end{pseudo*}}
\newenvironment{ps*}%
  {\begin{pseudo*}{Pastaba.}}%
  {\end{pseudo*}}
\newenvironment{pss*}%
  {\begin{pseudo*}{Pastabos.}}%
  {\end{pseudo*}}
\newenvironment{pvz*}%
  {\begin{pseudo*}{Pavyzdys.}}%
  {\end{pseudo*}}
\newenvironment{pvzz*}%
  {\begin{pseudo*}{Pavyzdžiai.}}%
  {\end{pseudo*}}

% Išvada su rankomis nurodytu numeriu (kartą prireikė :-)
\newenvironment{pseudoisv}[1]%
  {\begin{pseudo*}{#1 išvada}}%
  {\end{pseudo*}}

% Pagalbinė aplinka
\newenvironment{pseudoir}[1]%
  {\begin{pseudo*}{#1}$\vartriangleright$\quad\begin{em}\ignorespaces}%
  {\end{em}\hspace{\stretch{1}}$\vartriangleleft$\end{pseudo*}}

% Teoremos įrodymas
\newenvironment{ir}%
  {\begin{pseudoir}{Įrodymas\quad}}%
  {\end{pseudoir}}
% Teoremos „įrodymas“
\newenvironment{kir}%
  {\begin{pseudoir}{,,Įrodymas``\quad}}%
  {\end{pseudoir}}
% Teoremos įrodymas be jokių įžangų
\newenvironment{ir*}%
  {\begin{pseudoir}{}}%
  {\end{pseudoir}}

% -- Viskas ------------------------------------------------------------------
