xstring을 사용하여 클래스 파일의 authblk에서 수석 작성자의 성을 가져옵니다.

xstring을 사용하여 클래스 파일의 authblk에서 수석 작성자의 성을 가져옵니다.

기사의 첫 번째 저자의 성을 쿼리하여 헤더에 입력하고 싶습니다. 첫 번째 공백과 첫 번째 쉼표 사이의 문자열 부분을 가져오기 위해 \AB@authlist 매크로에서 \StrBetween을 사용했는데, 그 결과 작성자 표시($^1$)로 인해 이상한 출력이 발생했습니다. 명령이 작성자 성만 반환하도록 하는 올바른 마지막 문자는 무엇입니까? 아래에서 문제를 보여주기 위해 .tex MWE를 추가했지만 이를 .cls 파일에서 전달하고 싶습니다.

MWE .cls:

   \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{chkcls}[2020/08/25 v0 class]
\ExecuteOptions{a4paper,10pt}
\ProcessOptions
\LoadClass[10pt,a4paper]{article}
\RequirePackage{amsfonts,amsbsy,authblk,xstring}
\newcommand {\leadauthor} {
\StrBetween[1,1]{\AB@authlist,}{ }{,}\par
}
\endinput

MWE.tex:

\documentclass[10pt]{chkcls}
\usepackage{amsfonts,amsbsy,authblk,xstring}
\begin{document}
\title{A funny title} 
\author[1]{First Author}
  \author[2]{Second author}  
  \author[3]{Third author} 
\affil[1]{[email protected], Germany} 
\affil[2]{[email protected], Spain} 
\affil[3]{[email protected], Norway} 
\maketitle
Some text in the document
\leadauthor
\end{document}

현재 결과는 다음과 같습니다.Author101012.0pt12.0pt1

관련 정보