Math & ScienceReferences to Equations work only partially

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
21did21
Posts: 58
Joined: Thu Sep 08, 2011 12:27 pm

References to Equations work only partially

Post by 21did21 »

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 02, 2012 1:16 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

References to Equations work only partially

Post by Stefan Kottwitz »

Hi,

possible reasons are not matching label names.
Perhaps just show a Infominimal 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.org admin
21did21
Posts: 58
Joined: Thu Sep 08, 2011 12:27 pm

References to Equations work only partially

Post by 21did21 »

OK sorry.

this is my code :

Code: Select all

\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
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

References to Equations work only partially

Post by Stefan Kottwitz »

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

Stefan
LaTeX.org admin
21did21
Posts: 58
Joined: Thu Sep 08, 2011 12:27 pm

Re: References to Equations work only partially

Post by 21did21 »

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:
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

References to Equations work only partially

Post by Stefan Kottwitz »

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.org admin
21did21
Posts: 58
Joined: Thu Sep 08, 2011 12:27 pm

Re: References to Equations work only partially

Post by 21did21 »

thanks stefan for your help !

now it works (but i don't now why :P )
Post Reply