问题在于,在 TeXShop 或 TeXnicle 中,以下代码可以轻松遵循:
\documentclass[10pt]{article}
%\usepackage{colortbl}
\usepackage{amsmath}
\begin{document}
\begin{center}
\begin{tabular}[b]{|c|c|}
\hline
Correct & Incorrect\\
$\begin{aligned}
3(2x-5)^2&=3(4x^2-20x+25)\\
&=12x^2-60x+75
\end{aligned}$
&
$\begin{aligned}
3(2x-5)^2&=(6x-15)^2\\
&=36x^2-180x+225
\end{aligned}$
\\
\hline
\end{tabular}
\end{center}
\end{document}
如果我反而调用colortbl
— — 我甚至不会称呼它:没有骰子!
错误百出:
Typesetting file:/Users/linovari/Documents/12MM[2017]/Unit 4 - Statistics/discrete
Typesetting with /Users/linovari/Library/Application Support/TeXnicle/engines/pdflatex.engine
[0/3] Typesetting file:/Users/linovari/Documents/12MM[2017]/Unit 4 - Statistics/discrete
****************************
*** Typsetting: discrete
*** Output dir: /Users/linovari/Documents/12MM[2017]/Unit 4 - Statistics
*** Output dir: .
*** N typeset: 3
*** Do bibtex: 1 (bibtex)
****************************
***------------------------------------------------------------
*** Run 1 of 3...
***------------------------------------------------------------
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./discrete.tex
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo
))
(/usr/local/texlive/2016/texmf-dist/tex/latex/colortbl/colortbl.sty
(/Users/linovari/Library/texmf/tex/latex/misc/array.sty
Style-Option: `array' v2.0d <90/08/20> (F.M.)
English documentation dated <90/08/20> (F.M.)
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/color.cfg
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-def/pdftex.def
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
))
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsbsy.sty
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsopn.sty)
)
(./discrete.aux
)
(/usr/local/texlive/2016/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
Undefined control sequence.
<argument> ...\stretch {.5}\kern \z@ \d@llarbegin
\insert@column \d@llarend ...
l.7 \begin{tabular}[b]{|c|c|}
./discrete.tex:7: Undefined control sequence.
<argument> ...llarbegin \insert@column \d@llarend
\hskip \stretch {.5}\or \d...
l.7 \begin{tabular}[b]{|c|c|}
./discrete.tex:7: Undefined control sequence.
<argument> ...\stretch {.5}\kern \z@ \d@llarbegin
\insert@column \d@llarend ...
l.7 \begin{tabular}[b]{|c|c|}
./discrete.tex:7: Undefined control sequence.
<argument> ...llarbegin \insert@column \d@llarend
\hskip \stretch {.5}\or \d...
l.7 \begin{tabular}[b]{|c|c|}
[1{/usr/local/texlive/2016/texmf-var/fonts/map/pdftex/updmap/pdftex.map
./discrete.tex:7: Undefined control sequence.
<argument> ...\stretch {.5}\kern \z@ \d@llarbegin
\insert@column \d@llarend ...
l.7 \begin{tabular}[b]{|c|c|}
./discrete.tex:7: Undefined control sequence.
<argument> ...llarbegin \insert@column \d@llarend
\hskip \stretch {.5}\or \d...
l.7 \begin{tabular}[b]{|c|c|}
./discrete.tex:7: Undefined control sequence.
<argument> ...\stretch {.5}\kern \z@ \d@llarbegin
\insert@column \d@llarend ...
l.7 \begin{tabular}[b]{|c|c|}
./discrete.tex:7: Undefined control sequence.
<argument> ...llarbegin \insert@column \d@llarend
\hskip \stretch {.5}\or \d...
l.7 \begin{tabular}[b]{|c|c|}
[1{/usr/local/texlive/2016/texmf-var/fonts/map/pdftex/updmap/pdftex.map
}
]
(./discrete.aux) )
(see the transcript file for additional information)</usr/local/texlive/2016/te
xmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb
></usr/local/texlive/2016/tex
mf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2016/texmf
-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb
>
</usr/local/texlive/2016/texmf-di
st/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
Output written on ./discrete.pdf (1 page, 35654 bytes).
SyncTeX written on ./discrete.synctex.gz.
Transcript written on ./discrete.log.
***------------------------------------------------------------
*** Running bibtex on discrete ...
***------------------------------------------------------------
This is BibTeX, Version 0.99d (TeX Live 2016)
The top-level auxiliary file: discrete.aux
I found no \citation commands---while reading file discrete.aux
I found no \bibdata command---while reading file discrete.aux
I found no \bibstyle command---while reading file discrete.aux
(There were 3 error messages)
Compile aborted.
*** pdflatex.engine has completed.
有什么建议么?
我已经更新了 TeXShop 调用的软件包。抱歉,我的经验不足,无法理解这些错误。我导入了大量据称可以运行的示例,但对我来说,它们不起作用。这colortbl
似乎是问题所在。
答案1
您的控制台输出包含:
(/usr/local/texlive/2016/texmf-dist/tex/latex/colortbl/colortbl.sty
(/Users/linovari/Library/texmf/tex/latex/misc/array.sty
Style-Option: `array' v2.0d <90/08/20> (F.M.)
English documentation dated <90/08/20> (F.M.)
这意味着,colortbl
来自 TeX Live 2016,但array.sty
在不同的地方找到(/Users/linovari/Library/texmf/tex/latex/misc/array.sty
)并且日期来自古代历史:1990-08-20。
解决方案:重命名/Users/linovari/Library/texmf/tex/latex/misc/array.sty
或将其移开,使 TeX 无法再找到它。然后,TeX 可以array.sty
从 TL 2016 中找到它,这样就colortbl
万事大吉了。