Skip to content

Commit

Permalink
Improve paragraph composition for authors and affiliations (line spac…
Browse files Browse the repository at this point in the history
…ing)
  • Loading branch information
kopeckyf committed Feb 27, 2024
1 parent 731eba3 commit bc1d000
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions langsci-affiliations.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ Please report any bugs or feature requests to
% and B. U. Thor\affiliation{University of Mars}
% }
% \end{verbatim}
% results in:\\
% results in:
%
% \noindent\ResolveAffiliations[output authors font=\normalsize]{
% \ResolveAffiliations[output authors font=\normalsize]{
% A. U. Thor\affiliation{University of the Moon; University of Mars}
% and B. U. Thor\affiliation{University of Mars}
% }\\
Expand All @@ -125,6 +125,8 @@ Please report any bugs or feature requests to
% \item[|output in groups =| \meta{boolean}\hfill (initially |true|)] If |true|, authors and affiliations are output in the same line. When |false| each author and affiliation gets its own line. Only available if |output affiliation=true|.
% \item[|output authors font =| \meta{font commands}\hfill (initially |\cs{Large}|)] Stores the font settings for the ouput of authors.
% \item[|output affiliation font =| \meta{font commands}\hfill (initially |\cs{normalsize}|)] Stores the font settings for outputting affiliations.
% \item[|output authors paragraph format =| \meta{layout settings}\hfill (initially |\cs{raggedright}|)] Stores the paragraph settings for the author block. These settings are only applied if |output in groups=true|.
% \item[|output affiliation paragraph format =| \meta{layout settings}\hfill (initially |\cs{raggedright}|)] Stores the paragraph settings for the affiliation block. These settings are only applied if |output in groups=true|.
% \end{description}
%
% \noindent Output separators between authors and affiliations are customisable as well:
Expand Down Expand Up @@ -277,6 +279,10 @@ Please report any bugs or feature requests to
= \l__affiliations_afil_separator_tl,
separator~between~affiliations .initial:n
= {~},
output~authors~paragraph~format .cs_set:Np
= \__affiliations_output_authors_paragraph_format:,
output~authors~paragraph~format .initial:n
= {\raggedright},
output~authors~font .cs_set:Np
= \__affiliations_output_authors_font:,
output~authors~font .initial:n
Expand All @@ -285,6 +291,10 @@ Please report any bugs or feature requests to
= \__affiliations_output_affiliation_font:,
output~affiliation~font .initial:n
= {\normalsize},
output~affiliation~paragraph~format .cs_set:Np
= \__affiliations_output_affiliation_paragraph_format:,
output~affiliation~paragraph~format .initial:n
= {\raggedright},
input~names~separator .tl_set:N
= \l__affiliations_input_names_sep_tl,
input~names~separator .initial:n
Expand Down Expand Up @@ -584,12 +594,21 @@ Please report any bugs or feature requests to
\prop_map_function:NN \l__affiliations_tmpa_prop
\__affiliations_resolve_affiliations:
\group_begin:
\__affiliations_output_authors_font:
\__affiliations_output_authors:
\group_end:\\[0.5ex]
\noindent
\parbox {\linewidth}
{
\__affiliations_output_authors_paragraph_format:
\__affiliations_output_authors_font:
\__affiliations_output_authors:
}
\group_end:\smallskip\\
\group_begin:
\__affiliations_output_affiliation_font:
\__affiliations_output_affiliations:
\parbox {\linewidth}
{
\__affiliations_output_affiliation_paragraph_format:
\__affiliations_output_affiliation_font:
\__affiliations_output_affiliations:
}
\group_end:
}
{
Expand All @@ -604,8 +623,8 @@ Please report any bugs or feature requests to
{
\group_begin:
\exp_not:N \__affiliations_output_authors_font:
\tl_rescan:nn {} {##1}\\[0.5ex]
\group_end:
\tl_rescan:nn {} {##1}
\group_end:\\[0.5ex]
\group_begin:
\exp_not:N \__affiliations_output_affiliation_font:
\tl_rescan:nn {} {##2}
Expand Down Expand Up @@ -645,6 +664,7 @@ Please report any bugs or feature requests to
}
}
}
\noindent
\seq_use:Nnnn \l__affiliations_tmpa_seq
{\l__affiliations_separator_between_two_tl}
{\l__affiliations_separator_between_mult_tl}
Expand Down

0 comments on commit bc1d000

Please sign in to comment.