Take the 2-minute tour ×
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.

Inside the float table box I add lyx:label but when inside the text and choose insert crossreference and choose the table label the text appears as ??

The reference to numbered equations appear normally , the problem is in table labels only.

I use elsarticle class

share|improve this question
1  
In my LyX the cross reference to tables works without problem with the elsarticle class. Please provide a minimal working example where you have this problem. –  Fran Sep 11 '12 at 17:08
    
where to put the lable inside table? –  mero Sep 11 '12 at 17:14
add comment

1 Answer

up vote 2 down vote accepted

This MWE is the raw opuput of from complete source view in Lyx minus the comments. The label inside the caption is OK. Just after the caption also work, but inside the tabular environment is a wrong place.

\documentclass[english]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter
\providecommand{\tabularnewline}{\\}
\makeatother
\usepackage{babel}

\begin{document}

A cross reference to table \ref{tab:one}
\begin{table}
\begin{tabular}{|c|c|c|}
\hline 
 This & is & a table \tabularnewline
\hline 
\end{tabular}
\caption{\label{tab:one}The caption of table one}
\end{table}

\end{document}
share|improve this answer
    
thanks so much the problem was that label not inside the caption box of table or figure, thank you –  mero Sep 11 '12 at 18:22
add comment

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.