From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- .../tex-locale/samples/sample-locale-xeltx2.tex | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 macros/generic/tex-locale/samples/sample-locale-xeltx2.tex (limited to 'macros/generic/tex-locale/samples/sample-locale-xeltx2.tex') diff --git a/macros/generic/tex-locale/samples/sample-locale-xeltx2.tex b/macros/generic/tex-locale/samples/sample-locale-xeltx2.tex new file mode 100644 index 0000000000..fad6ac3800 --- /dev/null +++ b/macros/generic/tex-locale/samples/sample-locale-xeltx2.tex @@ -0,0 +1,96 @@ +% arara: xelatex +\documentclass{article} + +\usepackage[other={pt-BR,de-CH-1996,fr-BE},timedata]{tex-locale} + +\setmainfont{STIX} + +\newcount\tmpctr + +\newcommand{\test}{% + \section{Document language \languagename\space + (\CurrentTrackedLanguageTag)} + \subsection{datetime2 commands} + \texttt{\string\today}: \today. + \texttt{\string\DTMcurrenttime}: \DTMcurrenttime. + \subsection{Locale Details} + Language: \CurrentLocaleLanguageNativeName. + Region: \CurrentLocaleRegionNativeName. + \subsection{Dates and Times (Obtained from Java)} + Today: \CurrentLocaleDate. + Time: \CurrentLocaleTime. + First day of the week: + \CurrentLocaleStandaloneDayName{\CurrentLocaleFirstDayIndex} + (index: \CurrentLocaleFirstDayIndex). + Current month: + \CurrentLocaleStandaloneMonthName{\month}. + \par + Days of the week:% + \tmpctr=1\relax + \loop + \space + \CurrentLocaleStandaloneDayName + {\CurrentLocaleDayIndexFromRegion{\tmpctr}}% + \advance\tmpctr by 1 + \ifnum\tmpctr<8 + \repeat + . + \par + Full date-time pattern: + \texttt{\LocaleGetDialectAttribute{\CurrentTrackedDialect}{fulldatetimefmt}} + \par + Apply full date-time pattern: + \CurrentLocaleApplyDateTimePattern{fulldatetimefmt}{\LocaleDateTimeInfo} + \subsection{Numeric} + Numeric symbols: + \CurrentLocaleNumericGroupSep\ (group separator) + \CurrentLocaleDecimalSep\ (decimal separator) + \CurrentLocaleMonetarySep\ (monetary separator) + \CurrentLocaleExponent\ (exponent) + \CurrentLocalePercent\ (percent) + \CurrentLocalePermill\ (per mill). + \par + Uses numeric group separator: + \CurrentLocaleIfNumericUsesGroup{yes}{no}. + \par + Currency symbol: \CurrentLocaleCurrency + \par + Integer: + \texosqueryfmtnumber{\CurrentLocaleIntegerPattern}{123456}{0}{0} + \par + Decimal: + \texosqueryfmtnumber{\CurrentLocaleDecimalPattern}{123456}{78}{0} + \par + Percentage: + \texosqueryfmtnumber{\CurrentLocalePercentPattern}{0}{65}{0} + \par + Currency: + \texosqueryfmtnumber{\CurrentLocaleCurrencyPattern}{1234567}{0}{0} +} + +\renewcommand*{\localedatetimefmt}[1]{\localenopolypunct{#1}} + +\begin{document} +\section{General Information} + +OS name: \LocaleOSname. +OS version: \LocaleOSversion. +OS arch: \LocaleOSarch. + +Default file encoding: \LocaleOScodeset. + +The PDF file was last built: \texttt{\LocaleNowStamp}. + +The source file was last modified: \texttt{\LocaleFileMod}. + +Main locale: \LocaleMain\ (\LocaleMainDialect). + +Other locales: \LocaleOther. + +\ForEachTrackedLanguage{\thislanguage} +{% + \selectlanguage{\thislanguage} + \test +} + +\end{document} -- cgit v1.2.3