diff --git a/README.md b/README.md index 3ad5950..bd491e3 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,11 @@ By default, xelatex-emoji expects the images to be in `images/utf8code.png`. You ```tex \newcommand{\xelatexemojipath}[1]{mycustompath/{#1}.pdf} ``` + +## Development + +To generate the flag codes: + +``` +ruby bin/generate_flags.rb > xelatexemoji-flags.sty +``` diff --git a/bin/generate_flags.rb b/bin/generate_flags.rb new file mode 100644 index 0000000..a9a4d46 --- /dev/null +++ b/bin/generate_flags.rb @@ -0,0 +1,71 @@ +letters = [ + ['A', '🇦', '1f1e6'], + ['B', '🇧', '1f1e7'], + ['C', '🇨', '1f1e8'], + ['D', '🇩', '1f1e9'], + ['E', '🇪', '1f1ea'], + ['F', '🇫', '1f1eb'], + ['G', '🇬', '1f1ec'], + ['H', '🇭', '1f1ed'], + ['I', '🇮', '1f1ee'], + ['J', '🇯', '1f1ef'], + ['K', '🇰', '1f1f0'], + ['L', '🇱', '1f1f1'], + ['M', '🇲', '1f1f2'], + ['N', '🇳', '1f1f3'], + ['O', '🇴', '1f1f4'], + ['P', '🇵', '1f1f5'], + ['Q', '🇶', '1f1f6'], + ['R', '🇷', '1f1f7'], + ['S', '🇸', '1f1f8'], + ['T', '🇹', '1f1f9'], + # ['U', '🇺', ''], + ['V', '🇻', '1f1fb'], + ['W', '🇼', '1f1fc'], + ['X', '🇽', '1f1fd'], + ['Y', '🇾', '1f1fe'], + # ['Z', '🇿', ''], +] + +output = ["\\ExplSyntaxOn"] + +letters.each do |letter_data| + output << "\\newunicodechar{#{letter_data[1]}}{ \\flags_print:n {#{letter_data[0]}} }" +end + +output << %( +{ +\\cs_new:Nn \\flags_print:n + { + \\flags_print_unicode:nn { #1 } + } +} +\\cs_new_protected:Nn \\flags_print_unicode:nn + { + \\use:c { flags_#1:n } { #2 } + } +) + +letters.each do |letter_data| + partial_output = [] + partial_output << %( +\\cs_new_protected:Nn \\flags_#{letter_data[0]}:n + { + \\str_case:nnF {#1} + { + ) + letters.each do |sub_letter_data| + partial_output << "{#{sub_letter_data[1]}}{\\xelatexemoji{#{letter_data[2]}-#{sub_letter_data[2]}}}" + end + partial_output + partial_output << %( + } + {} + } + ) + output << partial_output.join("\n") +end + +output << "\\ExplSyntaxOff" + +puts output.join("\n") diff --git a/xelatexemoji-flags.sty b/xelatexemoji-flags.sty new file mode 100644 index 0000000..3e2b8ed --- /dev/null +++ b/xelatexemoji-flags.sty @@ -0,0 +1,878 @@ +\ExplSyntaxOn +\newunicodechar{🇦}{ \flags_print:n {A} } +\newunicodechar{🇧}{ \flags_print:n {B} } +\newunicodechar{🇨}{ \flags_print:n {C} } +\newunicodechar{🇩}{ \flags_print:n {D} } +\newunicodechar{🇪}{ \flags_print:n {E} } +\newunicodechar{🇫}{ \flags_print:n {F} } +\newunicodechar{🇬}{ \flags_print:n {G} } +\newunicodechar{🇭}{ \flags_print:n {H} } +\newunicodechar{🇮}{ \flags_print:n {I} } +\newunicodechar{🇯}{ \flags_print:n {J} } +\newunicodechar{🇰}{ \flags_print:n {K} } +\newunicodechar{🇱}{ \flags_print:n {L} } +\newunicodechar{🇲}{ \flags_print:n {M} } +\newunicodechar{🇳}{ \flags_print:n {N} } +\newunicodechar{🇴}{ \flags_print:n {O} } +\newunicodechar{🇵}{ \flags_print:n {P} } +\newunicodechar{🇶}{ \flags_print:n {Q} } +\newunicodechar{🇷}{ \flags_print:n {R} } +\newunicodechar{🇸}{ \flags_print:n {S} } +\newunicodechar{🇹}{ \flags_print:n {T} } +\newunicodechar{🇻}{ \flags_print:n {V} } +\newunicodechar{🇼}{ \flags_print:n {W} } +\newunicodechar{🇽}{ \flags_print:n {X} } +\newunicodechar{🇾}{ \flags_print:n {Y} } + +{ +\cs_new:Nn \flags_print:n + { + \flags_print_unicode:nn { #1 } + } +} +\cs_new_protected:Nn \flags_print_unicode:nn + { + \use:c { flags_#1:n } { #2 } + } + + +\cs_new_protected:Nn \flags_A:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1e6-1f1e6}} +{🇧}{\xelatexemoji{1f1e6-1f1e7}} +{🇨}{\xelatexemoji{1f1e6-1f1e8}} +{🇩}{\xelatexemoji{1f1e6-1f1e9}} +{🇪}{\xelatexemoji{1f1e6-1f1ea}} +{🇫}{\xelatexemoji{1f1e6-1f1eb}} +{🇬}{\xelatexemoji{1f1e6-1f1ec}} +{🇭}{\xelatexemoji{1f1e6-1f1ed}} +{🇮}{\xelatexemoji{1f1e6-1f1ee}} +{🇯}{\xelatexemoji{1f1e6-1f1ef}} +{🇰}{\xelatexemoji{1f1e6-1f1f0}} +{🇱}{\xelatexemoji{1f1e6-1f1f1}} +{🇲}{\xelatexemoji{1f1e6-1f1f2}} +{🇳}{\xelatexemoji{1f1e6-1f1f3}} +{🇴}{\xelatexemoji{1f1e6-1f1f4}} +{🇵}{\xelatexemoji{1f1e6-1f1f5}} +{🇶}{\xelatexemoji{1f1e6-1f1f6}} +{🇷}{\xelatexemoji{1f1e6-1f1f7}} +{🇸}{\xelatexemoji{1f1e6-1f1f8}} +{🇹}{\xelatexemoji{1f1e6-1f1f9}} +{🇻}{\xelatexemoji{1f1e6-1f1fb}} +{🇼}{\xelatexemoji{1f1e6-1f1fc}} +{🇽}{\xelatexemoji{1f1e6-1f1fd}} +{🇾}{\xelatexemoji{1f1e6-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_B:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1e7-1f1e6}} +{🇧}{\xelatexemoji{1f1e7-1f1e7}} +{🇨}{\xelatexemoji{1f1e7-1f1e8}} +{🇩}{\xelatexemoji{1f1e7-1f1e9}} +{🇪}{\xelatexemoji{1f1e7-1f1ea}} +{🇫}{\xelatexemoji{1f1e7-1f1eb}} +{🇬}{\xelatexemoji{1f1e7-1f1ec}} +{🇭}{\xelatexemoji{1f1e7-1f1ed}} +{🇮}{\xelatexemoji{1f1e7-1f1ee}} +{🇯}{\xelatexemoji{1f1e7-1f1ef}} +{🇰}{\xelatexemoji{1f1e7-1f1f0}} +{🇱}{\xelatexemoji{1f1e7-1f1f1}} +{🇲}{\xelatexemoji{1f1e7-1f1f2}} +{🇳}{\xelatexemoji{1f1e7-1f1f3}} +{🇴}{\xelatexemoji{1f1e7-1f1f4}} +{🇵}{\xelatexemoji{1f1e7-1f1f5}} +{🇶}{\xelatexemoji{1f1e7-1f1f6}} +{🇷}{\xelatexemoji{1f1e7-1f1f7}} +{🇸}{\xelatexemoji{1f1e7-1f1f8}} +{🇹}{\xelatexemoji{1f1e7-1f1f9}} +{🇻}{\xelatexemoji{1f1e7-1f1fb}} +{🇼}{\xelatexemoji{1f1e7-1f1fc}} +{🇽}{\xelatexemoji{1f1e7-1f1fd}} +{🇾}{\xelatexemoji{1f1e7-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_C:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1e8-1f1e6}} +{🇧}{\xelatexemoji{1f1e8-1f1e7}} +{🇨}{\xelatexemoji{1f1e8-1f1e8}} +{🇩}{\xelatexemoji{1f1e8-1f1e9}} +{🇪}{\xelatexemoji{1f1e8-1f1ea}} +{🇫}{\xelatexemoji{1f1e8-1f1eb}} +{🇬}{\xelatexemoji{1f1e8-1f1ec}} +{🇭}{\xelatexemoji{1f1e8-1f1ed}} +{🇮}{\xelatexemoji{1f1e8-1f1ee}} +{🇯}{\xelatexemoji{1f1e8-1f1ef}} +{🇰}{\xelatexemoji{1f1e8-1f1f0}} +{🇱}{\xelatexemoji{1f1e8-1f1f1}} +{🇲}{\xelatexemoji{1f1e8-1f1f2}} +{🇳}{\xelatexemoji{1f1e8-1f1f3}} +{🇴}{\xelatexemoji{1f1e8-1f1f4}} +{🇵}{\xelatexemoji{1f1e8-1f1f5}} +{🇶}{\xelatexemoji{1f1e8-1f1f6}} +{🇷}{\xelatexemoji{1f1e8-1f1f7}} +{🇸}{\xelatexemoji{1f1e8-1f1f8}} +{🇹}{\xelatexemoji{1f1e8-1f1f9}} +{🇻}{\xelatexemoji{1f1e8-1f1fb}} +{🇼}{\xelatexemoji{1f1e8-1f1fc}} +{🇽}{\xelatexemoji{1f1e8-1f1fd}} +{🇾}{\xelatexemoji{1f1e8-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_D:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1e9-1f1e6}} +{🇧}{\xelatexemoji{1f1e9-1f1e7}} +{🇨}{\xelatexemoji{1f1e9-1f1e8}} +{🇩}{\xelatexemoji{1f1e9-1f1e9}} +{🇪}{\xelatexemoji{1f1e9-1f1ea}} +{🇫}{\xelatexemoji{1f1e9-1f1eb}} +{🇬}{\xelatexemoji{1f1e9-1f1ec}} +{🇭}{\xelatexemoji{1f1e9-1f1ed}} +{🇮}{\xelatexemoji{1f1e9-1f1ee}} +{🇯}{\xelatexemoji{1f1e9-1f1ef}} +{🇰}{\xelatexemoji{1f1e9-1f1f0}} +{🇱}{\xelatexemoji{1f1e9-1f1f1}} +{🇲}{\xelatexemoji{1f1e9-1f1f2}} +{🇳}{\xelatexemoji{1f1e9-1f1f3}} +{🇴}{\xelatexemoji{1f1e9-1f1f4}} +{🇵}{\xelatexemoji{1f1e9-1f1f5}} +{🇶}{\xelatexemoji{1f1e9-1f1f6}} +{🇷}{\xelatexemoji{1f1e9-1f1f7}} +{🇸}{\xelatexemoji{1f1e9-1f1f8}} +{🇹}{\xelatexemoji{1f1e9-1f1f9}} +{🇻}{\xelatexemoji{1f1e9-1f1fb}} +{🇼}{\xelatexemoji{1f1e9-1f1fc}} +{🇽}{\xelatexemoji{1f1e9-1f1fd}} +{🇾}{\xelatexemoji{1f1e9-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_E:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1ea-1f1e6}} +{🇧}{\xelatexemoji{1f1ea-1f1e7}} +{🇨}{\xelatexemoji{1f1ea-1f1e8}} +{🇩}{\xelatexemoji{1f1ea-1f1e9}} +{🇪}{\xelatexemoji{1f1ea-1f1ea}} +{🇫}{\xelatexemoji{1f1ea-1f1eb}} +{🇬}{\xelatexemoji{1f1ea-1f1ec}} +{🇭}{\xelatexemoji{1f1ea-1f1ed}} +{🇮}{\xelatexemoji{1f1ea-1f1ee}} +{🇯}{\xelatexemoji{1f1ea-1f1ef}} +{🇰}{\xelatexemoji{1f1ea-1f1f0}} +{🇱}{\xelatexemoji{1f1ea-1f1f1}} +{🇲}{\xelatexemoji{1f1ea-1f1f2}} +{🇳}{\xelatexemoji{1f1ea-1f1f3}} +{🇴}{\xelatexemoji{1f1ea-1f1f4}} +{🇵}{\xelatexemoji{1f1ea-1f1f5}} +{🇶}{\xelatexemoji{1f1ea-1f1f6}} +{🇷}{\xelatexemoji{1f1ea-1f1f7}} +{🇸}{\xelatexemoji{1f1ea-1f1f8}} +{🇹}{\xelatexemoji{1f1ea-1f1f9}} +{🇻}{\xelatexemoji{1f1ea-1f1fb}} +{🇼}{\xelatexemoji{1f1ea-1f1fc}} +{🇽}{\xelatexemoji{1f1ea-1f1fd}} +{🇾}{\xelatexemoji{1f1ea-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_F:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1eb-1f1e6}} +{🇧}{\xelatexemoji{1f1eb-1f1e7}} +{🇨}{\xelatexemoji{1f1eb-1f1e8}} +{🇩}{\xelatexemoji{1f1eb-1f1e9}} +{🇪}{\xelatexemoji{1f1eb-1f1ea}} +{🇫}{\xelatexemoji{1f1eb-1f1eb}} +{🇬}{\xelatexemoji{1f1eb-1f1ec}} +{🇭}{\xelatexemoji{1f1eb-1f1ed}} +{🇮}{\xelatexemoji{1f1eb-1f1ee}} +{🇯}{\xelatexemoji{1f1eb-1f1ef}} +{🇰}{\xelatexemoji{1f1eb-1f1f0}} +{🇱}{\xelatexemoji{1f1eb-1f1f1}} +{🇲}{\xelatexemoji{1f1eb-1f1f2}} +{🇳}{\xelatexemoji{1f1eb-1f1f3}} +{🇴}{\xelatexemoji{1f1eb-1f1f4}} +{🇵}{\xelatexemoji{1f1eb-1f1f5}} +{🇶}{\xelatexemoji{1f1eb-1f1f6}} +{🇷}{\xelatexemoji{1f1eb-1f1f7}} +{🇸}{\xelatexemoji{1f1eb-1f1f8}} +{🇹}{\xelatexemoji{1f1eb-1f1f9}} +{🇻}{\xelatexemoji{1f1eb-1f1fb}} +{🇼}{\xelatexemoji{1f1eb-1f1fc}} +{🇽}{\xelatexemoji{1f1eb-1f1fd}} +{🇾}{\xelatexemoji{1f1eb-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_G:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1ec-1f1e6}} +{🇧}{\xelatexemoji{1f1ec-1f1e7}} +{🇨}{\xelatexemoji{1f1ec-1f1e8}} +{🇩}{\xelatexemoji{1f1ec-1f1e9}} +{🇪}{\xelatexemoji{1f1ec-1f1ea}} +{🇫}{\xelatexemoji{1f1ec-1f1eb}} +{🇬}{\xelatexemoji{1f1ec-1f1ec}} +{🇭}{\xelatexemoji{1f1ec-1f1ed}} +{🇮}{\xelatexemoji{1f1ec-1f1ee}} +{🇯}{\xelatexemoji{1f1ec-1f1ef}} +{🇰}{\xelatexemoji{1f1ec-1f1f0}} +{🇱}{\xelatexemoji{1f1ec-1f1f1}} +{🇲}{\xelatexemoji{1f1ec-1f1f2}} +{🇳}{\xelatexemoji{1f1ec-1f1f3}} +{🇴}{\xelatexemoji{1f1ec-1f1f4}} +{🇵}{\xelatexemoji{1f1ec-1f1f5}} +{🇶}{\xelatexemoji{1f1ec-1f1f6}} +{🇷}{\xelatexemoji{1f1ec-1f1f7}} +{🇸}{\xelatexemoji{1f1ec-1f1f8}} +{🇹}{\xelatexemoji{1f1ec-1f1f9}} +{🇻}{\xelatexemoji{1f1ec-1f1fb}} +{🇼}{\xelatexemoji{1f1ec-1f1fc}} +{🇽}{\xelatexemoji{1f1ec-1f1fd}} +{🇾}{\xelatexemoji{1f1ec-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_H:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1ed-1f1e6}} +{🇧}{\xelatexemoji{1f1ed-1f1e7}} +{🇨}{\xelatexemoji{1f1ed-1f1e8}} +{🇩}{\xelatexemoji{1f1ed-1f1e9}} +{🇪}{\xelatexemoji{1f1ed-1f1ea}} +{🇫}{\xelatexemoji{1f1ed-1f1eb}} +{🇬}{\xelatexemoji{1f1ed-1f1ec}} +{🇭}{\xelatexemoji{1f1ed-1f1ed}} +{🇮}{\xelatexemoji{1f1ed-1f1ee}} +{🇯}{\xelatexemoji{1f1ed-1f1ef}} +{🇰}{\xelatexemoji{1f1ed-1f1f0}} +{🇱}{\xelatexemoji{1f1ed-1f1f1}} +{🇲}{\xelatexemoji{1f1ed-1f1f2}} +{🇳}{\xelatexemoji{1f1ed-1f1f3}} +{🇴}{\xelatexemoji{1f1ed-1f1f4}} +{🇵}{\xelatexemoji{1f1ed-1f1f5}} +{🇶}{\xelatexemoji{1f1ed-1f1f6}} +{🇷}{\xelatexemoji{1f1ed-1f1f7}} +{🇸}{\xelatexemoji{1f1ed-1f1f8}} +{🇹}{\xelatexemoji{1f1ed-1f1f9}} +{🇻}{\xelatexemoji{1f1ed-1f1fb}} +{🇼}{\xelatexemoji{1f1ed-1f1fc}} +{🇽}{\xelatexemoji{1f1ed-1f1fd}} +{🇾}{\xelatexemoji{1f1ed-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_I:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1ee-1f1e6}} +{🇧}{\xelatexemoji{1f1ee-1f1e7}} +{🇨}{\xelatexemoji{1f1ee-1f1e8}} +{🇩}{\xelatexemoji{1f1ee-1f1e9}} +{🇪}{\xelatexemoji{1f1ee-1f1ea}} +{🇫}{\xelatexemoji{1f1ee-1f1eb}} +{🇬}{\xelatexemoji{1f1ee-1f1ec}} +{🇭}{\xelatexemoji{1f1ee-1f1ed}} +{🇮}{\xelatexemoji{1f1ee-1f1ee}} +{🇯}{\xelatexemoji{1f1ee-1f1ef}} +{🇰}{\xelatexemoji{1f1ee-1f1f0}} +{🇱}{\xelatexemoji{1f1ee-1f1f1}} +{🇲}{\xelatexemoji{1f1ee-1f1f2}} +{🇳}{\xelatexemoji{1f1ee-1f1f3}} +{🇴}{\xelatexemoji{1f1ee-1f1f4}} +{🇵}{\xelatexemoji{1f1ee-1f1f5}} +{🇶}{\xelatexemoji{1f1ee-1f1f6}} +{🇷}{\xelatexemoji{1f1ee-1f1f7}} +{🇸}{\xelatexemoji{1f1ee-1f1f8}} +{🇹}{\xelatexemoji{1f1ee-1f1f9}} +{🇻}{\xelatexemoji{1f1ee-1f1fb}} +{🇼}{\xelatexemoji{1f1ee-1f1fc}} +{🇽}{\xelatexemoji{1f1ee-1f1fd}} +{🇾}{\xelatexemoji{1f1ee-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_J:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1ef-1f1e6}} +{🇧}{\xelatexemoji{1f1ef-1f1e7}} +{🇨}{\xelatexemoji{1f1ef-1f1e8}} +{🇩}{\xelatexemoji{1f1ef-1f1e9}} +{🇪}{\xelatexemoji{1f1ef-1f1ea}} +{🇫}{\xelatexemoji{1f1ef-1f1eb}} +{🇬}{\xelatexemoji{1f1ef-1f1ec}} +{🇭}{\xelatexemoji{1f1ef-1f1ed}} +{🇮}{\xelatexemoji{1f1ef-1f1ee}} +{🇯}{\xelatexemoji{1f1ef-1f1ef}} +{🇰}{\xelatexemoji{1f1ef-1f1f0}} +{🇱}{\xelatexemoji{1f1ef-1f1f1}} +{🇲}{\xelatexemoji{1f1ef-1f1f2}} +{🇳}{\xelatexemoji{1f1ef-1f1f3}} +{🇴}{\xelatexemoji{1f1ef-1f1f4}} +{🇵}{\xelatexemoji{1f1ef-1f1f5}} +{🇶}{\xelatexemoji{1f1ef-1f1f6}} +{🇷}{\xelatexemoji{1f1ef-1f1f7}} +{🇸}{\xelatexemoji{1f1ef-1f1f8}} +{🇹}{\xelatexemoji{1f1ef-1f1f9}} +{🇻}{\xelatexemoji{1f1ef-1f1fb}} +{🇼}{\xelatexemoji{1f1ef-1f1fc}} +{🇽}{\xelatexemoji{1f1ef-1f1fd}} +{🇾}{\xelatexemoji{1f1ef-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_K:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f0-1f1e6}} +{🇧}{\xelatexemoji{1f1f0-1f1e7}} +{🇨}{\xelatexemoji{1f1f0-1f1e8}} +{🇩}{\xelatexemoji{1f1f0-1f1e9}} +{🇪}{\xelatexemoji{1f1f0-1f1ea}} +{🇫}{\xelatexemoji{1f1f0-1f1eb}} +{🇬}{\xelatexemoji{1f1f0-1f1ec}} +{🇭}{\xelatexemoji{1f1f0-1f1ed}} +{🇮}{\xelatexemoji{1f1f0-1f1ee}} +{🇯}{\xelatexemoji{1f1f0-1f1ef}} +{🇰}{\xelatexemoji{1f1f0-1f1f0}} +{🇱}{\xelatexemoji{1f1f0-1f1f1}} +{🇲}{\xelatexemoji{1f1f0-1f1f2}} +{🇳}{\xelatexemoji{1f1f0-1f1f3}} +{🇴}{\xelatexemoji{1f1f0-1f1f4}} +{🇵}{\xelatexemoji{1f1f0-1f1f5}} +{🇶}{\xelatexemoji{1f1f0-1f1f6}} +{🇷}{\xelatexemoji{1f1f0-1f1f7}} +{🇸}{\xelatexemoji{1f1f0-1f1f8}} +{🇹}{\xelatexemoji{1f1f0-1f1f9}} +{🇻}{\xelatexemoji{1f1f0-1f1fb}} +{🇼}{\xelatexemoji{1f1f0-1f1fc}} +{🇽}{\xelatexemoji{1f1f0-1f1fd}} +{🇾}{\xelatexemoji{1f1f0-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_L:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f1-1f1e6}} +{🇧}{\xelatexemoji{1f1f1-1f1e7}} +{🇨}{\xelatexemoji{1f1f1-1f1e8}} +{🇩}{\xelatexemoji{1f1f1-1f1e9}} +{🇪}{\xelatexemoji{1f1f1-1f1ea}} +{🇫}{\xelatexemoji{1f1f1-1f1eb}} +{🇬}{\xelatexemoji{1f1f1-1f1ec}} +{🇭}{\xelatexemoji{1f1f1-1f1ed}} +{🇮}{\xelatexemoji{1f1f1-1f1ee}} +{🇯}{\xelatexemoji{1f1f1-1f1ef}} +{🇰}{\xelatexemoji{1f1f1-1f1f0}} +{🇱}{\xelatexemoji{1f1f1-1f1f1}} +{🇲}{\xelatexemoji{1f1f1-1f1f2}} +{🇳}{\xelatexemoji{1f1f1-1f1f3}} +{🇴}{\xelatexemoji{1f1f1-1f1f4}} +{🇵}{\xelatexemoji{1f1f1-1f1f5}} +{🇶}{\xelatexemoji{1f1f1-1f1f6}} +{🇷}{\xelatexemoji{1f1f1-1f1f7}} +{🇸}{\xelatexemoji{1f1f1-1f1f8}} +{🇹}{\xelatexemoji{1f1f1-1f1f9}} +{🇻}{\xelatexemoji{1f1f1-1f1fb}} +{🇼}{\xelatexemoji{1f1f1-1f1fc}} +{🇽}{\xelatexemoji{1f1f1-1f1fd}} +{🇾}{\xelatexemoji{1f1f1-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_M:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f2-1f1e6}} +{🇧}{\xelatexemoji{1f1f2-1f1e7}} +{🇨}{\xelatexemoji{1f1f2-1f1e8}} +{🇩}{\xelatexemoji{1f1f2-1f1e9}} +{🇪}{\xelatexemoji{1f1f2-1f1ea}} +{🇫}{\xelatexemoji{1f1f2-1f1eb}} +{🇬}{\xelatexemoji{1f1f2-1f1ec}} +{🇭}{\xelatexemoji{1f1f2-1f1ed}} +{🇮}{\xelatexemoji{1f1f2-1f1ee}} +{🇯}{\xelatexemoji{1f1f2-1f1ef}} +{🇰}{\xelatexemoji{1f1f2-1f1f0}} +{🇱}{\xelatexemoji{1f1f2-1f1f1}} +{🇲}{\xelatexemoji{1f1f2-1f1f2}} +{🇳}{\xelatexemoji{1f1f2-1f1f3}} +{🇴}{\xelatexemoji{1f1f2-1f1f4}} +{🇵}{\xelatexemoji{1f1f2-1f1f5}} +{🇶}{\xelatexemoji{1f1f2-1f1f6}} +{🇷}{\xelatexemoji{1f1f2-1f1f7}} +{🇸}{\xelatexemoji{1f1f2-1f1f8}} +{🇹}{\xelatexemoji{1f1f2-1f1f9}} +{🇻}{\xelatexemoji{1f1f2-1f1fb}} +{🇼}{\xelatexemoji{1f1f2-1f1fc}} +{🇽}{\xelatexemoji{1f1f2-1f1fd}} +{🇾}{\xelatexemoji{1f1f2-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_N:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f3-1f1e6}} +{🇧}{\xelatexemoji{1f1f3-1f1e7}} +{🇨}{\xelatexemoji{1f1f3-1f1e8}} +{🇩}{\xelatexemoji{1f1f3-1f1e9}} +{🇪}{\xelatexemoji{1f1f3-1f1ea}} +{🇫}{\xelatexemoji{1f1f3-1f1eb}} +{🇬}{\xelatexemoji{1f1f3-1f1ec}} +{🇭}{\xelatexemoji{1f1f3-1f1ed}} +{🇮}{\xelatexemoji{1f1f3-1f1ee}} +{🇯}{\xelatexemoji{1f1f3-1f1ef}} +{🇰}{\xelatexemoji{1f1f3-1f1f0}} +{🇱}{\xelatexemoji{1f1f3-1f1f1}} +{🇲}{\xelatexemoji{1f1f3-1f1f2}} +{🇳}{\xelatexemoji{1f1f3-1f1f3}} +{🇴}{\xelatexemoji{1f1f3-1f1f4}} +{🇵}{\xelatexemoji{1f1f3-1f1f5}} +{🇶}{\xelatexemoji{1f1f3-1f1f6}} +{🇷}{\xelatexemoji{1f1f3-1f1f7}} +{🇸}{\xelatexemoji{1f1f3-1f1f8}} +{🇹}{\xelatexemoji{1f1f3-1f1f9}} +{🇻}{\xelatexemoji{1f1f3-1f1fb}} +{🇼}{\xelatexemoji{1f1f3-1f1fc}} +{🇽}{\xelatexemoji{1f1f3-1f1fd}} +{🇾}{\xelatexemoji{1f1f3-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_O:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f4-1f1e6}} +{🇧}{\xelatexemoji{1f1f4-1f1e7}} +{🇨}{\xelatexemoji{1f1f4-1f1e8}} +{🇩}{\xelatexemoji{1f1f4-1f1e9}} +{🇪}{\xelatexemoji{1f1f4-1f1ea}} +{🇫}{\xelatexemoji{1f1f4-1f1eb}} +{🇬}{\xelatexemoji{1f1f4-1f1ec}} +{🇭}{\xelatexemoji{1f1f4-1f1ed}} +{🇮}{\xelatexemoji{1f1f4-1f1ee}} +{🇯}{\xelatexemoji{1f1f4-1f1ef}} +{🇰}{\xelatexemoji{1f1f4-1f1f0}} +{🇱}{\xelatexemoji{1f1f4-1f1f1}} +{🇲}{\xelatexemoji{1f1f4-1f1f2}} +{🇳}{\xelatexemoji{1f1f4-1f1f3}} +{🇴}{\xelatexemoji{1f1f4-1f1f4}} +{🇵}{\xelatexemoji{1f1f4-1f1f5}} +{🇶}{\xelatexemoji{1f1f4-1f1f6}} +{🇷}{\xelatexemoji{1f1f4-1f1f7}} +{🇸}{\xelatexemoji{1f1f4-1f1f8}} +{🇹}{\xelatexemoji{1f1f4-1f1f9}} +{🇻}{\xelatexemoji{1f1f4-1f1fb}} +{🇼}{\xelatexemoji{1f1f4-1f1fc}} +{🇽}{\xelatexemoji{1f1f4-1f1fd}} +{🇾}{\xelatexemoji{1f1f4-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_P:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f5-1f1e6}} +{🇧}{\xelatexemoji{1f1f5-1f1e7}} +{🇨}{\xelatexemoji{1f1f5-1f1e8}} +{🇩}{\xelatexemoji{1f1f5-1f1e9}} +{🇪}{\xelatexemoji{1f1f5-1f1ea}} +{🇫}{\xelatexemoji{1f1f5-1f1eb}} +{🇬}{\xelatexemoji{1f1f5-1f1ec}} +{🇭}{\xelatexemoji{1f1f5-1f1ed}} +{🇮}{\xelatexemoji{1f1f5-1f1ee}} +{🇯}{\xelatexemoji{1f1f5-1f1ef}} +{🇰}{\xelatexemoji{1f1f5-1f1f0}} +{🇱}{\xelatexemoji{1f1f5-1f1f1}} +{🇲}{\xelatexemoji{1f1f5-1f1f2}} +{🇳}{\xelatexemoji{1f1f5-1f1f3}} +{🇴}{\xelatexemoji{1f1f5-1f1f4}} +{🇵}{\xelatexemoji{1f1f5-1f1f5}} +{🇶}{\xelatexemoji{1f1f5-1f1f6}} +{🇷}{\xelatexemoji{1f1f5-1f1f7}} +{🇸}{\xelatexemoji{1f1f5-1f1f8}} +{🇹}{\xelatexemoji{1f1f5-1f1f9}} +{🇻}{\xelatexemoji{1f1f5-1f1fb}} +{🇼}{\xelatexemoji{1f1f5-1f1fc}} +{🇽}{\xelatexemoji{1f1f5-1f1fd}} +{🇾}{\xelatexemoji{1f1f5-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_Q:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f6-1f1e6}} +{🇧}{\xelatexemoji{1f1f6-1f1e7}} +{🇨}{\xelatexemoji{1f1f6-1f1e8}} +{🇩}{\xelatexemoji{1f1f6-1f1e9}} +{🇪}{\xelatexemoji{1f1f6-1f1ea}} +{🇫}{\xelatexemoji{1f1f6-1f1eb}} +{🇬}{\xelatexemoji{1f1f6-1f1ec}} +{🇭}{\xelatexemoji{1f1f6-1f1ed}} +{🇮}{\xelatexemoji{1f1f6-1f1ee}} +{🇯}{\xelatexemoji{1f1f6-1f1ef}} +{🇰}{\xelatexemoji{1f1f6-1f1f0}} +{🇱}{\xelatexemoji{1f1f6-1f1f1}} +{🇲}{\xelatexemoji{1f1f6-1f1f2}} +{🇳}{\xelatexemoji{1f1f6-1f1f3}} +{🇴}{\xelatexemoji{1f1f6-1f1f4}} +{🇵}{\xelatexemoji{1f1f6-1f1f5}} +{🇶}{\xelatexemoji{1f1f6-1f1f6}} +{🇷}{\xelatexemoji{1f1f6-1f1f7}} +{🇸}{\xelatexemoji{1f1f6-1f1f8}} +{🇹}{\xelatexemoji{1f1f6-1f1f9}} +{🇻}{\xelatexemoji{1f1f6-1f1fb}} +{🇼}{\xelatexemoji{1f1f6-1f1fc}} +{🇽}{\xelatexemoji{1f1f6-1f1fd}} +{🇾}{\xelatexemoji{1f1f6-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_R:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f7-1f1e6}} +{🇧}{\xelatexemoji{1f1f7-1f1e7}} +{🇨}{\xelatexemoji{1f1f7-1f1e8}} +{🇩}{\xelatexemoji{1f1f7-1f1e9}} +{🇪}{\xelatexemoji{1f1f7-1f1ea}} +{🇫}{\xelatexemoji{1f1f7-1f1eb}} +{🇬}{\xelatexemoji{1f1f7-1f1ec}} +{🇭}{\xelatexemoji{1f1f7-1f1ed}} +{🇮}{\xelatexemoji{1f1f7-1f1ee}} +{🇯}{\xelatexemoji{1f1f7-1f1ef}} +{🇰}{\xelatexemoji{1f1f7-1f1f0}} +{🇱}{\xelatexemoji{1f1f7-1f1f1}} +{🇲}{\xelatexemoji{1f1f7-1f1f2}} +{🇳}{\xelatexemoji{1f1f7-1f1f3}} +{🇴}{\xelatexemoji{1f1f7-1f1f4}} +{🇵}{\xelatexemoji{1f1f7-1f1f5}} +{🇶}{\xelatexemoji{1f1f7-1f1f6}} +{🇷}{\xelatexemoji{1f1f7-1f1f7}} +{🇸}{\xelatexemoji{1f1f7-1f1f8}} +{🇹}{\xelatexemoji{1f1f7-1f1f9}} +{🇻}{\xelatexemoji{1f1f7-1f1fb}} +{🇼}{\xelatexemoji{1f1f7-1f1fc}} +{🇽}{\xelatexemoji{1f1f7-1f1fd}} +{🇾}{\xelatexemoji{1f1f7-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_S:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f8-1f1e6}} +{🇧}{\xelatexemoji{1f1f8-1f1e7}} +{🇨}{\xelatexemoji{1f1f8-1f1e8}} +{🇩}{\xelatexemoji{1f1f8-1f1e9}} +{🇪}{\xelatexemoji{1f1f8-1f1ea}} +{🇫}{\xelatexemoji{1f1f8-1f1eb}} +{🇬}{\xelatexemoji{1f1f8-1f1ec}} +{🇭}{\xelatexemoji{1f1f8-1f1ed}} +{🇮}{\xelatexemoji{1f1f8-1f1ee}} +{🇯}{\xelatexemoji{1f1f8-1f1ef}} +{🇰}{\xelatexemoji{1f1f8-1f1f0}} +{🇱}{\xelatexemoji{1f1f8-1f1f1}} +{🇲}{\xelatexemoji{1f1f8-1f1f2}} +{🇳}{\xelatexemoji{1f1f8-1f1f3}} +{🇴}{\xelatexemoji{1f1f8-1f1f4}} +{🇵}{\xelatexemoji{1f1f8-1f1f5}} +{🇶}{\xelatexemoji{1f1f8-1f1f6}} +{🇷}{\xelatexemoji{1f1f8-1f1f7}} +{🇸}{\xelatexemoji{1f1f8-1f1f8}} +{🇹}{\xelatexemoji{1f1f8-1f1f9}} +{🇻}{\xelatexemoji{1f1f8-1f1fb}} +{🇼}{\xelatexemoji{1f1f8-1f1fc}} +{🇽}{\xelatexemoji{1f1f8-1f1fd}} +{🇾}{\xelatexemoji{1f1f8-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_T:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1f9-1f1e6}} +{🇧}{\xelatexemoji{1f1f9-1f1e7}} +{🇨}{\xelatexemoji{1f1f9-1f1e8}} +{🇩}{\xelatexemoji{1f1f9-1f1e9}} +{🇪}{\xelatexemoji{1f1f9-1f1ea}} +{🇫}{\xelatexemoji{1f1f9-1f1eb}} +{🇬}{\xelatexemoji{1f1f9-1f1ec}} +{🇭}{\xelatexemoji{1f1f9-1f1ed}} +{🇮}{\xelatexemoji{1f1f9-1f1ee}} +{🇯}{\xelatexemoji{1f1f9-1f1ef}} +{🇰}{\xelatexemoji{1f1f9-1f1f0}} +{🇱}{\xelatexemoji{1f1f9-1f1f1}} +{🇲}{\xelatexemoji{1f1f9-1f1f2}} +{🇳}{\xelatexemoji{1f1f9-1f1f3}} +{🇴}{\xelatexemoji{1f1f9-1f1f4}} +{🇵}{\xelatexemoji{1f1f9-1f1f5}} +{🇶}{\xelatexemoji{1f1f9-1f1f6}} +{🇷}{\xelatexemoji{1f1f9-1f1f7}} +{🇸}{\xelatexemoji{1f1f9-1f1f8}} +{🇹}{\xelatexemoji{1f1f9-1f1f9}} +{🇻}{\xelatexemoji{1f1f9-1f1fb}} +{🇼}{\xelatexemoji{1f1f9-1f1fc}} +{🇽}{\xelatexemoji{1f1f9-1f1fd}} +{🇾}{\xelatexemoji{1f1f9-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_V:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1fb-1f1e6}} +{🇧}{\xelatexemoji{1f1fb-1f1e7}} +{🇨}{\xelatexemoji{1f1fb-1f1e8}} +{🇩}{\xelatexemoji{1f1fb-1f1e9}} +{🇪}{\xelatexemoji{1f1fb-1f1ea}} +{🇫}{\xelatexemoji{1f1fb-1f1eb}} +{🇬}{\xelatexemoji{1f1fb-1f1ec}} +{🇭}{\xelatexemoji{1f1fb-1f1ed}} +{🇮}{\xelatexemoji{1f1fb-1f1ee}} +{🇯}{\xelatexemoji{1f1fb-1f1ef}} +{🇰}{\xelatexemoji{1f1fb-1f1f0}} +{🇱}{\xelatexemoji{1f1fb-1f1f1}} +{🇲}{\xelatexemoji{1f1fb-1f1f2}} +{🇳}{\xelatexemoji{1f1fb-1f1f3}} +{🇴}{\xelatexemoji{1f1fb-1f1f4}} +{🇵}{\xelatexemoji{1f1fb-1f1f5}} +{🇶}{\xelatexemoji{1f1fb-1f1f6}} +{🇷}{\xelatexemoji{1f1fb-1f1f7}} +{🇸}{\xelatexemoji{1f1fb-1f1f8}} +{🇹}{\xelatexemoji{1f1fb-1f1f9}} +{🇻}{\xelatexemoji{1f1fb-1f1fb}} +{🇼}{\xelatexemoji{1f1fb-1f1fc}} +{🇽}{\xelatexemoji{1f1fb-1f1fd}} +{🇾}{\xelatexemoji{1f1fb-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_W:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1fc-1f1e6}} +{🇧}{\xelatexemoji{1f1fc-1f1e7}} +{🇨}{\xelatexemoji{1f1fc-1f1e8}} +{🇩}{\xelatexemoji{1f1fc-1f1e9}} +{🇪}{\xelatexemoji{1f1fc-1f1ea}} +{🇫}{\xelatexemoji{1f1fc-1f1eb}} +{🇬}{\xelatexemoji{1f1fc-1f1ec}} +{🇭}{\xelatexemoji{1f1fc-1f1ed}} +{🇮}{\xelatexemoji{1f1fc-1f1ee}} +{🇯}{\xelatexemoji{1f1fc-1f1ef}} +{🇰}{\xelatexemoji{1f1fc-1f1f0}} +{🇱}{\xelatexemoji{1f1fc-1f1f1}} +{🇲}{\xelatexemoji{1f1fc-1f1f2}} +{🇳}{\xelatexemoji{1f1fc-1f1f3}} +{🇴}{\xelatexemoji{1f1fc-1f1f4}} +{🇵}{\xelatexemoji{1f1fc-1f1f5}} +{🇶}{\xelatexemoji{1f1fc-1f1f6}} +{🇷}{\xelatexemoji{1f1fc-1f1f7}} +{🇸}{\xelatexemoji{1f1fc-1f1f8}} +{🇹}{\xelatexemoji{1f1fc-1f1f9}} +{🇻}{\xelatexemoji{1f1fc-1f1fb}} +{🇼}{\xelatexemoji{1f1fc-1f1fc}} +{🇽}{\xelatexemoji{1f1fc-1f1fd}} +{🇾}{\xelatexemoji{1f1fc-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_X:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1fd-1f1e6}} +{🇧}{\xelatexemoji{1f1fd-1f1e7}} +{🇨}{\xelatexemoji{1f1fd-1f1e8}} +{🇩}{\xelatexemoji{1f1fd-1f1e9}} +{🇪}{\xelatexemoji{1f1fd-1f1ea}} +{🇫}{\xelatexemoji{1f1fd-1f1eb}} +{🇬}{\xelatexemoji{1f1fd-1f1ec}} +{🇭}{\xelatexemoji{1f1fd-1f1ed}} +{🇮}{\xelatexemoji{1f1fd-1f1ee}} +{🇯}{\xelatexemoji{1f1fd-1f1ef}} +{🇰}{\xelatexemoji{1f1fd-1f1f0}} +{🇱}{\xelatexemoji{1f1fd-1f1f1}} +{🇲}{\xelatexemoji{1f1fd-1f1f2}} +{🇳}{\xelatexemoji{1f1fd-1f1f3}} +{🇴}{\xelatexemoji{1f1fd-1f1f4}} +{🇵}{\xelatexemoji{1f1fd-1f1f5}} +{🇶}{\xelatexemoji{1f1fd-1f1f6}} +{🇷}{\xelatexemoji{1f1fd-1f1f7}} +{🇸}{\xelatexemoji{1f1fd-1f1f8}} +{🇹}{\xelatexemoji{1f1fd-1f1f9}} +{🇻}{\xelatexemoji{1f1fd-1f1fb}} +{🇼}{\xelatexemoji{1f1fd-1f1fc}} +{🇽}{\xelatexemoji{1f1fd-1f1fd}} +{🇾}{\xelatexemoji{1f1fd-1f1fe}} + + } + {} + } + + +\cs_new_protected:Nn \flags_Y:n + { + \str_case:nnF {#1} + { + +{🇦}{\xelatexemoji{1f1fe-1f1e6}} +{🇧}{\xelatexemoji{1f1fe-1f1e7}} +{🇨}{\xelatexemoji{1f1fe-1f1e8}} +{🇩}{\xelatexemoji{1f1fe-1f1e9}} +{🇪}{\xelatexemoji{1f1fe-1f1ea}} +{🇫}{\xelatexemoji{1f1fe-1f1eb}} +{🇬}{\xelatexemoji{1f1fe-1f1ec}} +{🇭}{\xelatexemoji{1f1fe-1f1ed}} +{🇮}{\xelatexemoji{1f1fe-1f1ee}} +{🇯}{\xelatexemoji{1f1fe-1f1ef}} +{🇰}{\xelatexemoji{1f1fe-1f1f0}} +{🇱}{\xelatexemoji{1f1fe-1f1f1}} +{🇲}{\xelatexemoji{1f1fe-1f1f2}} +{🇳}{\xelatexemoji{1f1fe-1f1f3}} +{🇴}{\xelatexemoji{1f1fe-1f1f4}} +{🇵}{\xelatexemoji{1f1fe-1f1f5}} +{🇶}{\xelatexemoji{1f1fe-1f1f6}} +{🇷}{\xelatexemoji{1f1fe-1f1f7}} +{🇸}{\xelatexemoji{1f1fe-1f1f8}} +{🇹}{\xelatexemoji{1f1fe-1f1f9}} +{🇻}{\xelatexemoji{1f1fe-1f1fb}} +{🇼}{\xelatexemoji{1f1fe-1f1fc}} +{🇽}{\xelatexemoji{1f1fe-1f1fd}} +{🇾}{\xelatexemoji{1f1fe-1f1fe}} + + } + {} + } + +\ExplSyntaxOff diff --git a/xelatexemoji.sty b/xelatexemoji.sty index b34db83..56aa009 100644 --- a/xelatexemoji.sty +++ b/xelatexemoji.sty @@ -856,3 +856,5 @@ \newunicodechar{🕥}{\xelatexemoji{1f565}} \newunicodechar{🕦}{\xelatexemoji{1f566}} \newunicodechar{🕧}{\xelatexemoji{1f567}} + +\usepackage{xelatexemoji-flags}