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.

I'm wondering if the babel package is breaking my labels. I'm calling babel with this:

% Russian
\usepackage[utf8x]{inputenc}
\usepackage[english,russian]{babel}
\addto{\captionsrussian}{%
  \renewcommand{\tablename}{Table}
}

and declaring my labels like this:

\begin{table}[h] \label{tab:declensionofsamyi}

and calling my labels like this:

The full declension of \fbox{\textbf{самый}} is provided in \ref{tab:declensionofsamyi}.

which outputs the following:

The full declension of самый is provided in Table .

As you can see, there isn't a number displayed when I reference a label. It is like this whenever I want to reference a label. However, captions in my tables display numbers correctly.

If I'm doing something wrong or this is a trivial fix, please forgive my ignorance.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

This not the result of babel. You need to put the \caption of your table before using \label, otherwise the referencing is incorrect. The command \caption increases the table counter plus adding a reference point in your document. This is typically done by the single \refstepcounter{table} command. So, your table structure has to look like this:

...
\begin{table}[..]
  % <stuff before caption>
  \caption[<ToC entry>]{<normal entry>}
  \label{<table label>}
  % <stuff after caption>
\end{table}
...
share|improve this answer
    
This seems to have been the issue. All references now act normally, per your suggestion. Thank you for your response! –  user2473 Oct 11 '11 at 1:13

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.