0

I have the following latex code which produces the error mentioned in the title:

\documentclass{article}
%\usepackage{flexisym}
%\usepackage[T1]{fontenc}
%\usepackage{array}
\usepackage{setspace}
\usepackage{amsmath}


\begin{document}
\numberwithin{
\[ 
\left( \begin{array}{c}
\textrm{$\;d\textprime\;$}\\
\textrm{$\;s\textprime\;$}\\
\textrm{$\;b\textprime\;$}
\end{array} \right)

\]
}
\end{document}

If I remove the numberwithin command and add the flexisym package but remove the amsmath package, it runs fine. Also, if I remove the numberwithin command and add the flexisym package and amsmath package, I get an error saying,"amsmath.sty: Latex error or: command \dfrac already defined". Can someone please point out the mistake due to which I get these errors? I somehow need the numberwithin command to be working with arrays.

4
  • What's \numberwithin supposed to do? It's completely misplaced.
    – egreg
    Jan 27, 2016 at 23:20
  • What are you trying to use \numberwithin for? Its purpose is to affect the output of counters, so I can't see what you want it to do. Jan 27, 2016 at 23:20
  • Based on your feedback, I think the numberwithin is unnecessary. I actually have other arrays before and after this array. So, I wanted this equation to also be numbered. But I guess I can use \begin{eqnarray} for that purpose. Thanks. Jan 27, 2016 at 23:41
  • not eqnarray, equation but also why are you using \textrm with nested $ mathematics and then \textprime the markup is exceedingly weird. Jan 27, 2016 at 23:44

1 Answer 1

2

As far as I can make out the intended result is

enter image description here

\documentclass{article}

\usepackage[T1]{fontenc}

\usepackage{amsmath}


\begin{document}

\begin{equation}
\begin{pmatrix}
\mathrm{d}'\\
\mathrm{s}'\\
\mathrm{b}'
\end{pmatrix}
\end{equation}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .