texlive[68996] Master/texmf-dist: affilauthor (29nov23)
commits+karl at tug.org
commits+karl at tug.org
Wed Nov 29 22:23:42 CET 2023
Revision: 68996
https://tug.org/svn/texlive?view=revision&revision=68996
Author: karl
Date: 2023-11-29 22:23:41 +0100 (Wed, 29 Nov 2023)
Log Message:
-----------
affilauthor (29nov23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/affilauthor/README.txt
trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-doc.pdf
trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-doc.tex
trunk/Master/texmf-dist/tex/latex/affilauthor/affilauthor.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image1.pdf
trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image2.pdf
trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image3.pdf
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/affilauthor/affiliations_sampleimage.png
trunk/Master/texmf-dist/doc/latex/affilauthor/authorname_sampleimage.png
Modified: trunk/Master/texmf-dist/doc/latex/affilauthor/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/affilauthor/README.txt 2023-11-29 00:43:27 UTC (rev 68995)
+++ trunk/Master/texmf-dist/doc/latex/affilauthor/README.txt 2023-11-29 21:23:41 UTC (rev 68996)
@@ -6,7 +6,7 @@
see http://www.latex-project.org/lppl.txt
----------------------------------------------------
-Customized fields(key-value style) to tag the author and affiliation informations in a structured format. Each field has a specific name within \author and \affil commands similar to bib format. We can customize the styles as per preferences for article.cls class layout. Instead of giving all information(author and affiliation) in single tag, we can split the information in a format of key-value style.
+key-value style fields to tag the author and affiliation informations in a structured format. Each field has a specific name within \author and \affil commands similar to bib format. We can customize the styles as per preferences for article.cls class layout. Instead of giving all information(author and affiliation) in single tag, we can split the information in a format of key-value style.
Sample author tag:
Modified: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-doc.tex 2023-11-29 00:43:27 UTC (rev 68995)
+++ trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-doc.tex 2023-11-29 21:23:41 UTC (rev 68996)
@@ -28,7 +28,7 @@
\section*{Introduction}
-{\tt affilauthor} package provides customized fields(key-value style) to tag the author and affiliation informations in a structured format. Each field has a specific name within \textbackslash author\ and \textbackslash affil\ commands similar to bib format. We can customize the styles as per preferences for {\tt article.cls} class layouts.
+{\tt affilauthor} package provides key-value style fields to tag the author and affiliation informations in a structured format. Each field has a specific name within \textbackslash author\ and \textbackslash affil\ commands similar to bib format. We can customize the styles as per preferences for {\tt article.cls} class layouts.
Instead of giving all information(author and affiliation) in single tag {\textbackslash author\{...\}}, we can split the information in a format of key-value style. It will given control over the elements and later we can do changes/styles by given values. It is very simple package, lot more could be added in further improvements.
@@ -60,14 +60,20 @@
affil={af1,af2,af5}
\end{lstlisting}
-\noindent Sample author group output:\index{sample author output}
+\subsection*{Sample output}
-\noindent\includegraphics[width=\textwidth]{authorname_sampleimage.png}
+\subsubsection*{Affiliation ID as numeric:}\index{sample output 1}
-\noindent Sample Footer note output:\index{sample affiliation output}
+\noindent\centerline{\includegraphics[width=.8\textwidth]{affilauthor-image1.pdf}}
-\noindent\includegraphics[width=\textwidth]{affiliations_sampleimage.png}
+\subsubsection*{Affiliation ID as alphabet:}\index{sample output 2}
+\noindent\centerline{\includegraphics[width=.8\textwidth]{affilauthor-image2.pdf}}
+
+\subsubsection*{Author's note as footnote:}\index{sample output 3}
+
+\noindent\centerline{\includegraphics[width=.8\textwidth]{affilauthor-image3.pdf}}
+
Here, we get appropriate marker to the notes in sequence order and also we can change the format like alphabet or roman.
\section*{Affiliation tagging}
Added: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image1.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image1.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image1.pdf 2023-11-29 00:43:27 UTC (rev 68995)
+++ trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image1.pdf 2023-11-29 21:23:41 UTC (rev 68996)
Property changes on: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image1.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image2.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image2.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image2.pdf 2023-11-29 00:43:27 UTC (rev 68995)
+++ trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image2.pdf 2023-11-29 21:23:41 UTC (rev 68996)
Property changes on: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image2.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image3.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image3.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image3.pdf 2023-11-29 00:43:27 UTC (rev 68995)
+++ trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image3.pdf 2023-11-29 21:23:41 UTC (rev 68996)
Property changes on: trunk/Master/texmf-dist/doc/latex/affilauthor/affilauthor-image3.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/affilauthor/affiliations_sampleimage.png
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/affilauthor/authorname_sampleimage.png
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/latex/affilauthor/affilauthor.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/affilauthor/affilauthor.sty 2023-11-29 00:43:27 UTC (rev 68995)
+++ trunk/Master/texmf-dist/tex/latex/affilauthor/affilauthor.sty 2023-11-29 21:23:41 UTC (rev 68996)
@@ -1,5 +1,17 @@
+%%%%%%----------------------------------------------------
+%%%%%% Package: affilauthor
+%%%%%% Author: Selvam P.
+%%%%%% Mail: selvamittex at gmail.com
+%%%%%% Version: 1.0.1 - 2023/11/29
+%%%%%% Licence: Released under the LaTeX Project Public License v1.3c or later,
+%%%%%% see http://www.latex-project.org/lppl.txt
+%%%%%% Description: key-value style fields to tag the author and affiliation informations in a structured format.
+%%%%%% Each field has a specific name within \author and \affil commands similar to bib format.
+%%%%%% We can customize the styles as per preferences for article.cls class layout.
+%%%%%% Instead of giving all information(author and affiliation) in single tag, we can split the information in a format of key-value style.
+%%%%%%----------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-\ProvidesPackage{affilauthor}[2023/11/05 1.0.0]
+\ProvidesPackage{affilauthor}[2023/11/29 1.0.1 key value style for author names]
\RequirePackage{marvosym}
@@ -47,6 +59,8 @@
\int_new:N \l__affauth_author_cnt_int
\int_new:N \l__affauth_affil_cnt_int
\int_new:N \l__affauth_author_note_int
+\prop_new:N \l__affauth_author_note_prop
+\prop_new:N \l__affauth_author_contact_prop
\skip_new:N \__affauth_before_affil_skip
\skip_new:N \__affauth_before_auth_skip
@@ -87,6 +101,16 @@
urlfont .tl_set:N = \l__affauth_font_url_tl,
phonefont .tl_set:N = \l__affauth_font_phone_tl,
notefont .tl_set:N = \l__affauth_font_note_tl,
+ affilnum .choices:nn = { alpha, Alpha, roman, Roman }
+ {
+ \int_case:nn {\l_keys_choice_int}
+ {
+ {1}{\let\l__affauth_aff:n\@alph}
+ {2}{\let\l__affauth_aff:n\@Alph}
+ {3}{\let\l__affauth_aff:n\@roman}
+ {4}{\let\l__affauth_aff:n\@Roman}
+ }
+ },
notenum .choices:nn = { alpha, fnsym, roman }
{
\int_case:nn {\l_keys_choice_int}
@@ -121,26 +145,36 @@
\int_compare:nNnTF {##1} < {##2}
{\sort_return_same:}{\sort_return_swapped:}
}
- \textsuperscript{\seq_use:Nn \l__affauth_tmpb_seq {,}}
+ \seq_clear:N \l__affauth_tmpa_seq
+ \seq_map_inline:Nn \l__affauth_tmpb_seq
+ {
+ \seq_put_right:Ne \l__affauth_tmpa_seq {\l__affauth_aff:n{##1}}
+ }
+ \__affauth_sups:n{\seq_use:Nn \l__affauth_tmpa_seq {,}}
\group_end:
}
\cs_set:Nn \__affauth_auth_sep:n {}
+\cs_set:Nn \l__affauth_aff:n {#1}
+\cs_set_protected:Nn \__affauth_sups:n {\textsuperscript{#1}}
\cs_set_protected:Nn \__affauth_aff_number:n
{
\int_compare:nNnT {#1} > {1} {\par}
- \textsuperscript{#1}\thinspace
+ \__affauth_sups:n{\l__affauth_aff:n{#1}}\thinspace
}
+
\cs_set_protected:Nn \l__affauth_note:n {\ifcase#1\or *\or
**\or***\or****\or\#\or\#\#\or\#\#\#\or\#\#\#\#\or\$\or\$\$\or\$\$\$\or\$\$\$\$
\or\dag\or\dag\dag\or\dag\dag\dag\or\dag\dag\dag\dag\or\ddag\or\ddag\ddag\or\ddag\ddag\ddag\or\ddag\ddag\ddag\ddag\fi}
-\cs_set_protected:Nn \__affauth_auth_mail:nnnn
+\cs_set_protected:Nn \__affauth_auth_mail:nnnnn
{
\group_begin:
\seq_clear:N \l__affauth_tmpa_seq
+ \seq_clear:N \l__affauth_tmpb_seq
+ \seq_set_split:Nee \l__affauth_tmpb_seq {,} {#5}
\tl_if_empty:nF {#1} {\seq_put_right:Nn \l__affauth_tmpa_seq {{\l__affauth_font_mail_tl\Letter\thinspace\exp_not:n{#1}}}}
\tl_if_empty:nF {#2} {\seq_put_right:Nn \l__affauth_tmpa_seq {{\l__affauth_font_phone_tl\Telefon\thinspace\exp_not:n{#2}}}}
\tl_if_empty:nF {#3} {\seq_put_right:Nn \l__affauth_tmpa_seq {{\l__affauth_font_url_tl\Mundus\thinspace\exp_not:n{#3}}}}
@@ -147,10 +181,7 @@
\seq_if_empty:NF \l__affauth_tmpa_seq
{
\group_begin:
- \int_gincr:N \l__affauth_author_note_int
- \textsuperscript{,\l__affauth_note:n{\l__affauth_author_note_int}}
- \cs_set:Npn \thefootnote {}
- \footnotetext[0]{\leftskip-\parindent\l__affauth_note:n{\l__affauth_author_note_int}\thinspace\seq_use:Nn \l__affauth_tmpa_seq {,\space}}
+ \prop_gput:Nee \l__affauth_author_contact_prop {\seq_item:Nn \l__affauth_tmpb_seq {1}} {\seq_use:Nn \l__affauth_tmpa_seq {,\space}}
\group_end:
}
\tl_if_empty:nF {#4}
@@ -157,9 +188,8 @@
{
\group_begin:
\int_gincr:N \l__affauth_author_note_int
- \textsuperscript{,\l__affauth_note:n{\l__affauth_author_note_int}}
- \cs_set:Npn \thefootnote {}
- \footnotetext[0]{\leftskip-\parindent{\l__affauth_font_note_tl\l__affauth_note:n{\l__affauth_author_note_int}\thinspace\exp_not:n{#4}}}
+ \__affauth_sups:n{,\l__affauth_note:n{\l__affauth_author_note_int}}
+ \prop_gput:Nee \l__affauth_author_note_prop {\seq_item:Nn \l__affauth_tmpb_seq {1}} {\l__affauth_note:n{\int_use:N \l__affauth_author_note_int}\exp_not:n{#4}}
\group_end:
}
\group_end:
@@ -174,7 +204,7 @@
{
\l__affauth_name_tl
\exp_args:NV \__affauth_aff_id:n \l__affauth_auth_affil_id_tl
- \__affauth_auth_mail:nnnn {\l__affauth_auth_mail_tl} {\l__affauth_auth_phone_tl} {\l__affauth_auth_url_tl} {\l__affauth_auth_note_tl}
+ \__affauth_auth_mail:nnnnn {\l__affauth_auth_mail_tl} {\l__affauth_auth_phone_tl} {\l__affauth_auth_url_tl} {\l__affauth_auth_note_tl}{\l__affauth_auth_affil_id_tl}
\exp_args:NV \__affauth_auth_sep:n \l__affauth_author_cnt_int
}
\group_end:
@@ -186,6 +216,7 @@
\int_gincr:N \l__affauth_affil_cnt_int
\keys_set:nn { affil-info } { #1 }
\prop_gput:NVV \l__affauth_author_id_prop \l__affauth_aff_id_tl \l__affauth_affil_cnt_int
+ \prop_gput:NVV \l__affauth_author_id_prop \l__affauth_affil_cnt_int \l__affauth_aff_id_tl
\seq_gput_right:Ne \l__affauth_affil_info_seq
{
\exp_args:NV \__affauth_aff_number:n \l__affauth_affil_cnt_int
@@ -209,15 +240,46 @@
{\end{center}}
\org at maketitle}
}
-
+
+\cs_set_protected:Npn \__show_affiliation:
+ {
+ \group_begin:
+ \int_zero:N \l__affauth_affil_cnt_int
+ \l__affauth_font_affil_tl
+ \seq_map_inline:Nn \l__affauth_affil_info_seq
+ {
+ \int_incr:N \l__affauth_affil_cnt_int
+ ##1\par
+ \prop_get:NVN \l__affauth_author_id_prop \l__affauth_affil_cnt_int \l__affauth_tmpa_tl
+ \prop_if_in:NVT \l__affauth_author_contact_prop \l__affauth_tmpa_tl
+ {
+ (\prop_item:NV \l__affauth_author_contact_prop \l__affauth_tmpa_tl)
+ }
+ \prop_if_in:NVT \l__affauth_author_note_prop \l__affauth_tmpa_tl
+ {
+ \footnotetext[0]{\kern-\parindent\prop_item:NV \l__affauth_author_note_prop \l__affauth_tmpa_tl}
+ }
+ }
+ \group_end:
+ }
+
+\cs_set_protected:Nn \__show_authors:
+ {
+ \group_begin:
+ \l__affauth_font_author_tl
+ \seq_use:Nnnn \l__affauth_author_info_seq {\space and\space}{,\space}{,\space and\space}
+ \group_end:
+ }
+
+
\AtBeginDocument{
\gdef\@author
{
\group_begin:
\vskip\__affauth_before_auth_skip
- {\l__affauth_font_author_tl\seq_use:Nnnn \l__affauth_author_info_seq {\space and\space}{,\space}{,\space and\space}}
- \par\vskip\__affauth_before_affil_skip
- {\l__affauth_font_affil_tl\seq_use:Nn \l__affauth_affil_info_seq {\par}}
+ \__show_authors:\par
+ \vskip\__affauth_before_affil_skip
+ \__show_affiliation:
\group_end:
}
}
More information about the tex-live-commits
mailing list.