1)
After declaring
\usepackage{nameref}
\usepakage{xr-xyper}
Latex gives me warning that "You have requested package 'xr-xyper', but the
packege provides 'xr'.
Is it OK?
2)
When I label some part (section, subsection, ...) and then try to refercne
it by name and by page number, I get more than I need, e.g.
\subsection*{\label{swimming}Swimming in the river}
When I try to cross-reference this subsection and use in some other part of
the book, some thing like:
See section \nameref{swimming} on page #\pageref{swimming},
instead of desired otput:
See section Swimming in the river on page xx, I get following:
See section Swimming in the river on page xxSwimming in the river.
What am I doing wrong and how to get the desired typeset?
Sincerely,
Sasa
No, it's not really OK.
It means that someone has made a derived package from xr and not changed the
identification string in the \ProvidesPackage command. Apart from producing
that warning, this directly contradicts the LPPL conditions under which
xr is distributed.
David
luckily, that "someone" was David himself....
sebastian
Robin hinted that it might have been. Oh well, perhaps I should use up
some L3 funds on lawyers fees and sue myself for damages.
David
Yes -- xr-hyper is a modified version of xr that works with hyperref (and
its family, which indludes nameref). The relevant information line doesn't
appear to have been changed. This is true for some other modified packages
also -- minitoc-href springs to mind.
>
>2)
>When I label some part (section, subsection, ...) and then try to refercne
>it by name and by page number, I get more than I need, e.g.
>\subsection*{\label{swimming}Swimming in the river}
>When I try to cross-reference this subsection and use in some other part of
>the book, some thing like:
>See section \nameref{swimming} on page #\pageref{swimming},
>instead of desired otput:
>See section Swimming in the river on page xx, I get following:
>See section Swimming in the river on page xxSwimming in the river.
I used to get this all the time, too. I'm a bit unsure as to how hyperref
(and nameref etc) actually work, but I think that many of the internal
counters, including the page counter, get redefined to include additional
information that allows nameref etc to work. In other words, I don't think
you are doing anything wrong; the \pageref command doesn't work (hasn't been
redefined to work with nameref). In other, shorter words: it's a bug.
All is not lost (I believe). I think that the latest version of hyperref
has this all sorted out. You could try
\usepackage{hyperref}
instead of nameref -- this automatically loads nameref anyway, and also (I
think) redefines all sorts of stuff to make it work properly. I am using
hyperref version 6.60, and the problem doesn't occur any more.
Aha. I've just looked throught some documentation (dpstory's excellent
"Using LaTeX to Create Quality PDF Documents for the World Wide Web") which
describes the use of hyperref: use the command \pageref*{swimming} -- note
the star. Alternatively, there is a command already written which does
exactly what you want: \Nameref{swimming} (note capital 'N') which expands
to both section name and page number.
Have a look at
http://online.redwoods.cc.ca.us/instruct/darnold/StaffDev/Index.htm
for an excellent series of tips and tutorials on using LaTeX with
hyperlinks -- the document I referenced is available from there also (if you
don't already have it).
I hope this is of some help. I could be entirely wrong in everything I have
written --- I am no expert.
Magnus
I think I see reasonable chance for a settlement out of court and am
willing to try to mediate, for a comparatively small payment as I am
somewhat acquainted with the adversaries in this case.
--
David Kastrup Phone: +49-234-700-5570
Email: d...@neuroinformatik.ruhr-uni-bochum.de Fax: +49-234-709-4209
Institut für Neuroinformatik, Universitätsstr. 150, 44780 Bochum, Germany