summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex')
-rw-r--r--graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex20
1 files changed, 16 insertions, 4 deletions
diff --git a/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex b/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex
index 18620fea26..8c09f620e1 100644
--- a/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex
+++ b/graphics/pgf/contrib/pgf-periodictable/pgfPT.drawing.keys.tex
@@ -4,11 +4,9 @@
% --------------------------------------------------------------------------------------------------
% «The keys for the layout and drawing the Periodic Table» ------------------------------------
% --------------------------------------------------------------------------------------------------
-%% defining PGF keys: language list to use in the Periodic Table ------------------------------
\pgfkeys{/pgfPerTable/.cd,%
-languages/.get=\pgfPTlanguages,%
-languages/.store in=\pgfPTlanguages,%
-languages/.default=\pgfPT@defaultLanguage,%
+languages/.code=\pgfPT@otherlanguages{#1},% v2.1.0
+languages/.default=\pgfPT@defaultLanguage,% v2.1.0
other languages font/.get=\pgfPTotherLangFont,%
other languages font/.store in=\pgfPTotherLangFont,%
other languages font/.default=\tiny,%
@@ -18,6 +16,20 @@ other languages color/.default=black!70,%
other lang/.code=\pgfPT@otherlangstyle{#1},%
other lang/.default={f=\tiny,c=black!70}%
}%
+% replace user ISO flag, if found, with 'user' (v2.1.0) -------------------------------------
+\newcount\pgfPT@nlang@count%
+\def\pgfPT@otherlanguages#1{%
+\pgfPT@nlang@count=0\relax%
+\edef\pgfPTlanguages{}%
+\@for\pgfPT@tmp:=#1\do{\advance\pgfPT@nlang@count by1\relax%
+\ifnum\pgfPT@nlang@count=1\relax%
+\ifx\pggPT@userlanguage@ISOcode\pgfPT@tmp\relax\edef\pgfPTlanguages{user}%
+\else\edef\pgfPTlanguages{\pgfPT@tmp}\fi%
+\else%
+\ifx\pggPT@userlanguage@ISOcode\pgfPT@tmp\relax\edef\pgfPTlanguages{\pgfPTlanguages,user}%
+\else\edef\pgfPTlanguages{\pgfPTlanguages,\pgfPT@tmp}\fi%
+\fi}%
+}% -------------------------------------------------------------------------------------------------
% setting key with default value -----------------------------------------------------------------
\pgfkeys{/pgfPerTable/.cd,languages,other languages font,other languages color}%
% end !! PGF keys: language to use in the Periodic Table ---------------------------------------