Lets say I have the following document:
\documentclass[a4paper]{article}
\usepackage{authblk}
\usepackage{hyperref}
\begin{document}
\title{Some paper}
\author[1]{First Last}
\author[2]{Second Last}
\affil[1]{First Affil}
\affil[2]{Second Affil}
\maketitle
\end{document}
and I want to include the ORCID of one of the authors. I would like the symbol with an attached hyperlink appearing after one of the authors' names.
How would I go about this?
Note: This may seem like a duplicate of this question, in which the following approaches are suggested:
Use Academicons:
\usepackage{academicons} \usepackage{xcolor} \definecolor{orcidlogocol}{HTML}{A6CE39} \newcommand{\orcid}[1]{ \href{https://orcid.org/#1}{\textcolor{orcidlogocol}{\aiOrcid}} }
This works, but only using xelatex and not plain (pdf)latex.
Using a suitable graphic (say
orcid.pdf
, converted from one of the svgs available:\usepackage{graphicx} \newcommand{\orcid}[1]{ \href{https://orcid.org/#1}{\includegraphics[scale=1]{orcid}} }
Note that there is a more sophisticated version which scales the icon to the height of the surrounding text using the
scalerel
package:\newcommand\orcidicon[1]{ \href{https://orcid.org/#1}{\mbox{\scalerel{\includegraphics{orcid}}{|}}}}
This unfortunately gives me the error
! Use of \\author doesn't match its definition.
Thus, both of the approaches don't really seem to work for me. Is there any way to get this working?