0

I want the daggers and the star before each author's name and not after, as it is displayed on running this code. The dagger and the star signify each author's affiliation.

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}

\usepackage{authblk}

\usepackage{hyperref}
%
\newcommand*{\email}[1]{%
    \normalsize\href{mailto:#1}{#1}\par
}
\title{\textbf{{\Large My Tittle for the Article }}}% to see the effect

\author[$\dagger$]{\textbf{\large Author A}}
\author[$\star$]{\textbf{\large Author B}}
\author[$\dagger$]{\textbf{\large Author C}}
\author[$\dagger$]{\textbf{\large Author D}}

\affil[$\dagger$]{\textbf{\normalsize University of Latex}}
\affil[$\star$]{\textbf{\normalsize University of R \vspace{-10ex}}}
\begin{document}
    \maketitle
\end{document}

What I have

0

1 Answer 1

1

By redefining the package command \author

%\protect\Authfont#2\AB@authnote{\AB@note}}%<---- this line

by \AB@authnote{\AB@note}\protect\Authfont#2}%

    \documentclass{article}
    \usepackage{authblk}
    \makeatletter
    \renewcommand\author[2][]%
        {\ifnewaffil\addtocounter{affil}{1}%
        \edef\AB@thenote{\arabic{affil}}\fi
        \if\relax#1\relax\def\AB@note{\AB@thenote}\else\def\AB@note{#1}%
            \setcounter{Maxaffil}{0}\fi
        \ifnum\value{authors}>1\relax
        \@namedef{@sep\number\c@authors}{\Authsep}\fi
        \addtocounter{authors}{1}%
        \begingroup
            \let\protect\@unexpandable@protect \let\and\AB@pand
            \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}%
            \@temptokena=\expandafter{\AB@authors}%
            {\def\\{\protect\\[\@affilsep]\protect\Affilfont
                \protect\AB@resetsep}%
                \xdef\AB@author{\AB@blk@and#2}%
        \ifnewaffil\gdef\AB@las{}\gdef\AB@lasx{\protect\Authand}\gdef\AB@as{}%
            \xdef\AB@authors{\the\@temptokena\AB@blk@and}%
        \else
            \xdef\AB@authors{\the\@temptokena\AB@as\AB@au@str}%
            \global\let\AB@las\AB@lasx\gdef\AB@lasx{\protect\Authands}%
            \gdef\AB@as{\Authsep}%
        \fi
        \gdef\AB@au@str{#2}}%
            \@temptokena=\expandafter{\AB@authlist}%
            \let\\=\authorcr
            \xdef\AB@authlist{\the\@temptokena
            \protect\@nameuse{@sep\number\c@authors}%
            %    \protect\Authfont#2\AB@authnote{\AB@note}}%<---- this line
            \AB@authnote{\AB@note}\protect\Authfont#2}%
        \endgroup
        \ifnum\value{authors}>2\relax
        \@namedef{@sep\number\c@authors}{\Authands}\fi
        \newaffilfalse
    }
    \makeatother          
    \title{\textbf{{\Large My Tittle for the Article }}}% to see the effect

    \author[$\dagger$]{\textbf{\large Author A}}
    \author[$\star$]{\textbf{\large Author B}}
    \author[$\dagger$]{\textbf{\large Author C}}
    \author[$\dagger$]{\textbf{\large Author D}}

    \affil[$\dagger$]{\textbf{\normalsize University of Latex}}
    \affil[$\star$]{\textbf{\normalsize University of R }}
    % \affil[$\star$]{\textbf{\normalsize University of R \vspace{-10ex}}}% ?
    \begin{document}
        \maketitle
    \end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .