.png)
Al cargar el paquete hyperref como:
\usepackage[bookmarks,bookmarksnumbered]{hyperref}
\hypersetup{colorlinks = true,linkcolor = blue,anchorcolor =red,citecolor = blue,filecolor = red,urlcolor = red}
Recibo la siguiente advertencia de hiperreferencia en mi archivo de registro:
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `\<def>-command' on input line 174.
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `\cnotenum' on input line 174.
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `\<def>-command' on input line 174.
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `\@corref' on input line 174.
Pero en la línea 174, es sólo una ecuación:
\begin{equation}\label{eq_DefP}
\mathbf{P} = <\boldsymbol{p}> = <\boldsymbol{\sigma}>
\end{equation}
Si comento esta línea, aparecerá en la siguiente ecuación. Antes de esta línea, también hay ecuaciones pero no aparece ninguna advertencia. ¿Alguien puede ayudarme a resolver esta advertencia?
Aquí pongo un pequeño ejemplo:
\documentclass[final,3p,times,authoryear]{elsarticle}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage[bookmarks,bookmarksnumbered]{hyperref}
\hypersetup{colorlinks = true,linkcolor = blue,anchorcolor =red,citecolor = blue,filecolor = red,urlcolor = red}
\journal{Elesvier}
\begin{document}
\begin{frontmatter}
\title{Title}
\author[GRs]{author\corref{cor}}
\cortext[cor]{Corresponding author.}
\end{frontmatter}
\begin{equation}\label{eq_DefP}
\mathbf{P} = <\boldsymbol{\sigma}>
\end{equation}
\end{document}
Creo que es el problema \author[GRs]{author\corref{cor}}
porque cuando lo borre \corref{cor}
será normal. Pero necesito esto, ¿cómo puedo hacerlo?
Respuesta1
El problema no es la ecuación; ese es sólo el lugar donde se informa el problema. Al final de la primera página, Hyperref almacena el título y el autor en la información del pdf y luego se queja del \corref en el nombre del autor.
Lo mejor es insertarlo manualmente con pdfauthor
:
\documentclass[final,3p,times,authoryear]{elsarticle}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage[bookmarks,bookmarksnumbered]{hyperref}
\hypersetup{colorlinks = true,linkcolor = blue,anchorcolor =red,citecolor = blue,filecolor = red,urlcolor = red,
pdfauthor=author}
\journal{Elesvier}
\begin{document}
\begin{frontmatter}
\title{Title}
\author[GRs]{author\corref{cor}}
\cortext[cor]{Corresponding author.}
\end{frontmatter}
\begin{equation}\label{eq_DefP}
\mathbf{P} = <\boldsymbol{\sigma}>
\end{equation}
\end{document}
Respuesta2
Una solución similar a la de Ulrike se informa enesta respuesta, con un efecto similar a \texorpdfstring
:
\pdfstringdefDisableCommands{%
\def\corref#1{<#1>}%
}
Respuesta3
La solución de daleif funciona de maravilla para mí:
\author[add1]{Author1\texorpdfstring{\corref{cor1}}{}}
\ead{[email protected]} % e-mail of the author
\cortext[cor1]{Corresponding author}
\address[add1]{Institute for Study of Things}