summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/tblr-extras/README.md18
-rw-r--r--macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.pdfbin0 -> 26714 bytes
-rw-r--r--macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.tex84
-rw-r--r--macros/latex/contrib/tblr-extras/tblr-extras.sty74
4 files changed, 176 insertions, 0 deletions
diff --git a/macros/latex/contrib/tblr-extras/README.md b/macros/latex/contrib/tblr-extras/README.md
new file mode 100644
index 0000000000..4c7dc3ce22
--- /dev/null
+++ b/macros/latex/contrib/tblr-extras/README.md
@@ -0,0 +1,18 @@
+Package tblr-extras: Extra libraries for tabularray package.
+Copyright (C) 2024 Manuel E. Merino <manuel.merino.pe@gmail.com>
+
+The package may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in
+http://www.latex-project.org/lppl.txt
+# Usage
+Just use \usepackage{tblr-extras} after loading tabularray.
+Activate the libraries using \UseTblrLibrary command
+## Caption Library
+Use caption package to typeset tabularray tall and long tabulars captions.
+Enable this library with \UseTblrLibrary{caption}
+## Babel Library
+Translate contfoot and conthead to current babel language.
+Curremtle only supports ngerman, french and spanish translations.
+Enable this library with \UseTblrLibrary{babel} \ No newline at end of file
diff --git a/macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.pdf b/macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.pdf
new file mode 100644
index 0000000000..5f1292e5c7
--- /dev/null
+++ b/macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.pdf
Binary files differ
diff --git a/macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.tex b/macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.tex
new file mode 100644
index 0000000000..f15a58f8c4
--- /dev/null
+++ b/macros/latex/contrib/tblr-extras/tblr-extras-doc-EN.tex
@@ -0,0 +1,84 @@
+% -----------------------------------------------------------------------
+%%% tblr-extras-doc: Documentation for tblr-extras package.
+%%% Version : 1.0 - 2024-02-10
+%%% Copyright : 2024 (c) Manuel E. Merino <manuel.merino.pe@gmail.com>
+%%% License : The LaTeX Project Public License 1.3c
+% -----------------------------------------------------------------------
+%%% LPPL 1.3c Notice: ---------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Manuel E. Merino
+% -----------------------------------------------------------------------
+\documentclass[a4paper,12pt]{article}
+\usepackage{fontspec}
+\setmainfont{montserrat}
+\setsansfont{montserrat}
+\setmonofont[Scale=MatchLowercase]{Roboto Mono}
+\usepackage{microtype}
+\usepackage[english]{babel}
+\usepackage{xcolor}
+\usepackage{graphicx}
+\usepackage{udepcolor}
+\usepackage[margin=2.5cm]{geometry}
+\usepackage{parskip}
+\usepackage[hidelinks]{hyperref}
+
+\newcommand{\Version}{1.0}
+
+\NewDocumentCommand{\tblrextras}{}{\textbf{\color{udep}tblr-extras}}
+
+\begin{document}
+ \begingroup%
+ \centering
+ \LARGE\textbf{Package \color{udep}tblr-extras}\par
+ \large Manuel E. Merino\par
+ \texttt{v\Version{} - 10/02/2024}\par
+ \normalsize Extra libraries for tabularray package.\par
+ \endgroup
+ \tableofcontents
+ \clearpage
+
+ \section{Introduction}
+ The \tblrextras{} package is a collection of extra libraries for the \texttt{tabularray} package.
+
+ Currently, it includes two libraries: caption and babel.
+
+ \section{Installation and use}
+
+ To install the \tblrextras{} package download and unzip the \texttt{tblr-extras.sty} file and place it in a folder accessible to \LaTeX{} (this can be the current working folder or a subfolder in the TEXMF directory).
+
+ To use the \tblrextras{} package add the following command to the preamble of your document: \verb|\usepackage{tblr-extras}|
+
+ \section{Available libraries}
+ \subsection{caption library}
+
+ The \tblrextras{} package changes the way \texttt{tabularray} typesets the captions of \texttt{talltblr} and \texttt{longtblr} environments, using the settings defined by the \texttt{caption} package.
+
+ To enable this library, use \verb*|\UseTblrLibrary{caption}| after loading \tblrextras{} and \texttt{tabularray} packages.
+
+ \subsection{babel library}
+
+ The \tblrextras{} package redefines the \texttt{conthead-text} and \textbf{contfoot-text} for the \texttt{longtblr} environment, using the current babel language.
+
+ Currently only spanish, ngerman and english variants are supported.
+
+ \section{Bug reports and suggestions}
+
+ For bug reports and suggestions, please use GitHub or send an email to manuel.merino.pe@gmail.com.
+
+ \section{License}
+
+ The \tblrextras{} package and all its included files are licensed under the LPPL v1.3c or later.
+
+ \vfill
+ \centering
+ \footnotesize \tblrextras{} -- {\copyright} 2024 Manuel E. Merino. Licensed under LPPL v1.3c.
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/tblr-extras/tblr-extras.sty b/macros/latex/contrib/tblr-extras/tblr-extras.sty
new file mode 100644
index 0000000000..09cd5ce16c
--- /dev/null
+++ b/macros/latex/contrib/tblr-extras/tblr-extras.sty
@@ -0,0 +1,74 @@
+% -----------------------------------------------------------------------
+%%% tblr-extras: Extra libraries for tabularray package.
+%%% Version : 1.0 - 2024-02-10
+%%% Copyright : 2024 (c) Manuel E. Merino <manuel.merino.pe@gmail.com>
+%%% License : The LaTeX Project Public License 1.3c
+% -----------------------------------------------------------------------
+%%% LPPL 1.3c Notice: ---------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Manuel E. Merino
+% -----------------------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}[2018-04-01]
+\ProvidesPackage{tblr-extras}[2024/02/06 package tblr-extras]
+\RequirePackage{tabularray}
+%% ----------------------------------------------------------------------
+%% TblrLibrary caption - Use caption package to typeset tabularray tall
+%% and long tabulars captions.
+%% Empty token list checker wrapper
+\ExplSyntaxOn
+\prg_generate_conditional_variant:Nnn \tl_if_empty:n { e } { TF }
+\let \IfTokenListEmpty = \tl_if_empty:eTF
+\ExplSyntaxOff
+\NewTblrLibrary{caption}
+{%
+ \RequirePackage{caption}
+ %% 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>'}}
+ \SetTblrOuter[talltblr,longtblr]{headsep=0pt}
+ \DefTblrTemplate{firsthead}{default}{%
+ \addtocounter{table}{-1}%
+ \IfTokenListEmpty{\InsertTblrText{entry}}{%
+ \captionsetup{type=table}
+ \caption{\InsertTblrText{caption}}%
+ }{%
+ \captionsetup{type=table}
+ \caption[\InsertTblrText{entry}]{\InsertTblrText{caption}}%
+ }%
+ }
+ \DefTblrTemplate{middlehead,lasthead}{default}{%
+ \addtocounter{table}{-1}%
+ \captionsetup{type=table}%
+ \caption[]{\InsertTblrText{caption} \UseTblrTemplate{conthead-text}{default}}%
+ }
+ \SetTblrTemplate{caption-lot}{empty}
+}
+%% ----------------------------------------------------------------------
+%% TblrLibrary babel - Translate contfoot and conthead to current babel
+%% language. Supports: ngerman, french and spanish translations.
+\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)}
+ }{}
+}