diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-13 21:11:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-13 21:11:43 +0000 |
commit | 7dabde23395e7b79d22eda8f33280580922612ca (patch) | |
tree | e6c92c0f8c5db66ae53ad1ddcb818b607c4fe7b0 /Master/texmf-dist/tex/lualatex | |
parent | 2d7b43b9c65926345b1e9114edc86016c75e5d71 (diff) |
emojicite (13may20)
git-svn-id: svn://tug.org/texlive/trunk@55131 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/emojicite/emojicite.sty | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/lualatex/emojicite/emojicite.sty b/Master/texmf-dist/tex/lualatex/emojicite/emojicite.sty index 548d9d6fda2..a281b1a1694 100644 --- a/Master/texmf-dist/tex/lualatex/emojicite/emojicite.sty +++ b/Master/texmf-dist/tex/lualatex/emojicite/emojicite.sty @@ -16,7 +16,7 @@ %% The Current Maintainer of this work is Leon Sixt. %% \NeedsTeXFormat{LaTeX2e}[2020/02/02] -\ProvidesExplPackage{emoji}{2020/04/14}{0.2}{Add Emojis to Citations (in LuaLaTeX)} +\ProvidesExplPackage{emoji}{2020/05/13}{0.3}{Add Emojis to Citations (in LuaLaTeX)} \usepackage{emoji} \usepackage{natbib} @@ -27,7 +27,7 @@ \makeatletter \NewDocumentCommand{\emojicite}{m} { - \mjb_multicitep:n { #1 } + \emojicite_multicitep:n { #1 } } \makeatother @@ -36,61 +36,61 @@ \NewDocumentCommand{\emojicitep}{m} { \NAT@open - \mjb_multicitep:n { #1 } + \emojicite_multicitep:n { #1 } \NAT@close } \makeatother -\seq_new:N \l_mjb_multicite_in_seq -\seq_new:N \l_mjb_multicite_out_seq -\seq_new:N \l_mjb_cite_seq +\seq_new:N \l_emojicite_multicite_in_seq +\seq_new:N \l_emojicite_multicite_out_seq +\seq_new:N \l_emojicite_cite_seq -\cs_new_protected:Npn \mjb_multicitep:n #1 +\cs_new_protected:Npn \emojicite_multicitep:n #1 { - \seq_set_split:Nnn \l_mjb_multicite_in_seq { ; } { #1 } - \seq_clear:N \l_mjb_multicite_out_seq - \seq_map_inline:Nn \l_mjb_multicite_in_seq + \seq_set_split:Nnn \l_emojicite_multicite_in_seq { ; } { #1 } + \seq_clear:N \l_emojicite_multicite_out_seq + \seq_map_inline:Nn \l_emojicite_multicite_in_seq { - \mjb_cite_process:n { ##1 } + \emojicite_cite_process:n { ##1 } } - \seq_use:Nn \l_mjb_multicite_out_seq { ;~ } + \seq_use:Nn \l_emojicite_multicite_out_seq { ;~ } } -\cs_new_protected:Npn \mjb_cite_process:n #1 +\cs_new_protected:Npn \emojicite_cite_process:n #1 { - \seq_set_split:Nnn \l_mjb_cite_seq { , } { #1 } - \int_compare:nTF { \seq_count:N \l_mjb_cite_seq == 1 } + \seq_set_split:Nnn \l_emojicite_cite_seq { , } { #1 } + \int_compare:nTF { \seq_count:N \l_emojicite_cite_seq == 1 } { - \seq_put_right:Nn \l_mjb_multicite_out_seq + \seq_put_right:Nn \l_emojicite_multicite_out_seq { \citeauthor{#1},~\citeyear{#1} } } { - \int_compare:nTF { \seq_count:N \l_mjb_cite_seq == 2 } + \int_compare:nTF { \seq_count:N \l_emojicite_cite_seq == 2 } { - \seq_put_right:Nx \l_mjb_multicite_out_seq + \seq_put_right:Nx \l_emojicite_multicite_out_seq { - \exp_not:N \citeauthor{\seq_item:Nn \l_mjb_cite_seq { 1 }},~ - \exp_not:N \citeyear{\seq_item:Nn \l_mjb_cite_seq { 1 }}~ - \emoji{\seq_item:Nn \l_mjb_cite_seq { 2 }} + \exp_not:N \citeauthor{\seq_item:Nn \l_emojicite_cite_seq { 1 }},~ + \exp_not:N \citeyear{\seq_item:Nn \l_emojicite_cite_seq { 1 }}~ + \emoji{\seq_item:Nn \l_emojicite_cite_seq { 2 }} } } % we can handle up to 2 emojis { - \int_compare:nTF { \seq_count:N \l_mjb_cite_seq == 3 } + \int_compare:nTF { \seq_count:N \l_emojicite_cite_seq == 3 } { - \seq_put_right:Nx \l_mjb_multicite_out_seq + \seq_put_right:Nx \l_emojicite_multicite_out_seq { - \exp_not:N \citeauthor{\seq_item:Nn \l_mjb_cite_seq { 1 }},~ - \exp_not:N \citeyear{\seq_item:Nn \l_mjb_cite_seq { 1 }}~ - \emoji{\seq_item:Nn \l_mjb_cite_seq { 2 }} - \emoji{\seq_item:Nn \l_mjb_cite_seq { 3 }} + \exp_not:N \citeauthor{\seq_item:Nn \l_emojicite_cite_seq { 1 }},~ + \exp_not:N \citeyear{\seq_item:Nn \l_emojicite_cite_seq { 1 }}~ + \emoji{\seq_item:Nn \l_emojicite_cite_seq { 2 }} + \emoji{\seq_item:Nn \l_emojicite_cite_seq { 3 }} } } { - \seq_put_right:Nx \l_mjb_multicite_out_seq + \seq_put_right:Nx \l_emojicite_multicite_out_seq { - \exp_not:N \citeauthor{\seq_item:Nn \l_mjb_cite_seq { 1 }},~ - \exp_not:N \citeyear{\seq_item:Nn \l_mjb_cite_seq { 1 }}~ + \exp_not:N \citeauthor{\seq_item:Nn \l_emojicite_cite_seq { 1 }},~ + \exp_not:N \citeyear{\seq_item:Nn \l_emojicite_cite_seq { 1 }}~ \exp_not:N \textbf{emojicite~does~not~support~more~than~two~emojis}. } } |