0

Here is the code I have problem with:

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{colortbl}

\begin{document}

\begin{equation}
f(x) = \begin{cases}
1, &\mbox{if $x=1$} \\
2, &\mbox{if $x=2$}
\end{cases}
\end{equation}

\end{document}

When I simultaneously use packages amsmath and colortbl, things went wrong with the equations (with \begin{cases}...\end{cases}). When I compile the file it reports "Use of @startpbox doesn't match its definition. f(x) = \begin{cases}" and "Extra }, or forgotten \endgroup. f(x) = \begin{cases}". However, the file functions well if I comment \usepackage{colortbl} out. Does anyone happen to know how to solve this incompatibility issue? Thank you very much!

By the way, below is the complete log file is attached here:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2014.9.3)  26 MAR 2019 21:19
entering extended mode
**Incompatibility.tex

("C:\Users\jsun1\Dropbox\Junze media bias\Part Experiment\Working paper\Technic
al LaTeX problem\Incompatibility.tex"
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\size12.clo"
File: size12.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsmath.st
y"
Package: amsmath 2018/12/01 v2.17b AMS math features
\@mathmargin=\skip43

For additional information on amsmath, use the `?' option.

("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amstext.st
y"
Package: amstext 2000/06/29 v2.01 AMS text

("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty
"
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks14
\ex@=\dimen103
))
("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty
"
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen104
)
("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty
"
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count87
LaTeX Info: Redefining \frac on input line 223.
\uproot@=\count88
\leftroot@=\count89
LaTeX Info: Redefining \overline on input line 385.
\classnum@=\count90
\DOTSCASE@=\count91
LaTeX Info: Redefining \ldots on input line 482.
LaTeX Info: Redefining \dots on input line 485.
LaTeX Info: Redefining \cdots on input line 606.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen105
LaTeX Font Info:    Redeclaring font encoding OML on input line 729.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 730.
\macc@depth=\count92
\c@MaxMatrixCols=\count93
\dotsspace@=\muskip10
\c@parentequation=\count94
\dspbrk@lvl=\count95
\tag@help=\toks15
\row@=\count96
\column@=\count97
\maxfields@=\count98
\andhelp@=\toks16
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks17
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks18
LaTeX Info: Redefining \[ on input line 2844.
LaTeX Info: Redefining \] on input line 2845.
) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\colortbl\colortbl.sty"
Package: colortbl 2012/02/13 v1.0a Color table columns (DPC)

("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\tools\array.sty"
Package: array 2018/11/13 v2.4j Tabular extension package (FMi)
\col@sep=\dimen112
\ar@mcellbox=\box28
\extrarowheight=\dimen113
\NC@list=\toks19
\extratabsurround=\skip46
\backup@length=\skip47
\ar@cellbox=\box29
)
("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\color.sty
"
Package: color 2016/07/10 v1.1e Standard LaTeX Color (DPC)

("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics-cfg\color
.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package color Info: Driver file: pdftex.def on input line 147.

("C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics-def\pdfte
x.def"
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
))
\everycr=\toks20
\minrowclearance=\skip48
)
("C:\Users\jsun1\Dropbox\Junze media bias\Part Experiment\Working paper\Technic
al LaTeX problem\Incompatibility.aux")
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.

("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count99
\scratchdimen=\dimen114
\scratchbox=\box30
\nofMPsegments=\count100
\nofMParguments=\count101
\everyMPshowfont=\toks21
\MPscratchCnt=\count102
\MPscratchDim=\dimen115
\MPnumerator=\count103
\makeMPintoPDFobject=\count104
\everyMPtoPDFconversion=\toks22
)
! Use of \@startpbox doesn't match its definition.
<inserted text> \@startpbox {
                             @{}l@{\quad }l@{}}
l.10 f(x) = \begin{cases}

If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.

! Extra }, or forgotten \endgroup.
\@mkpream ...after \@startpbox \expandafter {#1}}}
                                                  \let \@endpbox \relax \let...
l.10 f(x) = \begin{cases}

I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

[1

{C:/Users/jsun1/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
("C:\Users\jsun1\Dropbox\Junze media bias\Part Experiment\Working paper\Technic
al LaTeX problem\Incompatibility.aux") ) 
Here is how much of TeX's memory you used:
 1466 strings out of 493921
 18853 string characters out of 3144925
 68398 words of memory out of 3000000
 4794 multiletter control sequences out of 15000+200000
 7050 words of font info for 26 fonts, out of 3000000 for 9000
 841 hyphenation exceptions out of 8191
 34i,9n,20p,232b,122s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Users/jsun1/AppData/Local/Programs/
MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmex10.pfb><C:/Users/jsun1/AppData/Lo
cal/Programs/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi12.pfb><C:/Users/jsu
n1/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb>
Output written on Incompatibility.pdf (1 page, 26303 bytes).
PDF statistics:
 18 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
  • 3
    it runs without error for me, please show the log that you get from that file. – David Carlisle Mar 26 at 19:35
  • @DavidCarlisle. Sure, you can find the relevant log file above. Thank you! – SUN JUNze Mar 26 at 20:09
  • 1
    You have not included the part that shows the problem. most likely you have old copies of array or color package around so the definitions are not compatible, the log shows the version numbers of the packages and the directories where they were found... – David Carlisle Mar 26 at 20:14
  • @DavidCarlisle. Thanks for pointing this out, and now you find the complete log. I am really a laymen with these technical issues and even do not know what is really revelant :). – SUN JUNze Mar 26 at 20:26
  • bingo:-) colortbl comes from C:\Program Files (x86)\MiKTeX 2.9\tex\latex\colortbl\colortbl.sty" but everything else comes from C:\Users\jsun1\AppData\Local\Programs\MiKTeX 2.9\tex\latex make sure you update both user and admin versions of miktex and update colortbl and array together – David Carlisle Mar 26 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.