%% $Id: mwquotch.sty,v 1.1 2005-06-01 21:24:17+02 myszka Exp myszka $
%% This is file `mwquotch.sty',
%% File based on a quotachap.sty/.dtx by Karsten Tinnefeld
%% Chapter Headings with Quotes for mwcls
%% This macro needs mwcls and
%% \documentclass{mwrep} or \documentclass{mwbk}
%%
%% File defines environment savequote and macro quathor
%%
%  \DescribeEnv{savequote}
%  The |savequote| environment should appear at the top level, not in
%  the document's preamble (i.e., after |\begin{document}|) and before
%  the start of the chapter you want to decorate. It has one optional
%  argument that provides the width
%  of the quotation paragraph. The default is $10$cm (approx.
%  $3.94$in). Possibly you may want to set your quote in ``quotation
%  marks'', as these marks differ from country to country, it is left
%  to you.
%
%  \DescribeMacro{qauthor}
%  Each quotation can consist of several paragraphs, but must end with
%  a |\qauthor{A. U. Thor}| command. This is not only provided to
%  uphold the principles of ``honour whom honour is due'' but to provide
%  the right author name formatting and inter quotation spacing. The
%  quotes can follow each other immediately.
%%
%% Macros are almost the same as original... Does not change chapter size
%% and apperance
%%
%% This file is NOT part of the LaTeX2e system, but intended for use with
%% it.
%%
%% This file is free software; you can redistribute it and/or modify it
%% under the terms of the GNU Library General Public License as published
%% by the Free Software Foundation; either version 2 of the License, or
%% (at your option) any later version.
%%
%% This document 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.  See the GNU
%% General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% somehow; if not, write to the Free Software Foundation, Inc., 675 Mass
%% Ave, Cambridge, MA 02139, USA.
%%
%% Error Reports in case of UNCHANGED versions to
%%
%%              Wojciech Myszka
%%              Smoluchowskiego 25
%%              PL-50-372 Wroclaw
%%              Poland
%%       Email: wojciech.myszka@pwr.wroc.pl
%%
%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesPackage{mwquotch}
  [2005/06/01 v0.1b Chapter Headings with Quotes for mwcls]
%%
% Przepisane z quotachp, definicje savequote i...
%%
\newenvironment{savequote}[1][10cm]{%
  \begin{lrbox}{\@quotebox}
    \begin{minipage}[t]{#1}\footnotesize\itshape\raggedleft
      \ignorespaces}{%
      \unskip\end{minipage}\end{lrbox}
  \global\setbox\@quotebox\copy\@quotebox
  \global\let\@printcites\@iprintcites
  \ignorespacesafterend}
%%
% ...quauthor
%%
\newcommand{\qauthor}[1]{%
  \par\smallskip
  {\raggedleft\upshape #1\qquad\hbox{}\par}\bigskip}
\newsavebox{\@quotebox}
\let\@printcites\relax
%%
% Tu modyfikacje makr z klasy mwcls Marcina Woliñskiego
%%
\renewcommand*\mw@normalheading{%
  \if\mw@HeadingBreakBefore \hrule\@height\z@\nobreak
     \else \addpenalty\@secpenalty \fi
   \hrule\@height\z@\nobreak
  \hbox to \textwidth{\hfill\@printcites} % <- Tu jest zmiana!
%  \@printcites % <- Tu jest zmiana!
   \hrule\@height\z@\nobreak
  \addvspace{\csname \mw@HeadingType @preskip\endcsname}%
  \bgroup\language\l@nohyphenation
   \raggedright
   \interlinepenalty\@M
   \normalfont\sectsetup
   \csname \mw@HeadingType @head\endcsname
   \@@par
  \egroup
  \mw@markandtoc
  \nobreak
  \vskip\csname\mw@HeadingType @postskip\endcsname
  \@afterheading
 }
%%
% @iprintcities z quotchap
%%
\newcommand*{\@iprintcites}{%
  \vbox to\z@{\copy\@quotebox\vss}
  \global\let\@printcites\relax}
