1

Is there any way to cross-reference to sections/subsections via their title? I find myself writing "Please see section 4 for more details", and it gets annoying very soon, especially when I have to change the numbers repeatedly.

I am using lyx, so it would be nice if there's some way of automating some of the steps.

1
  • following your edit, I have added the lyx tag to your question. Hopefully someone who can help with that part will be along shortly. Apr 29, 2011 at 10:39

1 Answer 1

6

Use \label and \ref.

\section{Green's function}
\label{sec:green}

...

\ref{sec:green}.

More details can be found in the Not So Short Introduction to LaTeX2e, which is worth reading.

The cleveref package can save you some typing by automatically preceding the reference with section, theorem, equation, etc. as appropriate.

\documentclass{article}
\usepackage{cleveref}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
\label{thm}
This is a theorem.
\end{theorem}
\cref{thm}
\end{document}

You must log in to answer this question.

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