TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to reference an equation from a book, and so I tag the equation (\tag{10.6}) for it to match the equation number from the book. That way I by purpose screw up my numbering so it goes (2.1), (2.2), (2.3), (10.6), (2.4), (2.5) and so on. But it gives me a problem when I reach section 10, because then the numbering will be like usual: (10.4), (10.5), (10.6), (10.7), and therefore the equation number will be doubled.

Is there a way for LaTeX to automatically skip that single number? I can of course just manually skip it by \addtocounter{equation}{1} but then that messes up as soon as I remove or add another equation, and it isn't very neat...

share|improve this question
1  
Perhaps label the imported equation something like \tag{10.6*}? – Ethan Bolker Mar 27 at 16:23

I suggest using \newtagform from mathtools and \tag. and adding some letter in front of the equation number to differentiate both equations. This way you'll be able to reference both.

\documentclass{article}

\usepackage{mathtools}
\newtagform{book}{(B\,}{)}
\usepackage{chngcntr}
\counterwithin{equation}{section}

\begin{document}
\setcounter{section}{10}
\usetagform{book}
\begin{equation}
\label{bkeq}\tag {10.1}
  a =b + d
\end{equation}
\usetagform{default}
From {\usetagform{book}\eqref{bkeq}} we deduce:
\begin{equation}
\label{myeq}
c = d × e
\end{equation}
But \eqref{myeq} does not imply {\usetagform{book}\eqref{bkeq}}.

\end{document} 

enter image description here

share|improve this answer

If you really want this

\let\oldtheequation\theequation
\renewcommand{\theequation}{%
\thechapter.\ifnum\value{equation}<6 \arabic{equation}\else\the\numexpr\value{equation}+1\relax\fi}

and restore old definition in next chapter.


\documentclass[a4paper,12pt]{book}

\begin{document}
\chapter{foo}
\let\oldtheequation\theequation
\renewcommand{\theequation}{%
\thechapter.\ifnum\value{equation}<6 \arabic{equation}\else\the\numexpr\value{equation}+1\relax\fi}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}\label{g}
bb
\end{equation}
\begin{equation}\label{f}
bb
\end{equation}
\begin{equation}\label{ff}
bb
\end{equation}
\begin{equation}\label{gg}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\ref{ff}**\ref{f}**\ref{gg}**\ref{g}

\chapter{foo}
\let\theequation\oldtheequation
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\begin{equation}
bb
\end{equation}
\end{document} 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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