%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -------------------------------------------------------------------------------------------------- % subfile of pgf-PeriodicTable package ---------------------------------------------------------- % -------------------------------------------------------------------------------------------------- % «The macros for process the language(s) data to display in the Periodic Table» ------------ % -------------------------------------------------------------------------------------------------- % Labels available in: pt, en, fr, de, it, es, br % -------------------------------------------------------------------------------------------------- % \pgfPTsetLanguage{} % -------------------------------------------------------------------------------------------------- % Used to change the default language % Language flags: % - pt, Portuguese (Portugal) % - en, English % - fr, French % - de, German % - it, Italian % - es, Spanish % - br, Portuguese (Brazil) \def\pgfPTsetLanguage#1{% \pgfPT@validLang{#1}% \ifx\pgfPT@langOK\undefined\relax% \PackageError{pgfPT}{invalid language flag '#1'. It will be ignored (default 'en'\space will be used)}{}% \xdef\pgfPT@defaultLanguage{en}% \else\xdef\pgfPT@defaultLanguage{#1}\global\let\pgfPT@langOK\undefined\relax% \fi}% % -------------------------------------------------------------------------------------------------- % List of available languages % -------------------------------------------------------------------------------------------------- \def\pgfPT@languagesList{pt,en,fr,de,it,es,br}% % -------------------------------------------------------------------------------------------------- % Validating language \def\pgfPT@validLang#1{\ignorespaces% \edef\pgfPT@lang{#1}% \@for\@pgfPT@tmp:=\pgfPT@languagesList\do{% \edef\pgfPT@currLang{\@pgfPT@tmp}% \ifx\pgfPT@lang\pgfPT@currLang\relax\xdef\pgfPT@langOK{OK}\fi% }% }% % -------------------------------------------------------------------------------------------------- \def\pgfPT@getFirstLanguage#1,#2\relax{% \pgfPT@validLang{#1}% \ifx\pgfPT@langOK\undefined\relax% \PackageError{pgfPT}{invalid language flag '#1'. It will be ignored (default 'en'\space will be used)}{}% \xdef\pgfPT@FirstLanguage{en}% \else\xdef\pgfPT@FirstLanguage{#1}\global\let\pgfPT@langOK\undefined\relax% \fi}% % -------------------------------------------------------------------------------------------------- % % ######################################################## % macros for processing Periodic Table Labels % ######################################################## % % -------------------------------------------------------------------------------------------------- % DATA @ pgfPT.labels.tex -> % \pgfPT@labels@titulo{Tabela Periódica dos Elementos/pt,Periodic Table of Elements/en,Periodic... % \pgfPT@labels@La{... % \pgfPT@labels@... % % -------------------------------------------------------------------------------------------------- % \pgfPT@setlabels[languages list]{label} % OUTPUT: % \pgfPT@labels@