cross-ref in report.sty

cross-ref in report.sty

Post by Mr. P.S. Spenc » Sat, 18 Jun 1994 21:49:03



OK, the chapter and section are labelled as follows:

\chapter{foo}\label{c:foo}
[...]
\section{foobar}\label{s:foobar}

but when I do a \ref{s:foobar} I get the section number but not the
chapter. In other words I get `section' rather than `chapter'.`section'.
Anybody know why, or what to do about it (aside from the obvious:
\ref{c:foo}.\ref{s:foobar})?

Paddy Spencer              | `They've reintroduced the death penalty for
                           | insurance company directors.'

  tel: [44] (0)51 794 3785 | `What do you mean, offence?'
                           |        -"Mostly Harmless", Douglas Adams

 
 
 

1. customized display labels cross-ref'd

Hi folks,

I've been using LaTeX for some time, with great joy and gratitude but
with little understanding of its deep inner workings.  I'm a philosophy
grad student, and it's common practice in philosophy to label and
display some important principle or example or such, like this:

      (M) p, but I don't believe that p.

I've managed to make a little customized display function for this,

----------------------------------------------
\newcommand{\displabel}[1]{(#1)\hfill}
\newenvironment{disp}
  {\begin{list}{}%
    {\renewcommand{\makelabel}{\displabel}%
     \setlength{\leftmargin}{.5in}
     \setlength{\rightmargin}{.5in}
    }%
  }%
  {\end{list}}
----------------------------------------------

which I then use like this

----------------------------------------------
\begin{disp}
\item[M] $p$, but I don't believe that $p$.
\end{disp}
------------------------------------------

Now, I'd like to be able to \label these displayed sentences and
cross-reference them so that the item label is displayed in the
cross-reference, so that '\ref{disp:m}' would show up as 'M' or '(M)'.
How do I do this, please?  Or is there an easier way, a pre-built
package or something, that I could use?

Thanks in advance for your help,
Steve

2. Is InnoDB 64bit clean?

3. no cross-ref generated in latex

4. PALM PDB

5. Index cross-ref

6. Q- Terms - parts, polyphony number of notes, multi-timbral?

7. plainTeX cross-ref question

8. scroll window sideways

9. Question about listing examples with numbering and cross-ref.

10. Lost in cross-ref's, yet Emacs...

11. LaTeX2e: report.cls and report.sty work differently??

12. minor customization for report.sty and article.sty

13. Even distribution of floats in report.sty ?