#
# This module contains some functions for generating tables in LaTeX
# format.
#
# Copyright (C) 2007-2010 Dennis Furey
#
# elongation                                  (1976)
# label                                        (209)
# scientific_notation                          (472)
# sectioned_table                             (8339)
# table                                       (8218)
# vwrap                                       (3761)
#
# compressed with granularity 80
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 3.
# 
# This program 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
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
{iwkwoGz_h[ivHn_wIvwOC{Hseoo>Sgfoz_jf>SgwFxsevwIaxkohajsdpkNduZgo?ofo{KwdiLd>cx
owdOvR]FnOZjEoEDSfIXrfAGo@vfsiKGfr[RhRPdf\nogfgZ`GKI\@Af^i`fWw^vxgHskInTfbOwNFt
nGvvggjoKwFx_F^PoJNGwd_wJ^ZhkrogzpK@?FoMhN_vDmz_ykz`awokoszmJ\DP@\GCwHEzgpGX{R^
cvvp_{oFKZvxFfhMZ^=CzKiLvxn=J=ZknOC{gaRrrkplp>^cvfCvoPfkhnfdUzaoDmAt{KviKJsKNHf
ebkn?AyOpy?y^fq?=[YVNF[mzeOiRsWwZkQF`d<EZdF{DxiGKHpi[Du{cSFbU{@ShMvmwFxyVyYJGBs
b[s^SiQBCHnfEUdh<=KH^vN<F[>cxkZOiN@GjqY{z_Epho>=zh=cxaHoLfjT<HkwOkn\MubSlfYOKkN
O=W_U[{{voFXoDEznDCvabdgs\^fAwIH{_DB<EXvyiIPpgxuQoR[yU{y[p>IGQM=[P>[qoDMtXMNe{R
>KKp]^SFKCFpf@qWQkqQvLSJqT[az[SX>hhncpm=ZsBg\<??LOpEJkHp@aLY]sEE@\FqBxtspRZAj<E
{cycz[yLHf^=YFcyJn@I>{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