domingo, 25 de novembro de 2012

Dica: Criando uma nova numeração em equações matemáticas

Respondendo a pergunta de Stefano, para obter uma nova sequencia de numeração faça o seguinte:

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\newcounter{matriz}
\newenvironment{matriz}{\refstepcounter{matriz}\equation}{\tag{M\thematriz}\endequation}


\begin{document}

\begin{equation}
y = x
\end{equation}

\begin{equation}
y = \frac{1}{x}
\end{equation}

A próxima equação é uma matriz \eqref{m1}.

\begin{matriz}\label{m1}
\left( {\begin{array}{*{20}c}
{a_{11} } & {a_{12} } & {a_{13} } \\
{a_{21} } & {a_{22} } & {a_{23} } \\
{a_{31} } & {a_{32} } & {a_{33} } \\

\end{array} } \right)
\end{matriz}

\begin{matriz}\label{m2}
\left( {\begin{array}{*{20}c}
{a_1 } & 1 & 0 \\
1 & \ddots & 1 \\
0 & 1 & {a_n } \\

\end{array} } \right)
\end{matriz}

\begin{equation}
y = \sqrt x
\end{equation}

\end{document}


Nenhum comentário:

Postar um comentário