1

In the following MWE, I want to change the position of affiliation marks (1,2,3,...) to appear just after the author name and everything like the footnote mark and Orchid ID logo should be placed after the affiliation marks.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[blocks]{authblk}

\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{tikz}

\definecolor{lime}{HTML}{A6CE39}
\DeclareRobustCommand{\orcidicon}{%
    \begin{tikzpicture}
    \draw[lime, fill=lime] (0,0) 
    circle [radius=0.16] 
    node[white] {{\fontfamily{qag}\selectfont \tiny ID}};
    \draw[white, fill=white] (-0.0625,0.095) 
    circle [radius=0.007];
    \end{tikzpicture}
    \hspace{-2mm}
}
\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\orcidicon}}

\title{AuthBlk Test}
\author[1]{Author A \footnote{Corresponding author: Author}\orcid{0000-0002-1825-0097}}
\author[2]{Author B\orcid{0000-0002-1825-0097}}
\author[3]{Author C\orcid{0000-0002-1825-0097}}
\affil[1]{Department of Subject1, Example University1, Example Country1 }
\affil[2]{Department of Subject2, Example University2, Example Country2 }
\affil[3]{Department of Subject3, Example University3, Example Country3 }

\begin{document}
\maketitle
\end{document}

This is what I have: AuthBlk Problem LaTeX

This is what I want to achieve: AuthBlk target word

2
  • Your MWE doesn't want to compile for me: "Unknown option block' for package authblk'." and "! Undefined control sequence....\orcid" – Steven B. Segletes Apr 15 at 1:11
  • @StevenB.Segletes Sorry, my bad, there was a typo, I have fixed it and have also added \orcid command code. – aaryan Apr 15 at 2:38
1

The key proved to be looking at how authblk redefined the \maketitle process. In the end, the fix was pretty simple. Redefine \orcid to \rlap an \extragap along with the \href'ed \orcidicon, which would push the icon to the right of the footnote/affiliation marks. But the comma would then lay under the icon.

So, authblk provides macros for the comma typesetting: \Authsep for all authors except the last, and \Authands for the last. Thus, to both of these, I just had to add \extragap and a \phantom of \orcidicon before setting the comma.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[blocks]{authblk}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{tikz}

\definecolor{lime}{HTML}{A6CE39}
\DeclareRobustCommand{\orcidicon}{%
    \begin{tikzpicture}
    \draw[lime, fill=lime] (0,0) 
    circle [radius=0.16] 
    node[white] {{\fontfamily{qag}\selectfont \tiny ID}};
    \draw[white, fill=white] (-0.0625,0.095) 
    circle [radius=0.007];
    \end{tikzpicture}
    \hspace{-2mm}
}
\def\extragap{~\,}
\newcommand{\orcid}[1]{%
  \rlap{\extragap\href{https://orcid.org/#1}{\orcidicon}}}

\title{AuthBlk Test}
\author[1]{Author A\footnote{Corresponding author: Author}\orcid{0000-0002-1825-0097}}
\author[2]{Author B\orcid{0000-0002-1825-0097}}
\author[3]{Author C\orcid{0000-0002-1825-0097}}
\affil[1]{Department of Subject1, Example University1, Example Country1 }
\affil[2]{Department of Subject2, Example University2, Example Country2 }
\affil[3]{Department of Subject3, Example University3, Example Country3 }

\def\Authsep{\phantom{\extragap\orcidicon}, }
\def\Authands{\phantom{\extragap\orcidicon}, and }
\begin{document}
\maketitle
\end{document}

enter image description here

A slightly more visually pleasing comma separation might be achieved with this alternative:

\def\extragap{\kern3pt}
\newcommand{\orcid}[1]{%
  \rlap{\extragap\extragap\href{https://orcid.org/#1}{\orcidicon}}}

enter image description here

2
  • redefining \Authsep and \Authands is indeed a smart way to do this. I like that. I was wondering if there is a way to prioritize the affiliation mark towards the left of all other things e.g. here footnote mark (*) or a mark created by \thanks{} command. – aaryan Apr 15 at 12:28
  • @aaryan As to the footnotemark, if you, starting with my original MWE, define \def\extragap{~~} and then use \author[1]{Author A\rlap{\phantom{\,\extragap\orcidicon}\footnote{Corresponding author: Author}}\orcid{0000-0002-1825-0097}\,}, you achieve the desired output...however, the input is starting to get quite messy. – Steven B. Segletes Apr 15 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.