0

my document looks like this

    \section{Foo bar}
    \label{sec:foo}
    Lorem ipsum dolor sit amet, consectetur adipisicing elit\index{blahblah}
    \section{laborum}
    As seen in section \ref{sec:foo}, ...

And I want be more precise as the section "foo bar" may be long and I just want to refere to the index entry blahbla.

3
  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jul 21, 2014 at 14:59
  • I don't exactly what you want to do. Do you need compatibility with hyperref? Give a more detailed explanation of what do you want
    – skpblack
    Jul 21, 2014 at 17:04
  • Use the hyperref package if you want to link directly to the referent; this package also gives you access to the command \phantomsection. Or use \pageref (which is compatible with hyperref.
    – jon
    Jul 22, 2014 at 5:39

1 Answer 1

1

Do you want to refer to a page number within the Section Foo Bar? In that case, you can simply create a label wherever you want it to be, and use \pageref:

\section{Foo Bar}
\label{foo:bar}
... [lots of text going on for pages and pages]
\label{relevant:page}
... [lots of text going on for pages and pages]
\section{Foo Baz}
As seen on page \pageref{relevant:page} in Section \ref{foo:bar},...

I don't know of any way to do it other than creating a new label at the appropriate place in the text. LaTeX has no way of knowing which location within a section you want to refer to unless you tell it.

You could also create subsections, paragraphs, or some similar sectioning command and reference that, if it would be more suitable to your purpose.

As others have noted, though, your question is ambiguous. Do you want to refer to just a part of the section, or to an entry in an index, or to the text which creates an entry in your index, or something else? It's quite hard to tell.

1
  • Did this answer your question? Do you need more help? Sep 27, 2014 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.
https://tex.stackexchange.com/questions/192524/is-it-possible-to-make-reference-to-an-index-entry
tex.stackexchange.com
crawl=CC-MAIN-2022-33
225653
application/http; msgtype=response
sha1:NQUCL5ZVHR22EF2MPYTHMX7QZK62KHFP
<urn:uuid:9969ebe3-6e8d-4b07-974b-01619358c9d7>
2022-08-19T13:35:40Z
151.101.129.69
text/html
sha1:NYW4XMRHHHHUGLF4PGDKBPTPFSLLDUCZ
<urn:uuid:7ce7184a-3dd7-44c5-9248-fa05d9bb8dbb>
https://tex.stackexchange.com/questions/192524/is-it-possible-to-make-reference-to-an-index-entry
response
<urn:uuid:4e5cdf57-dee3-4c9a-afff-ec1608e4661a>
isPartOf: CC-MAIN-2022-33
publisher: Common Crawl
description: Wide crawl of the web for August 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-115
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/