When loading the hyperref package like:
\usepackage[bookmarks,bookmarksnumbered]{hyperref}
\hypersetup{colorlinks = true,linkcolor = blue,anchorcolor =red,citecolor = blue,filecolor = red,urlcolor = red}
I get the following hyperref warning in my logfile:
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.
But in line 174, it's just an equation:
\begin{equation}\label{eq_DefP}
\mathbf{P} = <\boldsymbol{p}> = <\boldsymbol{\sigma}>
\end{equation}
If I comment this line, it will appear in next equation. Before this line, there are also equations but no warning appears. Can anyone help me solve this warning?
Here I put a small example:
\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}
I think it's the problem of \author[GRs]{author\corref{cor}}
because when I delete the \corref{cor}
it will be normal.
But I need this so how can I do?
\corref
and that macro is not in a form that hyperref can handle it. The affiliation data does not seem to be passed on to the pdf meta data, so you can probably use\texorpdfstring{\corref{cor}}{}
to get rid of the\corref
warning. It makes hyperref ignore the content in a PDF context\author[GRs]{author}\corref{cor}
, i.e. putting the\corref
outside the braces. It works for me with the latest template.