1

Как можно сослаться на страницу в латехе? Именно на страницу, а не на метку. Я имею PDF фотографии, которые включены в латех документ, они занимают много страниц. Перед этим документом я хочу создать список, кликая на нужное название чтобы можно было перейти на ту страницы, на которой расположена нужная фотография. Здесь не нужна никакая автоматика. Нужную страницу я укажу сам, вот только как сделать такую ссылку?

Пытаюсь так, но это не то, что нужно.

Google Translate (typos corrected)

How can I link to a page in LaTeX? It is on the page, not on the label. I have PDF photos that are included in the latex document, they occupy many pages. Before this document, I want to create a list by clicking on the desired name so that you can go to the page on which the desired photo is located. No automation is needed here. I will indicate the necessary page myself, but how to make such a link?

\usepackage[unicode, pdftex]{hyperref} % Пакет для подключения ссылок
\includepdf{photo.pdf}
\hypertarget{d6}{4} 
3
  • 8
    Здравствуй, Антон! Please note that the lingua franca on TeX.SX is English, so all posts should be in English. Unfortunately, we can't answer questions in other languages. Would it be possible to translate your question into English?
    – moewe
    Jun 13, 2020 at 7:58
  • 6
    Hrmmm... I think it would have been nice to wait a bit with the downvote. A quick look on Google translate suggests this is a genuine question and not a foreign-language spamming attempt.
    – moewe
    Jun 13, 2020 at 7:59
  • 1
    Does this answer your question? Linking a text to a page (by page number)
    – Marijn
    Jun 14, 2020 at 10:09

1 Answer 1

2

Clicking on the page-number link (so next to the desired name, like the table of contents does):

Use the package option pageanchor to place an anchor at top left of every page, then use command \hyperpage{x}, where x= page number, to make the link.

MWE

\documentclass[12pt]{article}
\usepackage[pageanchor]{hyperref}

\begin{document}
x first page

Go to page \hyperpage{4}

\newpage
y second page
\newpage
z third page
\newpage
abc : go to page \hyperpage{1}

The fourth page.

\end{document}
2
  • unless I misunderstand here, using \hyperpage like that hard-codes the page number. Is there a more robust way, so that when content changes, the link will still point to the (new) page that was the original target?
    – murray
    Jun 13, 2020 at 14:45
  • Спасибо Вам огромное! Это именно то, что я хотел!
    – Антон
    Jun 14, 2020 at 2:58

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