diff options
Diffstat (limited to 'macros/latex/contrib/tblr-extras/tblr-extras.sty')
-rw-r--r-- | macros/latex/contrib/tblr-extras/tblr-extras.sty | 87 |
1 files changed, 69 insertions, 18 deletions
diff --git a/macros/latex/contrib/tblr-extras/tblr-extras.sty b/macros/latex/contrib/tblr-extras/tblr-extras.sty index 09cd5ce16c..a6742f4a10 100644 --- a/macros/latex/contrib/tblr-extras/tblr-extras.sty +++ b/macros/latex/contrib/tblr-extras/tblr-extras.sty @@ -1,6 +1,6 @@ % ----------------------------------------------------------------------- %%% tblr-extras: Extra libraries for tabularray package. -%%% Version : 1.0 - 2024-02-10 +%%% Version : 1.1 - 2024-05-13 %%% Copyright : 2024 (c) Manuel E. Merino <manuel.merino.pe@gmail.com> %%% License : The LaTeX Project Public License 1.3c % ----------------------------------------------------------------------- @@ -18,7 +18,7 @@ % The Current Maintainer of this work is Manuel E. Merino % ----------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e}[2018-04-01] -\ProvidesPackage{tblr-extras}[2024/02/06 package tblr-extras] +\ProvidesPackage{tblr-extras}[2024/05/13 package tblr-extras] \RequirePackage{tabularray} %% ---------------------------------------------------------------------- %% TblrLibrary caption - Use caption package to typeset tabularray tall @@ -34,7 +34,7 @@ %% Check if a KomaClass is loaded and issue a warning for caption position setup \@ifundefined{KOMAClassName} {} - {\PackageWarningNoLine{tblr-extras}{KOMAScript class detected. Setup caption position using 'captions=<option>'}} + {\PackageWarningNoLine{tblr-extras}{KOMAScript class detected. Setup caption position using 'captions=option'}} \SetTblrOuter[talltblr,longtblr]{headsep=0pt} \DefTblrTemplate{firsthead}{default}{% \addtocounter{table}{-1}% @@ -54,21 +54,72 @@ \SetTblrTemplate{caption-lot}{empty} } %% ---------------------------------------------------------------------- -%% TblrLibrary babel - Translate contfoot and conthead to current babel -%% language. Supports: ngerman, french and spanish translations. +%% TblrLibrary babel - Translate contfoot and conthead to current babel/polyglossia +%% language. Supports: ngerman, french, spanish, russian and ukrainian translations. +%% Check engine +\newif\if@unicode@engine +\ifdefined\luatexversion + \@unicode@enginetrue +\else\ifdefined\XeTeXrevision + \@unicode@enginetrue +\fi\fi \NewTblrLibrary{babel} {% - \RequirePackage{babel,iflang} - \IfLanguagePatterns{spanish}{% - \DefTblrTemplate{contfoot-text}{default}{Continúa en la página siguiente} - \DefTblrTemplate{conthead-text}{default}{(Continuación)} - }{} - \IfLanguagePatterns{ngerman}{% - \DefTblrTemplate{contfoot-text}{default}{Fortsetzung auf der nächsten Seite} - \DefTblrTemplate{conthead-text}{default}{(Fortsetzung)} - }{} - \IfLanguagePatterns{french}{% - \DefTblrTemplate{contfoot-text}{default}{Suite à la page suivante} - \DefTblrTemplate{conthead-text}{default}{(Suite)} - }{} + \AddToHook{begindocument/before}{% + \@ifpackageloaded{babel}{}{% + \@ifpackageloaded{polyglossia}{}{% + \RequirePackage{babel} + } + } + \ifdefined\captionsspanish + \addto\captionsspanish{% + \DefTblrTemplate{contfoot-text}{default}{Continúa en la página siguiente}% + \DefTblrTemplate{conthead-text}{default}{(Continuación)}% + } + \fi + \ifdefined\captionsngerman + \addto\captionsngerman{% + \DefTblrTemplate{contfoot-text}{default}{Fortsetzung auf der nächsten Seite}% + \DefTblrTemplate{conthead-text}{default}{(Fortsetzung)}% + } + \fi + \ifdefined\captionsgerman + \addto\captionsgerman{% + \DefTblrTemplate{contfoot-text}{default}{Fortsetzung auf der nächsten Seite}% + \DefTblrTemplate{conthead-text}{default}{(Fortsetzung)}% + } + \fi + \ifdefined\captionsfrench + \addto\captionsfrench{% + \DefTblrTemplate{contfoot-text}{default}{Suite à la page suivante}% + \DefTblrTemplate{conthead-text}{default}{(Suite)}% + } + \fi + \ifdefined\captionsrussian + \if@unicode@engine + \addto\captionsrussian{% + \DefTblrTemplate{contfoot-text}{default}{Продолжение на следующей странице}% + \DefTblrTemplate{conthead-text}{default}{(продолжение)}% + } + \else + \addto\captionsrussian{% + \DefTblrTemplate{contfoot-text}{default}{\cyr\CYRP\cyrr\cyro\cyrd\cyro\cyrl\cyrzh\cyre\cyrn\cyri\cyre\ \cyrn\cyra\ \cyrs\cyrl\cyre\cyrd\cyru\cyryu\cyrshch\cyre\cyrishrt\ \cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% + \DefTblrTemplate{conthead-text}{default}{(\cyr\cyrp\cyrr\cyro\cyrd\cyro\cyrl\cyrzh\cyre\cyrn\cyri\cyre)}% + } + \fi + \fi + \ifdefined\captionsukrainian + \if@unicode@engine + \addto\captionsukrainian{% + \DefTblrTemplate{contfoot-text}{default}{Продовження на наступній сторінці}% + \DefTblrTemplate{conthead-text}{default}{(продовження)}% + } + \else + \addto\captionsukrainian{% + \DefTblrTemplate{contfoot-text}{default}{\cyr\CYRP\cyrr\cyro\cyrd\cyro\cyrv\cyrzh\cyre\cyrn\cyrn\cyrya\ \cyrn\cyra\ \cyrn\cyra\cyrs\cyrt\cyru\cyrp\cyrn\cyrii\cyrishrt\ \cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrc\cyrii}% + \DefTblrTemplate{conthead-text}{default}{(\cyr\cyrp\cyrr\cyro\cyrd\cyro\cyrv\cyrzh\cyre\cyrn\cyrn\cyrya)}% + } + \fi + \fi + } } |