使用 authblk 包的 Last_name 等在运行头中

使用 authblk 包的 Last_name 等在运行头中

在此处输入图片描述我正在使用authblk包在类文档中创建\maketitle多个作者和隶属关系article。如何在运行标题中使用环境中实现“First_Author's_last.name et. al”或“First_Author's_last.name and Second_Author's last.name”(如果有 2 个作者)fancyhdr

我遵循了这里接受的答案如何在标题等中获取作者姓名? 这几乎就是我需要的。但是作者使用的是全名,而不是姓氏。

这是我的 MWE。

\documentclass[a4paper, 12pt]{article}

%****************************************************************
\usepackage[top=1.2in, left=0.8in, right=0.8in, bottom=0.8in]{geometry}
\usepackage{lastpage}
\setcounter{page}{7} % custom first page number

\usepackage{lipsum}
\usepackage{varwidth}

\usepackage[noblocks]{authblk}

\renewcommand*{\Authsep}{, }
\renewcommand*{\Authand}{, }
\renewcommand*{\Authands}{, }
\renewcommand*{\Affilfont}{\normalsize\normalfont}
\renewcommand*{\Authfont}{\bfseries}    % make author names boldface    
\setlength{\affilsep}{2em}   % set the space between author and affiliation

% this part I have adopted from the link post
\makeatletter
\newcommand*{\authors}{%
    \begingroup
    \let\footnote\@gobble% ignore \footnote
    \let\textsuperscript\@gobble% ignore protected \textsuperscript
    \expandafter\let\csname textsuperscript \endcsname\@gobble
    \let\Authfont\relax% do not use a special font
    \def\Authand{and }% separate list of authors by ,
    \ifnum\value{authors}<3 % one ore two authors
    \AB@authlist% show them all
    \else% 3 or more authors
    % show only the first one followed by "et.~al"
    \expandafter\@firstof@authlist\AB@authlist\@nil\ et.~al%
    \fi
    \endgroup
}
\def\@firstof@authlist#1\footnote#2\@nil{#1}% skip all from the first footnote
\makeatother

%===== header declaration=======
\usepackage{fancyhdr}

\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
%\pageref{pagesLTS.0}
\fancyhead[c]{\textit{The Journal 2(3): \pageref{A}--\pageref{LastPage}, 2018}}
\fancyhead[r]{}
\fancyhead[l]{%
        \ifodd\value{page}
        \small\nouppercase\authors
        \else
        \small\nouppercase\authors
        %\small\nouppercase\title% in case put short title in alternate page
        \fi
    }
%****************************************************************

\title{The study on several effective parameters during biomass gasification}

\author[1]{First Author\footnote{First  Author}}
\author[1]{Second Author}
\author[2]{Third Author}
\author[3*]{Harun Rashid}
\affil{School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Some University University, BD}
\affil[2]{Some Other Laboratory, Some Other School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, BD}
\affil[3]{Bangladesh Agricultural University, Mymensingh 2202, Bangladesh}
\date{}  

\begin{document}
\label{A}
\maketitle
\lipsum[1-5]
\end{document}  

相关内容