Incompatibilité entre les extensions cellspace et tablists
Je bloque en compilant un ECM avec une incompatibilité entre l'extension cellspace `cellspace` (options math *math* et table) *table*) et une version personnalisée de tablists `tablists` que j'avais obtenue depuis le forum mathematex. [forum mathematex](http://forum.mathematex.net/).
J'ai rencontré cette erreur de compilation après changement des options de cellspace, `cellspace` : précédemment tout de passait bien et mais lors des changements de paramètres de cellspace, `cellspace`, je n'avais pas dans mes documents de cas avec l'environnement pmatrix `pmatrix` qui déclenche cette erreur de compilation.
Le package tablists `tablists` n'évolue plus depuis 2009, 2009 — j'ai vérifié sur le ctan.org.
[ctan.org.}(http://ctan.org/)
Je mets l'ECM permettant d'obtenir l'erreur, qui disparaît quand un seul seule ou aucun aucune des deux packages extensions est utilisé. Le package tablists-perso utilisée. L'extension `tablists-perso` est placé après la ligne \end{document}.
placée plus bas.
\documentclass[a4paper,10pt,oneside,table]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\DecimalMathComma
\usepackage{mathrsfs,amssymb,mathtools}
\usepackage{tablists-perso}
\usepackage[math]{cellspace}
\newcommand{\V}{\ensuremath{\overrightarrow}}
\begin{document}
\begin{align*}
\V{AB}=\begin{pmatrix}
a\\b
\end{pmatrix}
\end{align*}
\end{document}
L'extension `tablists-perso` :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This is file `tablists-perso.sty'
%% modified from tablists.sty 2009/08/04 v0.0e (beta) Tabulated list of short items
%% added 2013/02/09: compatibility with amsmath construct by protecting some of them against alignment nesting
%% added 2013/06/08: \jot=0pt inside amsmath \env@matrix to avoid spurious space between matrix lines
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{tablists-perso}[2013/02/09]
\RequirePackage{makecell}
\@ifpackagelater{makecell}{2007/05/24 V0.1d}{}{\PackageError
{tablists}{For a successful cooperation we need at least\MessageBreak
version `2007/05/24 V0.1d' of package makecell,\MessageBreak
but only version\MessageBreak
`\csname ver@makecell.\@pkgextension\endcsname'\MessageBreak
is available}\@eha\endinput}
\newcommand\tabenumsep{\hskip1em}
\newcommand\negtabenumsep{%
\settowidth\@tempdima{\tabenumsep}\hspace*{-\@tempdima}}
\newcommand\tabenumitem{\ifvoid\@labels\else\llap{\box\@labels\hspace{-\@totalleftmargin}}\fi
&\@ifnextchar[%
{\TeXr@@tabenumitem{&}}%
{\TeXr@tabenumitem{&}{\@enumctr}\setcounter{\@subenumctr}\z@}}
\newcommand\subtabenumitem{\ifnum\value{\@subenumctr}=\z@\negtabenumsep
\let\negtabenumsep\relax\fi&
\@ifnextchar[%]
{\TeXr@@tabenumitem{&}}%
{\TeXr@tabenumitem{&}{\@subenumctr}}}
\newcommand\TeXr@tabenumitem[2]{%
\stepcounter{#2}{\@nameuse{label#2}}#1
\protected@edef
\@currentlabel{\csname p@#2\endcsname\csname the#2\endcsname}}
\@ifdefinable\TeXr@@tabenumitem{}
\def\TeXr@@tabenumitem#1[#2]{{#2}#1}
\newcommand\notabenumitem{\@ifstar
{\TeXr@notabenumitem{\@enumctr}}%
{\tabenumsep\TeXr@notabenumitem{\@enumctr}}}
\newcommand\nosubtabenumitem{\@ifstar
{\TeXr@notabenumitem{\@subenumctr}}%
{\tabenumsep\TeXr@notabenumitem{\@subenumctr}}}
\newcommand\TeXr@notabenumitem[1]{\@ifnextchar[%]
{\TeXr@@tabenumitem{\hskip\labelsep}}%
{\TeXr@tabenumitem{\hskip\labelsep}{#1}}}
\newcommand\skipitem[1][1]{\count@=#1\multiply\count@2\advance\count@\@ne
\eline{\count@}}
\newcommand\subtabrow{\skipitem\negtabenumsep}
\newcommand\tabenumindent{}
\newenvironment{rtabenum}{\let\Alph\Asbuk\let\alph\asbuk
\tabenum}{\endtabenum}
\newcommand\tabenum{\@ifnextchar[{\TeXr@tabenum@}{\TeXr@tabenum@[]}}
\@ifdefinable\TeXr@tabenum@{}
\def\TeXr@tabenum@[#1]{\@ifnextchar[%]
{\TeXr@tabenum@@[#1]}{\TeXr@tabenum@@[#1][]}}
\@ifdefinable\TeXr@tabenum@@{}
\long\def\TeXr@tabenum@@[#1][#2]{\par
\addpenalty\@beginparpenalty
\@topsepadd\topsep\advance\@topsepadd\partopsep
\advance\@topsepadd-\jot
\ifdim\@topsepadd<\z@\@topsepadd=\z@\fi
\if@nobreak\vspace{-\jot}\else\addvspace\@topsepadd\fi
\openup\jot
\ifnum\@enumdepth>\thr@@
\@toodeep
\else
\advance\@enumdepth\@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
\setcounter{\@enumctr}\z@
\let\item\tabenumitem\let\noitem\notabenumitem
\ifnum\@enumdepth>\thr@@
\PackageWarning{tablists}{tablist has one level}{}%
\let\subitem\tabenumitem\let\nosubitem\notabenumitem
\else
\let\subitem\subtabenumitem\let\nosubitem\nosubtabenumitem
\advance\@enumdepth\@ne
\edef\@subenumctr{enum\romannumeral\the\@enumdepth}%
\setcounter{\@subenumctr}\z@
\fi
\fi
\expandafter\TeXr@enumlabel@\expandafter{\@defaulttabenumformat}{\@enumctr}% <-- changed
\expandafter\TeXr@enumlabel@\expandafter{\@defaultsubtabenumformat}{\@subenumctr}% <-- changedchanged
\def\tempa{#1}\ifx\tempa\empty\else
\TeXr@enumlabel@{#1}{\@enumctr}\fi
\def\tempa{#2}\ifx\tempa\empty\else
\TeXr@enumlabel@{#2}{\@subenumctr}\fi
\@TeXr@tabenum
}
\newcommand{\@defaulttabenumformat}{}
\newcommand\defaulttabenumformat[1]{\gdef\@defaulttabenumformat{#1}}% <-- changed
\newcommand{\@defaultsubtabenumformat}{}
\newcommand\defaultsubtabenumformat[1]{\gdef\@defaultsubtabenumformat{#1}}% <-- changed
%\defaulttabenumformat{1.}% <-- changed
%\defaultsubtabenumformat{a.}% <-- changed
\newcommand{\twodigitnb}[1]{}% <-- changed
\def\twodigitnb#1\end{\bfseries\makebox[1em]{\hfill#1})}% <-- changed
\defaulttabenumformat{\twodigitnb 1\end}% <-- changed
\defaultsubtabenumformat{a)}% <-- changed
\newcommand\TeXr@enumlabel@[2]{%
\@tempcnta0
\TeXr@lab{}\def\TeXr@label{\TeXr@label@{#2}}%
\expandafter\TeXr@loop\@gobble{}#1\@@@
\ifnum\@tempcnta=1\else
\PackageWarning{tablists}{Incorrect label; no or multiple
counters.\MessageBreak The label is: \@gobble#1}%
\fi
\expandafter\edef\csname label#2\endcsname{\the\TeXr@lab}%
\expandafter\let\csname the#2\endcsname\TeXr@the%
}
\newcommand{\@TeXr@tabenum}{\begingroup
\let\\\TeXr@arraycr\TeXr@tlist@arrayjot\let\par=\cr
\settowidth\@tempdima{\tabenumindent}\gdef\tabenumindent{}%
\settowidth\@tempdimb{\tabenumsep}%
\ifnum\@listdepth>\z@\advance\@tempdima\@totalleftmargin\fi
\let\qedhere\tabqedhere
\halign\bgroup
\strut##\hskip\@tempdima
\hskip-\@tempdimb&&\hskip\@tempdimb\hfil##\hskip\labelsep
&##\hfil\cr}
\def\endtabenum{\crcr\egroup\endgroup\par
\addpenalty\@endparpenalty
\advance\@topsepadd\jot
\addvspace\@topsepadd}
\newcommand\subtabenum[1][]{\TeXr@tlist@arrayjot
\setcounter{\@subenumctr}\z@
\def\tempa{#1}\ifx\tempa\empty\else
\TeXr@enumlabel@{#1}{\@subenumctr}\fi
\let\item\subtabenumitem\let\noitem\nosubtabenumitem
\let\tabenumitem\subtabenumitem\let\notabenumitem\nosubtabenumitem
\let\subitem\subtabenumitem\let\nosubitem\nosubtabenumitem
\@TeXr@subtabenum
}
\newcommand{\@TeXr@subtabenum}{\let\negtabenumsep\relax
\hbox{\ifnum0=`}\fi
\begin{tabular}[t]{@{\tabenumindent}l@{}
*{12}{r@{\hskip\labelsep}l@{\tabenumsep}}@{}}%
}
\def\endsubtabenum{\end{tabular}%
\ifnum0=`{\fi}\gdef\tabenumindent{}}
\newenvironment{rsubtabenum}{\let\Alph\Asbuk\let\alph\asbuk%
\subtabenum}{\endsubtabenum}
\@ifdefinable\TeXr@rixarraycr{}
\let\TeXr@rixarraycr\TeXr@xarraycr
\newcommand\TeXr@Xarraycr{\@ifnextchar[%]
\TeXr@Xargarraycr {\@argarraycr[\jot]}}
\@ifdefinable\TeXr@Xargarraycr{}
\def\TeXr@Xargarraycr[#1]{\@tempdima\jot\advance\@tempdima#1%
\@argarraycr[\@tempdima]}
\@ifdefinable\TeXr@arrayjot{}
\def\TeXr@arrayjot [#1]{\let\@xarraycr\TeXr@Xarraycr\jot#1}
\def\noarrayjot{\let\@xarraycr\TeXr@rixarraycr}
\newcommand\TeXr@tlist@arrayjot {\@ifnextchar[%]
\TeXr@arrayjot{\TeXr@arrayjot[\jot]}}
\AtBeginDocument{\let\arrayjot\TeXr@tlist@arrayjot}
\def\TeXr@arraycr{%
\relax\iffalse{\fi\ifnum 0=`}\fi
\@ifstar{\vadjust{\penalty\@M}\@xarraycr}\@xarraycr}
\newcommand\startnumber[1]{\count@#1\advance\count@-1%
\global\expandafter\csname c@\@enumctr\endcsname\count@}
\newcommand\startsubnumber[1]{\count@#1\advance\count@-1%
\global\expandafter\csname c@\@subenumctr\endcsname\count@}
\newcommand\liststrut[1][]{\def\tempa{#1}\ifx\tempa\empty
\strut\@tempskipa\z@
\else\settoheight\@tempdima{{$#1$}}\vrule height\@tempdima depth\dp\strutbox width\z@
\advance\@tempdima-\ht\strutbox
\ifdim\@tempdima>\lineskip\advance\@tempdima\lineskip\fi
\@tempskipa\@tempdima
\fi
\advance\@tempskipa\baselineskip
\par\nobreak\vskip-\parskip
\nobreak\kern-\@tempskipa\@nobreaktrue}
\newcommand\tabqedhere{\cr
\noalign{\@par\@tempdima\prevdepth
\kern-\@tempdima\kern-\baselineskip\kern\lineskip
{\strut\popQED}\@par\kern\@tempdima}}
\let\TeXr@orilistitem\item
\newcommand\restorelistitem{\let\item\TeXr@orilistitem}
\RequirePackage{amsmath}
\renewenvironment{cases}{%
\matrix@check\cases\env@cases
}{%
\endarray\right.%
\ifnum`{=0\fi}%
}
\def\env@cases{%
\let\@ifnextchar\new@ifnextchar
{\ifnum`}=0\fi
\left\lbrace
\def\arraystretch{1.2}%
\array{@{}l@{\quad}l@{}}%
}
\renewenvironment{matrix}{%
\matrix@check\matrix\env@matrix
}{%
\endarray \hskip -\arraycolsep
\ifnum`{=0\fi}%
}
\def\env@matrix{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
{\ifnum`}=0\fi
\jot=0pt
\array{*\c@MaxMatrixCols c}}
\endinput
%%
%% End of file `tablists-perso.sty'.