%% %% This is file `projlib-author.sty', %% generated with the docstrip utility. %% Copyright (C) 2021-2022 by Jinwen XU %% %% This is part of the ProjLib Toolkit. %% %% This work may be distributed and/or modified under the conditions of the %% LaTeX Project Public License, either version 1.3c of this license or (at %% your option) any later version. The latest version of this license is in %% %% http://www.latex-project.org/lppl.txt %% %% and version 1.3c or later is part of all distributions of LaTeX version %% 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \RequirePackage{l3keys2e} \ProvidesExplPackage {projlib-author} {2022/03/19} {} {Enhanced author information block} \keys_define:nn { projlib-author } { , ams-fashion .bool_set:N = \l__projlib_author_amsfashion_bool , ams-fashion .initial:n = { false } , ams~fashion .bool_set:N = \l__projlib_author_amsfashion_bool , ams fashion .bool_set:N = \l__projlib_author_amsfashion_bool , unknown .code:n = {} } \ProcessKeysOptions { projlib-author } \cs_if_exist:NT \subjclass { \endinput } \tl_new:N \g__projlib_author_font_author_tl \tl_new:N \g__projlib_author_font_institute_tl \tl_new:N \g__projlib_author_font_address_tl \tl_new:N \g__projlib_author_font_curraddr_tl \tl_new:N \g__projlib_author_font_email_tl \tl_gset:Nn \g__projlib_author_font_author_tl { \normalsize \normalfont \scshape } \tl_gset:Nn \g__projlib_author_font_institute_tl { \small \normalfont } \tl_gset:Nn \g__projlib_author_font_address_tl { \small \normalfont \itshape } \tl_gset:Nn \g__projlib_author_font_curraddr_tl { \small \normalfont \itshape } \tl_gset:Nn \g__projlib_author_font_email_tl { \small \normalfont \ttfamily } \dim_new:N \g__projlib_author_length_innersep_dim \dim_new:N \g__projlib_author_length_sep_dim \dim_new:N \g__projlib_author_length_aftersep_dim \dim_set:Nn \g__projlib_author_length_innersep_dim { 0.3 \baselineskip } \dim_set:Nn \g__projlib_author_length_sep_dim { 0.5 \baselineskip } \dim_set:Nn \g__projlib_author_length_aftersep_dim { 0.3 \baselineskip } \bool_new:N \g__projlib_author_affil_already_exist_bool \NewCommandCopy \projlib_author_backup_author:w \author \RenewDocumentCommand \author { m } { \hook_gput_code:nnn { cmd/@author/after } { projlib-author } { \phantom {A} \\[-\baselineskip] \skip_vertical:n { \g__projlib_author_length_sep_dim } { \g__projlib_author_font_author_tl #1 } \bool_set_false:N \g__projlib_author_affil_already_exist_bool \\ \phantom {} } } \cs_new_protected:Nn \projlib_author_affil_generic:nn % #1 = the item % #2 = the text { \hook_gput_code:nnn { cmd/@author/after } { projlib-author } { \phantom {A} \\[-.9\baselineskip] \bool_if:NF \g__projlib_author_affil_already_exist_bool { \skip_vertical:n { \g__projlib_author_length_innersep_dim } } \bool_set_true:N \g__projlib_author_affil_already_exist_bool { \use:c { g__projlib_author_font_ #1 _tl } #2 } \\ \phantom {} } } \ProvideDocumentCommand \institute { m } { \projlib_author_affil_generic:nn { institute } { #1 } } \ProvideDocumentCommand \address { m } { \projlib_author_affil_generic:nn { address } { #1 } } \ProvideDocumentCommand \curraddr { m } { \projlib_author_affil_generic:nn { curraddr } { #1 } } \ProvideDocumentCommand \email { m } { \projlib_author_affil_generic:nn { email } { #1 } } \RequirePackage { regexpatch } \xpatchcmd { \@maketitle } { \begin{tabular}[t]{c} } {} { \xpatchcmd { \@maketitle } { \end{tabular} } {} {} {} } {} \tl_set:cn {@author} {} \hook_gput_code:nnn { cmd/@maketitle/before } { projlib-author } { \hook_gput_code:nnn { cmd/@author/before } { projlib-author } { \skip_vertical:n { - \g__projlib_author_length_sep_dim } } \hook_gput_code:nnn { cmd/@author/after } { projlib-author } { \skip_vertical:n { - \baselineskip } \bool_if:NT \g__projlib_author_affil_already_exist_bool { \skip_vertical:n { \g__projlib_author_length_aftersep_dim } } } } \bool_if:NT \l__projlib_author_amsfashion_bool { \RequirePackage{ projlib-language } \tl_const:Nn \c_projlib_author_dot_tl { . } \tl_new:N \g_projlib_author_keywordsname_style_tl \tl_gset:Nn \g_projlib_author_keywordsname_style_tl { \itshape } \projlib_langauge_define_multilingual_text:Nn \keywordsname { EN = Key~words~and~phrases , FR = Mots~et~phrases~clés , DE = Schlüsselwörter~und~Phrasen , IT = Parole~e~frasi~chiave , PT = Palavras~e~frases~chave , BR = Palavras~e~frases~chave , ES = Palabras~y~frases~clave , CN = 关键词 , TC = 關鍵詞 , JP = キーワード , RU = Ключевые~слова~и~фразы , } \tl_new:N \g__projlib_author_keywords_tl \NewDocumentCommand \keywords { m } { \tl_gset:Nn \g__projlib_author_keywords_tl { #1 } } \tl_new:N \g__projlib_author_dedicatory_tl \NewDocumentCommand \dedicatory { m } { \tl_gset:Nn \g__projlib_author_dedicatory_tl { #1 } } \NewCommandCopy \projlib_author_backup_footnotemark: \footnotemark \tl_gset:Nn \footnotemark {} \NewCommandCopy \projlib_author_backup_thanks:w \thanks \cs_undefine:N \thanks % measure the width of "*" \hbox_set:Nn \l_tmpa_box { * } \dim_const:Nn \c__projlib_author_length_width_of_asterisk_dim { \box_wd:N \l_tmpa_box } \cs_new_nopar:Nn \projlib_author_pre_thanks:n { \projlib_author_backup_thanks:w { \skip_horizontal:n { - \c__projlib_author_length_width_of_asterisk_dim } #1 } } \NewDocumentCommand \thanks { m } { \tl_if_blank:nF { #1 } { \hook_gput_code:nnn { cmd/@title/after } { projlib-author } { \projlib_author_pre_thanks:n { #1 } } } } \hook_gput_code:nnn { begindocument/before } { projlib-author } { \NewCommandCopy \projlib_author_backup_my_author:w \author \RenewDocumentCommand \author { m } { \projlib_author_backup_my_author:w { \RenewCommandCopy \footnotemark \projlib_author_backup_footnotemark: \RenewCommandCopy \thanks \projlib_author_backup_thanks:w #1 \tl_gset:Nn \footnotemark {} } } } \NewCommandCopy \projlib_author_backup_abstract: \abstract \NewCommandCopy \projlib_author_backup_endabstract: \endabstract \cs_undefine:N \abstract \cs_undefine:N \endabstract \bool_new:N \g__projlib_author_already_maketitle_bool \bool_gset_false:N \g__projlib_author_already_maketitle_bool \bool_new:N \g__projlib_author_abstract_before_maketitle_bool \bool_gset_false:N \g__projlib_author_abstract_before_maketitle_bool \msg_redirect_name:nnn { scontents } { unsupported-verbatim } { info } \RequirePackage{ scontents } \newenvsc{abstract}[store-env=projlib-author-abstract,print-env=false] \hook_gput_code:nnn { env/abstract/after } { projlib-author } { \bool_if:NTF \g__projlib_author_already_maketitle_bool { \group_begin: \projlib_author_backup_abstract: \getstored{projlib-author-abstract} \projlib_author_backup_endabstract: \group_end: } { \bool_gset_true:N \g__projlib_author_abstract_before_maketitle_bool } } \hook_gput_code:nnn { begindocument/before } { projlib-author } { \makeatletter \xpatchcmd { \@maketitle } { \@date } { \tl_if_blank:eTF { \@date } { \skip_vertical:n { -2 \baselineskip } } { \@date } \tl_if_blank:eF { \g__projlib_author_dedicatory_tl } { \tl_if_blank:eT { \@date } { \skip_vertical:n { 2 \baselineskip } } \par \skip_vertical:n { -\parskip } \skip_vertical:n { \baselineskip } \textit{ \g__projlib_author_dedicatory_tl } \tl_if_blank:eT { \@date } { \skip_vertical:n { -\parskip } \skip_vertical:n { \dim_eval:n { -1.7 \baselineskip } } } } } {} {} \makeatother \hook_gput_code:nnn { cmd/maketitle/before } { projlib-author } { \tl_if_blank:eF { \g__projlib_author_keywords_tl } { \projlib_author_pre_thanks:n { \group_begin: \g_projlib_author_keywordsname_style_tl \keywordsname \c_projlib_author_dot_tl \group_end: \c_space_tl \g__projlib_author_keywords_tl } } } \hook_gput_code:nnn { cmd/maketitle/after } { projlib-author } { \bool_if:NT \g__projlib_author_abstract_before_maketitle_bool { \group_begin: \projlib_author_backup_abstract: \getstored{projlib-author-abstract} \projlib_author_backup_endabstract: \group_end: } \cs_undefine:N \institute \cs_undefine:N \address \cs_undefine:N \curraddr \cs_undefine:N \email \cs_undefine:N \dedicatory \cs_undefine:N \keywords \bool_gset_true:N \g__projlib_author_already_maketitle_bool } } \tl_new:N \l_projlib_author_subjclassname_tl \tl_new:N \l_projlib_author_subjclass_tl \msg_new:nnn { projlib-author } { unknown-msc-edition } { Unknown~edition~(#1)~of~Mathematics~Subject~Classification;~using~'2020' } \NewDocumentCommand \subjclass { O{2020} m } { \tl_set:Nn \l_projlib_author_subjclass_tl { #2 } \tl_if_exist:cTF { subjclassname_#1 } { \tl_set:Nn \l_projlib_author_subjclassname_tl { \tl_use:c { subjclassname_#1 } } } { \msg_warning:nnn { projlib-author } { unknown-msc-edition } { #1 } \tl_set:Nn \l_projlib_author_subjclassname_tl { \tl_use:c { subjclassname_2020 } } } \projlib_author_pre_thanks:n { \textit{ \l_projlib_author_subjclassname_tl \c_projlib_author_dot_tl } \enspace \l_projlib_author_subjclass_tl . } } \tl_const:cn { subjclassname_1991 } { \textup{1991}~Mathematics~Subject~Classification } \tl_const:cn { subjclassname_2000 } { \textup{2000}~Mathematics~Subject~Classification } \tl_const:cn { subjclassname_2010 } { \textup{2010}~Mathematics~Subject~Classification } \tl_const:cn { subjclassname_2020 } { \textup{2020}~Mathematics~Subject~Classification } } \endinput %% %% End of file `projlib-author.sty'.