Featured Book

LaTeX Beginners Guide

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 5 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

References to Equations work only partially

Add tags Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).

References to Equations work only partially

Postby 21did21 on Mon Feb 27th, 2012

Hello world !

i don't understand one thing :

i use the environnement \begin{equation} with a \label{eq9}
in my text i put this command ( \eqref{eq9} ) to cite this equation.

=> It works nice but for some equations in my document it doesn't works !

could you explain the reasons that could cause it does not work

thanks
Last edited by 21did21 on Fri Mar 2nd, 2012, edited 1 time in total.
21did21
 
Posts: 58
Joined: Thu Sep 8th, 2011

Re: References to Equations work only partially

Postby Stefan_K on Mon Feb 27th, 2012

Hi,

possible reasons are not matching label names.
Perhaps just show a minimal working example, where \eqref doesn't work for you.

We had a similar question here: Problem with Equation Reference, but also there was not sufficient information given by the questioner. You know, just it doesn't work. In that case the questioner probably forgot to load amsmath, wich provides \eqref.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6330
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: References to Equations work only partially

Postby 21did21 on Mon Feb 27th, 2012

OK sorry.

this is my code :

Code: Select all  •  Open in writeLaTeX
\documentclass[final,5p,times,twocolumn]{elsarticle}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{lineno}
\usepackage{color}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{cuted}
\journal{gggggggg}
\begin{document}
\begin{frontmatter}
\title{\huge{dfsqcsdcsdvds}}
\author[labelAAA]{azert qwerty}
\address[labelAAA]{pmoi pmoi}

\begin{abstract}
bbbbbbbbbbbbbbbbbbbbbbbbbb
\end{abstract}

\begin{keyword}
ddd \sep ffff
\PACS XXXXXXXXXXXXXXXXXX \sep xxxxxxxxxx

\end{keyword}
\end{frontmatter}

\section{Introduction}
\label{intro.sec}

blablabla \eqref{eq1} \eqref{eq12}

\begin{equation}
a=\frac{789\pi}{\lambda}sin\left(\frac{\theta}{45684}\right)
\label{eq1}
\end{equation}

edfvefvdzvedvrever
vfev
re
ver
v
re

\begin{equation}
AAAA_oppo(x)=opmlk\mu iop
\label{eq12}
\end{equation
}


...

when i compil this \eqref{eq1} works but \eqref{eq12} no :cry:

=> it seems that when i have to number eq10 eq11 eq12 eq13 ....
it don't works
21did21
 
Posts: 58
Joined: Thu Sep 8th, 2011

Re: References to Equations work only partially

Postby Stefan_K on Mon Feb 27th, 2012

This code works for me, \eqref{eq12} works fine. Could you post your .log file here, as attachment, for this test code?

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6330
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: References to Equations work only partially

Postby 21did21 on Tue Feb 28th, 2012

hello!

now this example works, i just have to compil 2 times.

=> but my real .tex doesn't work even if i compil 5 times :oops:
21did21
 
Posts: 58
Joined: Thu Sep 8th, 2011

Re: References to Equations work only partially

Postby Stefan_K on Tue Feb 28th, 2012

21did21 wrote:now this example works, i just have to compil 2 times.

Yes, a newly created (or updated) document may require two times compilations: int he first, the labels are written to the .aux file (yet references are unknown), in the second run LaTeX is able now to see the labels in the .aux file and can print the references.

21did21 wrote:=> but my real .tex doesn't work even if i compil 5 times :oops:


You could always make a copy and hack it down step by step, in each step compile 2 times and check. Either
  • the error goes away, so you have located the problem to exactly the code piece you removed in the step - fix that piece or show it
  • or the error remains, you end with a small example which shows the error and which you can post.

While hacking down always is a good way, building a new "similar" example is no guarantee that the error can be recreated, as you have noticed.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6330
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: References to Equations work only partially

Postby 21did21 on Wed Feb 29th, 2012

thanks stefan for your help !

now it works (but i don't now why :P )
21did21
 
Posts: 58
Joined: Thu Sep 8th, 2011


Return to Math & Science

Who is online

Users browsing this forum: No registered users and 5 guests