패키지 하이퍼참조 경고: PDF 문자열(PDFDocEncoding)에는 토큰이 허용되지 않습니다.

패키지 하이퍼참조 경고: PDF 문자열(PDFDocEncoding)에는 토큰이 허용되지 않습니다.

다음과 같이 hyperref 패키지를 로드할 때:

\usepackage[bookmarks,bookmarksnumbered]{hyperref}
\hypersetup{colorlinks = true,linkcolor = blue,anchorcolor =red,citecolor = blue,filecolor = red,urlcolor = red}

내 로그 파일에 다음과 같은 하이퍼참조 경고가 표시됩니다.

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.

하지만 174번째 줄에서는 방정식일 뿐입니다.

\begin{equation}\label{eq_DefP}
\mathbf{P} = <\boldsymbol{p}> = <\boldsymbol{\sigma}>
\end{equation}

이 줄에 주석을 달면 다음 방정식에 나타날 것입니다. 이 줄 앞에도 방정식이 있지만 경고는 나타나지 않습니다. 누구든지 이 경고를 해결하도록 도와줄 수 있나요?

여기에 작은 예를 들어 보겠습니다.

\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}

\author[GRs]{author\corref{cor}}삭제하면 \corref{cor}정상이 되기 때문에 문제인 것 같습니다 . 그런데 이게 꼭 필요한데 어떻게 해야 하나요?

답변1

문제는 방정식이 아닙니다. 방정식은 문제가 보고되는 지점일 뿐입니다. 첫 번째 페이지 끝에서 하이퍼참조는 제목과 저자를 PDF 정보에 저장한 다음 저자 이름의 \corref에 대해 불평합니다.

가장 좋은 방법은 다음을 사용하여 수동으로 삽입하는 것입니다 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}

답변2

Ulrike와 유사한 수정 사항이 보고되었습니다.이 답변, 다음과 유사한 효과가 있습니다 \texorpdfstring.

\pdfstringdefDisableCommands{%
  \def\corref#1{<#1>}%
}

답변3

daleif의 솔루션은 나에게 매력적으로 작동합니다.

\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}

관련 정보