8

I was using ACM CHI latex template in which sections do not have section numbers. For example:

BACKGROUND

SubBackground

SubSubBackground

Now I want to cross reference, but I don't have a section number to refer to:

\section{Background}
\label{background}

\subsection{SubBackground}
see \ref{background}

BACKGROUND

SubBackground

see

How do I cross-reference here?

3
  • 1
    You said yourself that the sections have no numbers. What number are you expecting to show up? Commented Aug 27, 2012 at 5:17
  • Yeah, but then how do I do cross reference? @StephanLehmke
    – CherryQu
    Commented Aug 27, 2012 at 5:20
  • 1
    It is possible to "hijack" the \label-\ref system using something like \makeatletter\newcommand{\setref}[1]{\gdef\@currentlabel{#1}}\makeatother which allows you to use \section{Background}\setref{Background}\label{background} and then later issue See section~\ref{background}.
    – Werner
    Commented Aug 27, 2012 at 5:25

1 Answer 1

9

One possibility is to use the nameref package like this:

\documentclass{sigchi}

\usepackage{nameref}

\begin{document}

\section{Background}
\label{background}

\subsection{SubBackground}
see section ``\nameref{background}".



\end{document}

output

You must log in to answer this question.

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