%%
%% This is file `widetable.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% widetable.dtx  (with options: `package')
%%   ______________________________________________________
%%   The WIDETABLE bundle
%%   Copyright (C) 2009-2019 Claudio Beccari
%%   All rights reserved
%% 
%%   License information appended
%% 

\NeedsTeXFormat{LaTeX2e}[2016/01/01]
\ProvidesPackage{widetable}%
   [2019-06-25 v.2.0 Package for typesetting specified width tables]

\ProvidesPackage{widetable}[2019-06-24 v.1.5 A simpler way to produce
     tables of specified width]
\RequirePackage{xparse}[2019-05-01]
\DeclareDocumentEnvironment{widetable}{m O{c} m +b}
{% OPENING WIDETABLE COMMANDS
}%
{% CLOSING WIDETABLE
    \dimen0=#1 % required width
    \tabcolsep=\z@
    \setbox\z@=\hbox{\tabular{#3}#4\endtabular}%
    \tabcolsep=6pt\relax
    \setbox\tw@=\hbox{\tabular{#3}#4\endtabular}%
    \ifdim\dimen0>\wd\z@
      \tabcolsep=\dimexpr \tabcolsep*(\dimen0-\wd\z@)/(\wd\tw@-\wd\z@)\relax
    \else
      \ifdim\dimen0<\wd\z@
         \PackageWarning{widetable}{%
         The minimum width of the tabular material\MessageBreak
         amounts to \the\wd\z@,  and is larger\MessageBreak
         than the required width  of \the\dimen0\MessageBreak
         \MessageBreak
         The table is typeset with the default\MessageBreak
         column spacing}%
       \fi
    \fi
    \tabular[#2]{#3}#4\endtabular
  \ignorespacesafterend
}

%% 
%% Copyright 2009-2019 Claudio Beccari
%% 
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%% 
%% This work is "author-maintained"
%% 
%% This work consists of this file widetable.dtx, a README file
%% the manifest.txt file, and the derived files:
%%     widetable.sty and widetable.pdf.
%% 
%% 
%% By running pdflatex on widetable.dtx the user gets both
%% the sty file and the English documentation PDF file.
%% 
%%
%% End of file `widetable.sty'.
