summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale-xeltx3.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale-xeltx3.tex')
-rw-r--r--Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale-xeltx3.tex64
1 files changed, 64 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale-xeltx3.tex b/Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale-xeltx3.tex
new file mode 100644
index 00000000000..e7039a1ea26
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale-xeltx3.tex
@@ -0,0 +1,64 @@
+% arara: xelatex: {shell: on}
+\documentclass{article}
+
+\usepackage[main={sr-Cyrl-RS},other={en-GB},date=full]{tex-locale}
+
+\LocaleSupportPackageCase
+{\newcommand{\textenglish}[1]{\foreignlanguage{british}{#1}}}% babel
+{% polyglossia
+ \setmainfont{Liberation Serif}
+ \setmonofont{Liberation Mono}
+ \newfontfamily\cyrillicfont{Liberation Serif}
+ \newfontfamily\cyrillicfonttt{Liberation Mono}
+}
+{\newcommand{\textenglish}[1]{#1}}% none
+
+\newcount\tmpctr
+
+\newcommand{\test}{%
+ \section{\textenglish{Document language} \languagename}
+ \subsection{\textenglish{datetime2 commands}}
+ \textenglish{\texttt{\string\today}}: \today.
+ \textenglish{\texttt{\string\DTMcurrenttime}}: \DTMcurrenttime.
+ \subsection{\textenglish{Locale Details}}
+ \textenglish{Language:} \CurrentLocaleLanguageNativeName.
+ \textenglish{Region:} \CurrentLocaleRegionNativeName.
+ \subsection{\textenglish{Dates and Times (Obtained from Java)}}
+ \textenglish{Today:} \CurrentLocaleDate.
+ \textenglish{Time:} \CurrentLocaleTime.
+ \textenglish{First day of the week:}
+ \CurrentLocaleStandaloneDayName{\CurrentLocaleFirstDayIndex}
+ (\textenglish{index:} \CurrentLocaleFirstDayIndex).
+ \textenglish{Current month:}
+ \CurrentLocaleStandaloneMonthName{\month}.
+ \par
+ \textenglish{Days of the week:}%
+ \tmpctr=1\relax
+ \loop
+ \space
+ \CurrentLocaleStandaloneDayName
+ {\CurrentLocaleDayIndexFromRegion{\tmpctr}}%
+ \advance\tmpctr by 1
+ \ifnum\tmpctr<8
+ \repeat
+ .
+ \subsection{\textenglish{Numeric}}
+ \textenglish{Numeric symbols:}
+ \CurrentLocaleNumericGroupSep\ \textenglish{(group separator)}
+ \CurrentLocaleDecimalSep\ \textenglish{(decimal separator)}
+ \CurrentLocaleMonetarySep\ \textenglish{(monetary separator)}
+ \CurrentLocaleExponent\ \textenglish{(exponent)}
+ \CurrentLocalePercent\ \textenglish{(percent)}
+ \CurrentLocalePermill\ \textenglish{(per mill).}
+ \par
+ \textenglish{Uses numeric group separator:
+ \CurrentLocaleIfNumericUsesGroup{yes}{no}.}
+ \par
+ \textenglish{Currency:} \CurrentLocaleCurrency
+}
+
+\begin{document}
+
+\test
+
+\end{document}