2

For some reason I have to edit a tex file exported from Scientific Word, which has the line

\input{tcilatex}

I downloaded tcilatex.tex from here. However, everything works fine until I try to use cases environment inside an align, or align*.

A toy example

\documentclass{article}
\usepackage{amsmath}
\input{tcilatex}
\begin{document}
\begin{align}
  a = \begin{cases}
    b\\c
  \end{cases}
\end{align}
\end{document}

Compiling this file gives a lot of errors...

I noticed in the file I am editting, it seems Scientific Word has avoided the align environment and uses eqnarray which is advised as inferior.

Is this problem reproducible for you? If yes, what can be done to solve this problem? If not, what is the correct tcilatex.tex I should get?

Y. Pei
  • 123
  • 2
    Welcome to TeX.SX! I don't know much about SWP, but from what I can see tcilatex.tex redefines several macros from amsmath, so they cause conflicts. – egreg Feb 10 '15 at 11:46
  • 2
    Do you actually need tcilatex? As @egreg points out, much of it seems to be definitions of macros from amsmath. I suggest commenting out \input{tcilatex}. Then copy and paste any parts that are required into the preamble of your document. – Ian Thompson Feb 10 '15 at 11:49
  • @IanThompson -- make that an answer, please – barbara beeton Nov 07 '15 at 23:07
  • @barbarabeeton --- done. – Ian Thompson Nov 10 '15 at 19:13

1 Answers1

2

As @egreg points out in the comments, most of tcilatex.tex seems to be definitions of macros from the amsmath package. Now the amsmath package is used more or less universally for documents that contain a lot of mathematics, so including a file that conflicts with it is not a good idea. Therefore I suggest removing \input{tcilatex}, which fixes your example.

\documentclass{article}
\usepackage{amsmath}
%\input{tcilatex}
\begin{document}
\begin{align}
  a = \begin{cases}
    b\\c
  \end{cases}
\end{align}
\end{document}

If your actual document generates Undefined control sequence errors with amsmath but no tcilatex, just copy the definitions of the missing macros into the preamble.

Ian Thompson
  • 43,767