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 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?

share|improve this question
1  
You said yourself that the sections have no numbers. What number are you expecting to show up? –  Stephan Lehmke Aug 27 '12 at 5:17
    
Yeah, but then how do I do cross reference? @StephanLehmke –  CherryQu Aug 27 '12 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 Aug 27 '12 at 5:25

1 Answer 1

up vote 8 down vote accepted

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

share|improve this answer

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.