7

By default the style is

\renewcommand{\theequation}{\thechapter.\arabic{equation}}

for example

            x+y =4         (2.1)

How to put \dots in front equation numbering such as

            x+y =4      ...(2.1)

while in the text reference remain (2.1).

and how to make it for the array by using \begin{eqnarray} \end{eqnarray}

      x = y+ 4         
         -Z+ E         
        + 4gh     ...(2.1)
1
  • Welcome to TeX-SX! Have a look at our starter page for a quick intro if you wish to familiarize yourself with our format. Jul 25, 2013 at 6:26

2 Answers 2

9

The »mathtools« package provides the macros \newtagform and \usetagform which allow to do this quite comfortable.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}

\usepackage{mathtools}  % loads »amsmath«
\newtagform{dots}{\ldots(}{)}

\begin{document}
  \begin{equation}
    (a+b)^2 = a^2+2ab+b^2 \label{eqn:binomi-one}
  \end{equation}
  \begin{equation}
    (a-b)^2 = a^2-2ab+b^2 \label{eqn:binomi-two}
  \end{equation}
  \begin{equation}
    \usetagform{dots}
    (a+b)(a-b) = a^2-b^2 \label{eqn:binomi-three}
  \end{equation}
%
  The Binomi equations~\eqref{eqn:binomi-one},~\eqref{eqn:binomi-two} and~\eqref{eqn:binomi-three}.
\end{document}

Works of course also with the numbering scheme for equations in report and book.


enter image description here

3
  • How about the \begin{eqnarray} \usetagform{dots} \end{eqnarray} , I try to use it but cant get it
    – YIT HOE NG
    Jul 25, 2013 at 9:08
  • @YIT HOE NG You shouldn't use eqnarray in your documents. You should use the environments provided by amsmath instead. Jul 25, 2013 at 12:17
  • @YITHOENG: Avoid eqnarray! I'm not aware of a solution that works inside the environments of »amsmath«. Jul 25, 2013 at 15:49
5

You can update the \maketag@@@ macro of amsmath to insert the \dots. Here's a convenience macro that you can add to your document preamble:

\makeatletter
\newcommand{\adddotsbeforeeqnnum}{\def\maketag@@@##1{\hbox{\m@th\normalfont\dots##1}}}
\makeatother

It acts as a switch to enable "dotted equation numbering".

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\renewcommand{\theequation}{2.\arabic{equation}}% Just for this example
\makeatletter
\newcommand{\adddotsbeforeeqnnum}{\def\maketag@@@##1{\hbox{\m@th\normalfont\dots##1}}}
\makeatother
\begin{document}
\begin{equation}
  f(x) = ax^2 + bx + c \label{eqn:one}
\end{equation}
\begin{equation}
  f(x) = ax^2 + bx + c \tag{xyz}\label{eqn:two}
\end{equation}
\begin{equation}
  \adddotsbeforeeqnnum
  f(x) = ax^2 + bx + c \label{eqn:three}
\end{equation}
See~\eqref{eqn:one},~\eqref{eqn:two} and~\eqref{eqn:three}.
\end{document}
1
  • How about using the \begin{eqnarray} A= \left[\colvec{ A_{11}&A_{12}&\cdots &A_{1n}\A_{21}&A_{22}&\cdots &A_{2n}\\vdots & \vdots &\ddots &\vdots \A_{n1}&A_{n2}&\cdots &A_{nn}\}\right], \label{Equat2.4} \end{eqnarray}
    – YIT HOE NG
    Jul 25, 2013 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.