I was using the amspset document class for generating exam practice problems. I had wanted to add some referencing to the problems so I started a new counter like this (adapted from some Tex Exchange post)

\newcommand{\plb}[1]{\refstepcounter{P}\label{#1} \textbf{P-\ref{#1}.}}

A parallel-wire transmission line is constructed of \#6 AWG copper wire
(diameter $d=0.162$ in., conductivity $\sigma_c=5.8\times 10^7$ S/m) with a
12-inch separation in air. Assuming no leakage between the two wires, find
$R'$, $L'$, $G'$, and $C'$. Assume a working frequency of 1 MHz.

Using Table.~\ref{tab:tlparam} and Fig.~\ref{fig:tlempl}, 
\[ Rs = \sqrt{\pi f \mu_c/\sigma_c} = 2.61\times10^{-4}~ \Omega\]
\[ R' = \frac{2R_s}{\pi d} = 4.04\times10^{-2} ~\Omega\text{/m} \]
\[ L' = \frac{\mu_0}{\pi} \ln{\frac{2D}{d}}=2.0~\mu \text{H/m} \]
\[ C' = \frac{\pi \epsilon}{\displaystyle\ln{\frac{2D}{d}}}=5.56 ~\text{pF/m}
\] $G'=0$ because the problem states that there is no leakage between the two

    \caption{(Fig.2-4 from FAE) A few examples of transmission lines.}

\caption{(Table 2-1 from FAE)Transmission-line parameters $R'$, $L'$, $G'$,
and $C'$ for three types of lines.}
... and more

Now all the figure references stop working, I get "Fig. " instead of "Fig. 1". The table references are alright though. Any idea what the problem could be?

  • 2
    Could you turn your code snippet into a complete MWE? It will help folks who want to try and help.
    – cmhughes
    Feb 6, 2012 at 2:33

1 Answer 1


You are incorrectly using the \centering instruction:

\begin{centering} % <- wrong!
    \caption{(Fig.2-4 from FAE) A few examples of transmission lines.}

There is a \centering command, not a centering environment (even though LaTeX doesn't raise an error and works). Rather write

  \caption{(Fig.2-4 from FAE) A few examples of transmission lines.}

The problem with your code is that the reference from \caption is formed inside a group, so the subsequent \label command cannot "see" it.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .