I am using cross reference for a document prepared in latex. The document gets compiled and all the included figures, tables and equations gets proper cross reference. Unlikely, before I am using `label{a}for the label and for referencing I am using
\ref{a}`.
The problem is there when I need cross reference for the sections and subsections. The file gets compiled with no errors, but the number used as a reference for a particular section is missing, like this:
\section{intro}\label{s1}
Referring to section~\ref{s1}.
After compiling it's showing a message somewhat, like this
Referring to section .
It doesn't displayed the referenced numbers. Do I need to add any package or what? The template is prepared according to the guidelines of Rinton Press Publishers.
EDIT – complete code:
\documentclass[twoside]{article}
\usepackage{jwe}
\begin{document}
\section{Intro}\label{s1}
\noindent I am a boy.
\section{Two}
\noindent Related Works referring to Section~\ref{s1}.
\end{document}
Best Answer
The Journal of Web Engineering's LaTeX code completely redefines the sectional units in such a way that referencing them is not possible using the default
\label
-\ref
system. Here's a view on what the sectioning commands look like:Not only do they use old font declarations, there's no proper
\refstepcounter
to capture\label
s. Instead, the package uses\addtocounter{<cntr>}{1}
. For starters, you'd have to redefine\section
to use\refstepcounter
instead of\addtocounter
. However, since this is for a journal submission, you should really question whether this is intended.Here's a proper redefinition of
\section
included in a minimal example:My thought on this is that the journal probably wants people to do these references manually, which seems awkward.
Contact the journal and tell them they need to change things. Or at least ask them why they do it this way.