
Quiero agregar un título de PDF al marcador de PDF usando el paquete Hyperref. Sin embargo, no funciona.
Como se muestra en la imagen, quiero agregar un título encima de la Introducción.
Además, quiero hacer que la "ecuación (1)" sea un vínculo en su conjunto, no solo el rojo 1, como se muestra en la imagen de arriba.
¿Cómo podría lograrlos? Muchas gracias.
Aquí está mi MWE:
\documentclass[a4paper, 10pt]{article}
\usepackage{amsmath}
\usepackage[backend=biber, style=numeric]{biblatex}
\usepackage[bookmarksnumbered, pdftitle={A PDF Title?}]{hyperref}
\hypersetup{colorlinks=true, citecolor=cyan}
\begin{filecontents*}{\jobname.bib}
@article{Azeez2013,
author = {Azeez, O. S. and Isafiade, A. J. and Fraser, D. M.},
title = {Supply-based superstructure synthesis of heat and mass exchange networks},
journal = {Computers \& Chemical Engineering},
volume = {56},
number = {7},
pages = {184--201},
year = {2013}
}\end{filecontents*}
\addbibresource{\jobname}
\title{A PDF title?}
\begin{document}
\maketitle
\section{Introduction}
This is an example for illustrating the use Hyperref package~\cite{Azeez2013}.
\section{Problem Statement}
What is wrong?
\begin{equation}
\label{eq: mass balance}
\sum_{i} m_{in} = \sum_{j} m_{out}
\end{equation}
This equation~\eqref{eq: mass balance} shows the mass balance of the model.
\section*{Acknowledgements}
\addcontentsline{toc}{section}{Acknowledgements}%
Who would you like to thank?
\addcontentsline{toc}{section}{References}
\printbibliography
\end{document}
Respuesta1
El marcador adicional se puede realizar mediante \pdfbookmark
:
\pdfbookmark[1]{My Title}{title}
El enlace que incluye "ecuación" es más complicado porque \autoref
no pone el número entre paréntesis. Manualmente se puede hacer mediante:
\hyperref[eq: mass balance]{equation~(\ref*{eq: mass balance})}
La forma de estrella de \ref
establece una referencia sin vínculo, porque el vínculo ya está establecido por \hyperref
.
Ejemplo completo:
\documentclass[a4paper, 10pt]{article}
\usepackage{amsmath}
\usepackage[bookmarksnumbered, pdftitle={A PDF Title?}]{hyperref}
\hypersetup{colorlinks=true, citecolor=cyan}
\usepackage{bookmark}% faster updated boomkarks
\newcommand*{\myeqref}[2][equation]{%
\hyperref[{#2}]{#1~(\ref*{#2})}%
}
\begin{document}
\pdfbookmark[1]{My Title}{title}% "1" = section level
\section{Introduction}
This is an example for illustrating the use Hyperref package.
\section{Problem Statement}
What is wrong?
\begin{equation}
\label{eq: mass balance}
\sum_{i} m_{in} = \sum_{j} m_{out}
\end{equation}
This \myeqref{eq: mass balance} shows the mass balance of the model.
\section*{Acknowledgements}
\addcontentsline{toc}{section}{Acknowledgements}%
Who would you like to thank?
\end{document}
Marcadores:
Acercando el objetivo del título al título:
El comando de marcador debe introducirse de contrabando \maketitle
. Depende de la clase utilizada, los paquetes, la definición de \maketitle
dónde colocar el marcador para acercar el objetivo al título. En clase article
, el argumento del título comienza en modo vertical, por lo que el marcador se puede colocar aquí:
\title{%
\pdfbookmark[1]{My Title}{title}%
My Title%
}
...
\maketitle
Respuesta2
Esta es bookmark
solo la parte de la pregunta...
Las adiciones a los marcadores se pueden hacer con \pdfbookmark
, por ejemplo.
Se debe dar el nivel relevante, aquí el article
nivel de clase 0
es apropiado, si el marcador del título debe estar alineado con el resto, use nivel 1
entonces. Aquí he hecho la solución sin 0
embargo.
\pdfbookmark[0]{bookmarkentry}{label}
La etiqueta es alguna marca de enlace, como se muestra en, \title{}
por ejemplo.
\documentclass[a4paper, 10pt]{article}
\usepackage{amsmath}
\usepackage[backend=biber, style=numeric]{biblatex}
\newcommand{\mydocumenttitle}{A PDF title}
\usepackage[bookmarksopen=true,bookmarksnumbered, pdftitle={\mydocumenttitle}]{hyperref}
\hypersetup{colorlinks=true, citecolor=cyan}
\begin{filecontents*}{\jobname.bib}
@article{Azeez2013,
author = {Azeez, O. S. and Isafiade, A. J. and Fraser, D. M.},
title = {Supply-based superstructure synthesis of heat and mass exchange networks},
journal = {Computers \& Chemical Engineering},
volume = {56},
number = {7},
pages = {184--201},
year = {2013}
}
\end{filecontents*}
\addbibresource{\jobname}
\author{A. U. Thor}
\title{\hypertarget{title:link}{\mydocumenttitle}}
\begin{document}
\maketitle
\pdfbookmark[0]{A PDF title}{title:link}
\clearpage
\section{Introduction}
This is an example for illustrating the use Hyperref package~\cite{Azeez2013}.
\section{Problem Statement}
What is wrong?
\begin{equation}
\sum_{i} m_{in} = \sum_{j} m_{out}\label{eq: mass balance}
\end{equation}
This equation~\eqref{eq: mass balance} shows the mass balance of the model.
\section*{Acknowledgements}
\addcontentsline{toc}{section}{Acknowledgements}%
Who would you like to thank?
\addcontentsline{toc}{section}{References}
\printbibliography
\end{document}