LaTeX forum ⇒ Math & ScienceI need use \pmatrix

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Venestor
Posts: 1
Joined: Fri Feb 21, 2020 12:03 am

I need use \pmatrix

Postby Venestor » Fri Feb 21, 2020 10:19 am

I input my formula from Maxima and I need use
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \pmatrix{1&-2&3\cr -1&1&-2\cr 2&-1&-1\cr }
  2. I know to define matrix, should use
  3. \left[ \begin{array}{ccc}
  4. 1 & -2 & 3 \\
  5. -1 & 1 & -2 \\
  6. 2 & -1 & -1
  7. \end{array} \right]

I have error: ! Package amsmath Error: Old form `\pmatrix' should be \begin{pmatrix}.

Is it any solution to do this. Maybe using command \def ??
Please help.

Sorry for my english :D
Last edited by cgnieder on Sun Mar 01, 2020 5:12 pm, edited 1 time in total.
Reason: added code formatting

User avatar
Ijon Tichy
Posts: 269
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Fri Feb 21, 2020 10:39 am

There is an explanation of this error message in the amsmath manual amsldoc.pdf. You should replace the plainTeX command \pmatrix by the LaTeX environment pmatrix (also described in amsldoc), e.g.:
\begin{pmatrix}1&-2&3\\-1&1&-2\\ 2&-1&-1 \end{pmatrix}

BTW: There are additional matrix environments in mathtools.

AFAIK it is possible to configure the TeX output of Maxima. So if it by default uses plainTeX output instead of LaTeX output you should reconfigure the matrix output. See the Maxima manual for more information. I do not know Maxima, so I cannot help on how to do this. However, how to change the output of Maxima isn't really a TeX question but a Maxima question.


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests