这是这个帖子。我想参考一下封底。我尝试过的方法失败了:
\documentclass[oneside]{scrbook}
\usepackage{afterpage}
\usepackage{keyfloat}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{lipsum}
\usepackage{xcolor}
% last:
\usepackage{hyperref}
\begin{document}
\begin{titlepage}
\end{titlepage}
\chapter{Intro}
\lipsum[1]
% HERE LIES PROBLEM <-----
Also see \hyperref[backcover]{backcover}. %links to page 1 (wrong)
\autopageref{backcover} %links to page 1 (wrong), prints page 2.
% ------------------------>
\clearpage
% Here starts backcover% <======================================================
\thispagestyle{empty}
%\afterpage{\label{backcover}} %afterpage disables the label
\label{backcover}
\pagecolor{blue}
{
\Large
\color{red}
\textbf{\lipsum[2]}
%
\begin{center}
\keyfig[H]{lw=0.6}{example-image-a}
\noindent\begin{tabularx}{\textwidth}{@{}X >{\raggedleft\arraybackslash}m{0.3\textwidth}@{}}
Who I Am &
\keyfig[H]{w=\hsize, cstar={}}{example-image-b}
\end{tabularx}
\end{center}
% Here ends backcover
\end{document}
答案1
您需要为链接添加锚点。在许多情况下(如果涉及计数器),hyperref 会自动执行此操作。但有时您需要一个明确的\phantomsection
:
\documentclass[oneside]{scrbook}
\usepackage{lipsum,hyperref}
\begin{document}
\chapter{Intro}
\lipsum[1]
Also see \hyperref[backcover]{backcover}.
\autopageref{backcover}
\clearpage
\phantomsection
\label{backcover}
backcover
\end{document}