summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-09-02 03:03:14 +0000
committerNorbert Preining <norbert@preining.info>2021-09-02 03:03:14 +0000
commita16eced7ce206f6c49ce7fe3cb15235d019f7a4a (patch)
tree7822ae742dbb329508a8cbc1a60882acd66a9607 /macros/latex/contrib
parent692575a36c0469a733dc7a6f68e945db811fb0c6 (diff)
CTAN sync 202109020303
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/covington/README5
-rw-r--r--macros/latex/contrib/covington/covington.pdfbin487245 -> 495582 bytes
-rw-r--r--macros/latex/contrib/covington/covington.sty28
-rw-r--r--macros/latex/contrib/covington/covington.tex42
-rw-r--r--macros/latex/contrib/styledcmd/styledcmd.dtx87
-rw-r--r--macros/latex/contrib/styledcmd/styledcmd.pdfbin333336 -> 338113 bytes
-rw-r--r--macros/latex/contrib/tabularray/tabularray-2021.sty955
-rw-r--r--macros/latex/contrib/tabularray/tabularray.pdfbin680990 -> 725112 bytes
-rw-r--r--macros/latex/contrib/tabularray/tabularray.sty640
-rw-r--r--macros/latex/contrib/tabularray/tabularray.tex264
-rw-r--r--macros/latex/contrib/uni-titlepage/README.md2
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-DHBW.pdfbin43998 -> 43998 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-JT-Aufsaetze.pdfbin41265 -> 41265 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-JT-Geschichte.pdfbin38251 -> 38251 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-JT-Typography.pdfbin26903 -> 26903 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-KIT.pdfbin42149 -> 42149 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-KOMAScript.pdfbin166494 -> 166494 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-Markus-1.pdfbin119780 -> 119780 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-Markus-2.pdfbin128796 -> 128796 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-Spacer.pdfbin127996 -> 127996 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-TU-DD.pdfbin40396 -> 40396 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-TU-HH.pdfbin54017 -> 54017 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-UKoLa.pdfbin0 -> 103389 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/titlepage-WWUM.pdfbin58935 -> 58935 bytes
-rw-r--r--macros/latex/contrib/uni-titlepage/uni-titlepage.dtx480
-rw-r--r--macros/latex/contrib/uni-titlepage/uni-titlepage.pdfbin841219 -> 865279 bytes
-rw-r--r--macros/latex/contrib/univie-ling/README9
-rw-r--r--macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx71
-rw-r--r--macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx2
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdfbin444398 -> 454611 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex4
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdfbin438985 -> 449239 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex16
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdfbin442828 -> 452978 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex4
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdfbin331535 -> 340523 bytes
-rw-r--r--macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex3
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls2
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls7
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls2
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cfg2
-rw-r--r--macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls2
42 files changed, 1998 insertions, 629 deletions
diff --git a/macros/latex/contrib/covington/README b/macros/latex/contrib/covington/README
index 327cb913a5..3a1ac7016a 100644
--- a/macros/latex/contrib/covington/README
+++ b/macros/latex/contrib/covington/README
@@ -31,6 +31,11 @@ The package consists of the following files:
== CHANGES ==
+* Version 2.7 (2021-09-01):
+ - Add postamble gloss macro option for arbitrary text that is appended to the free
+ translation line (after closing quotation marks).
+ - Add glosslinepostamble command to markup this text.
+
* Version 2.6 (2021-05-19):
- New length \exampleind to adjust (increase/decrease) the indentation (left margin)
of examples.
diff --git a/macros/latex/contrib/covington/covington.pdf b/macros/latex/contrib/covington/covington.pdf
index 5a56381da2..002771af5d 100644
--- a/macros/latex/contrib/covington/covington.pdf
+++ b/macros/latex/contrib/covington/covington.pdf
Binary files differ
diff --git a/macros/latex/contrib/covington/covington.sty b/macros/latex/contrib/covington/covington.sty
index 79601a2eba..687e496155 100644
--- a/macros/latex/contrib/covington/covington.sty
+++ b/macros/latex/contrib/covington/covington.sty
@@ -42,8 +42,8 @@
%%% Metadata
%%%
-\def\filedate{2021/05/19}
-\def\fileversion{2.6}
+\def\filedate{2021/09/01}
+\def\fileversion{2.7}
\def\filename{covington.sty}
% Force redefinition of environments?
@@ -413,6 +413,10 @@
\def\cov@glp{}
\newcommand*\glosspreamble[1]{\def\cov@glp{#1}}
+% 2021-09-01: optional trailing gloss text (non-interlinearized)
+\newcommand*\glosslinepostamble[1]{#1}
+\def\cov@glpst{}
+
\def\gll{% % Introduces 2-line text-and-gloss.
\begin{flushleft}
\vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
@@ -473,6 +477,7 @@
\def\glend{%
\end{flushleft}%
\def\cov@glp{}%
+ \def\cov@glpst{}%
} % Ends the gloss environment.
% The following TeX code is adapted, with permission, from:
@@ -719,6 +724,11 @@
\define@key{covington}{preamble}{\def\cov@lglp{#1}}
\define@key{gcovington}{preamble}{\def\cov@gglp{#1}}
%
+% 5. Gloss postamble text
+\def\cov@gglpst{}
+\define@key{covington}{postamble}{\def\cov@lglpst{#1}}
+\define@key{gcovington}{postamble}{\def\cov@gglpst{#1}}
+%
% General setting option
\newcommand*\setglossoptions[1]{\setkeys{gcovington}{#1}}
%
@@ -743,13 +753,16 @@
\@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
\@ifundefined{cov@lglp}{}{\def\cov@gglp{\cov@lglp}}%
\ifx\cov@gglp\empty\else\def\cov@glp{\cov@gglp}\fi%
+ \@ifundefined{cov@lglpst}{}{\def\cov@gglpst{\cov@lglpst}}%
+ \ifx\cov@gglpst\empty\else\def\cov@glpst{\cov@gglpst}\fi%
\xgll #2\xgle
#3\xgle
\ifgtright
- \gln #4
+ \gln #4%
\else
- \glot{#4}
+ \glot{#4}%
\fi
+ \ifx\cov@glpst\empty\else\glosslinepostamble{\cov@glpst}\cov@nopagebreak\fi%
\glend
\ifgexample
\end{covexample}
@@ -781,14 +794,17 @@
\@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
\@ifundefined{cov@lglp}{}{\def\cov@gglp{\cov@lglp}}%
\ifx\cov@gglp\empty\else\def\cov@glp{\cov@gglp}\fi%
+ \@ifundefined{cov@lglpst}{}{\def\cov@gglpst{\cov@lglpst}}%
+ \ifx\cov@gglpst\empty\else\def\cov@glpst{\cov@gglpst}\fi%
\xglll #2\xgle
#3\xgle
#4\xgle
\ifgtright
- \gln #5
+ \gln #5%
\else
- \glot{#5}
+ \glot{#5}%
\fi
+ \ifx\cov@glpst\empty\else\glosslinepostamble{\cov@glpst}\cov@nopagebreak\fi%
\glend
\ifgexample
\end{covexample}
diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex
index 74cc19f33d..5b99e5a73c 100644
--- a/macros/latex/contrib/covington/covington.tex
+++ b/macros/latex/contrib/covington/covington.tex
@@ -94,8 +94,8 @@
%
% Titling
%
-\def\pversion{Version 2.6}
-\def\pdate{May 19, 2021}
+\def\pversion{Version 2.7}
+\def\pdate{September 1, 2021}
\title{\textbf{The \cvt\ Package\\Macros for Linguistics}}
\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -565,12 +565,16 @@ Note that:
Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line
before the interlinearized gloss. This might be useful, for instance, to give context information,
- to specify the language or the source in case of cited glosses.
+ to specify the language or the source in case of cited glosses.
The advantages over just adding a line manually above the gloss are that you can globally set the
markup (see sec.~\ref{sec:glossfc}), and that such lines are kept on the same page than the gloss
with the option \joption{noglossbreaks} (at least as long as preamble does not exceed one line).
Furthermore, this option is the only way to add such text when the \joption{ex} option is used.
+
+ \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to the translation line, but after
+ the closing quotation mark. This might be useful to add a footnote or some additional text to the translation
+ line, after the actual translation.
\end{description}
%
If given as optional arguments to a \jcsmacro{digloss} or \jcsmacro{trigloss} macro, the options will only apply to
@@ -709,10 +713,16 @@ If not, a fallback quotation (using English single quotation marks) is used. The
The markup of the preamble line (which is not marked up at all by default) can be customized
by redefining the macro:
-\begin{lstlisting}[moretexcs={glosslinetrans,covenquote}]
+\begin{lstlisting}[moretexcs={glosslinepreamble}]
\newcommand*\glosslinepreamble[1]{#1}
\end{lstlisting}
+Analogously, the markup of the postamble text (which is not marked up at all by default either)
+can be customized by redefining the macro:
+\begin{lstlisting}[moretexcs={glosslinepostamble}]
+\newcommand*\glosslinepostamble[1]{#1}
+\end{lstlisting}
+
\subsection{Examples}\label{sec:glossex}
@@ -767,7 +777,7 @@ although you could also construct it manually as:
\end{example}
\end{lstlisting}
%
-And finally, an example that uses the \emph{Leipzig glossing rules} (\cite{leipzig},
+Here is an example that uses the \emph{Leipzig glossing rules} (\cite{leipzig},
cited example: p.~2) and also exemplifies the use of \joption{preamble}:
\digloss[ex, preamble={Lezgian (Haspelmath 1993:207)}]
{Gila abur-u-n ferma hami¨alu\v{g} gü\v{g}üna amuq'-da-\v{c}.}
@@ -786,6 +796,20 @@ Also, if you adhere to the \emph{Leipzig glossing rules}, you might want to chec
\LaTeX\ package \cite{leipzig-ltx} that facilitates the use of the gloss abbreviations that have
been entered and marked-up manually here.
+The final example exemplifies the use of \joption{postamble}. In what follows we add a footnote to the
+translation line, but outside the translation (as marked-up by quotation marks):
+\digloss[ex, postamble={\footnote{Yes, really!}}]
+{Mein Luftkissenboot ist voller Aale}
+{My hovercraft is {full of} eels}
+{Do you have matches?}
+This has been input as follows:
+\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily}]
+\digloss[ex, postamble={\footnote{Yes, really!}}]
+ {Mein Luftkissenboot ist voller Aale}
+ {My hovercraft is {full of} eels}
+ {Do you have matches?}
+\end{lstlisting}
+
\section{Phrase structure rules}
@@ -1104,6 +1128,14 @@ it.
\section{Release history}
+\subsection*{2.7 (2021 September 1)}
+
+\begin{itemize}
+\item Add \joption{postamble} gloss macro option for arbitrary text that is appended to the free
+ translation line (after closing quotation marks). See sec.~\ref{sec:gmacros}.
+\item Add \jcsmacro{glosslinepostamble} command to markup this text. See sec.~\ref{sec:glossfc}.
+\end{itemize}
+
\subsection*{2.6 (2021 May 19)}
\begin{itemize}
diff --git a/macros/latex/contrib/styledcmd/styledcmd.dtx b/macros/latex/contrib/styledcmd/styledcmd.dtx
index d09c077bb4..79da85718a 100644
--- a/macros/latex/contrib/styledcmd/styledcmd.dtx
+++ b/macros/latex/contrib/styledcmd/styledcmd.dtx
@@ -22,11 +22,11 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{styledcmd.dtx}[2021/08/20 1.0 Command with different styles]
+\ProvidesFile{styledcmd.dtx}[2021/08/20 1.1 Command with different styles]
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\RequirePackage{expl3}[2018-04-12]
-%<package>\ProvidesExplPackage{styledcmd}{2021/08/20}{1.0}{Command with different styles}
+%<package>\ProvidesExplPackage{styledcmd}{2021/08/20}{1.1}{Command with different styles}
%<package>\RequirePackage{xparse}
%<*driver>
\documentclass[full]{l3doc}
@@ -62,7 +62,7 @@
%
%\section{How do you use it?}
%You can create a formatted macro via the following command
-%\begin{function}{\newstyledcmd}
+%\begin{function}{\newstyledcmd, \renewstyledcmd, \providestyledcmd}
%\begin{syntax}
%|\newstyledcmd| \marg{macro name} \marg{format name} \oarg{number of arguments} \marg{code}
%\end{syntax}
@@ -79,7 +79,7 @@
% \saluto[informal]{uncle}
% \saluto[formal]{uncle}
%\end{verbatim}
-%will be expanded respectively as \saluto{uncle}, \saluto[informal]{uncle}, \saluto[formal]{uncle}.
+%will be expanded respectively as \saluto{uncle}, \saluto[informal]{uncle}, \saluto[formal]{uncle}. With the same syntax you can use \tn{renewstyledcmd} and \tn{providestyledcmd} with the same meaning of \tn{renewcommand} and \tn{providecommand} respectively.
%
%\section{How do you change the default style?}
%In order to change the default style (the one used when you don't choose explicitily a format) you need to execute the following command
@@ -95,7 +95,7 @@
%\section{Customize parameters with \pkg{xparse}}
%\thpkg{} loads automatically the \pkg{xparse} package for internal reasons. You can also define new styled commands with the same syntax used by \tn{NewDocumentCommand} with the following command
%
-%\begin{function}{\NewDocStyledCMD}
+%\begin{function}{\NewDocStyledCMD, \RenewDocStyledCMD, \ProvideDocStyledCMD}
%\begin{syntax}
%|\NewDocStyledCMD| \marg{command name} \marg{format name} \marg{arguments format} \marg{code}
%\end{syntax}
@@ -203,6 +203,28 @@
%
%You can also pass an optional argument for the style name you want to use, in particular \verb+\ciao[formal]{Enrico}+ will be always expanded as \ciao[formal]{Enrico}.
%
+%\section{Generate more styled commands}
+%Suppose now that you've created your own version of \tn{newcommand} or \tn{NewDocumentCommand} in order to generate some classes of commands. Suppose that your function name is \tn{mynewcommand} and it accepts, like \tn{newcommand}, the new macro as its first argument. Then you can create styled commands with your own macro by using this function
+%\begin{function}{\stycmd_generate:NN, \stycmd_generate_renew:NN}
+%\begin{syntax}
+%|\stycmd_generate:NN| \meta{new generator name} \meta{generator name}
+%\end{syntax}
+%\end{function}
+%So for example executing
+%\begin{verbatim}
+% \stycmd_generate:NN\mynewstyledcommand\mynewcommand
+%\end{verbatim}
+%you'll create the new macro \tn{mynewstyledcommand} that accepts the command you want to define as first argument, the style you want to use as second argument and the remaining arguments are the same needed by \tn{mynewcommand}.
+%
+%Notice that \tn{newstyledcmd} is defined internally as
+%\begin{verbatim}
+% \stycmd_generate:NN \newstyledcmd \newcommand
+%\end{verbatim}
+%
+%Notice that \tn{mynewcommand} first argument has to be the macro you want to define, otherwise \cs{stycmd_generate:NN} will have undefined behaviour. The \cs{stycmd_generate_renew:NN} function should be used only for ''renew`` type commands that requires a preceding declaration, like \tn{renewcommand} and \tn{RenewDocumentCommand}.
+%
+%Actually there isn't any analogue proceeding for defining customized versions for \tn{newGstyledcmd} and \tn{NewGDocStyledCMD}.
+%
%\end{documentation}
%
%\begin{implementation}
@@ -251,7 +273,7 @@
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\__stycmd_erroring:nn, \__stycmd_erroring:nV}
+%\begin{macro}{\__stycmd_erroring:nn, \__stycmd_erroring:nV, \__stycmd_erroring:VV}
%Error messages for undefined styles.
% \begin{macrocode}
\msg_new:nnn { stycmd } { noformat }
@@ -265,7 +287,7 @@
{ \msg_error:nnnn { stycmd } { noformat } {#1} {#2} }
}
-\cs_generate_variant:Nn \@@_erroring:nn { nV }
+\cs_generate_variant:Nn \@@_erroring:nn { nV, VV }
% \end{macrocode}
%\end{macro}
%
@@ -302,7 +324,7 @@
%\end{macro}
%
%\begin{macro}{\__stycmd_macro_overwrite:nn, \__stycmd_macro_overwrite:VV}
-%Overwrite the default style.
+%Overwrite the default style, not the command associated to that style.
% \begin{macrocode}
\cs_new_protected:Npn \@@_macro_overwrite:nn #1#2
{
@@ -354,38 +376,47 @@
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\newstyledcmd}
-%Declare a new macro with the specified style name.
+%\begin{macro}{\stycmd_generate:NN, \stycmd_generate_renew:NN}
+%Declare the styled version \verb+#1+ of the macro generator command \verb+#2+. the \verb+_renew+ variant requires a preceding declaration
% \begin{macrocode}
-\NewDocumentCommand \newstyledcmd { m m o +m }
+\cs_new_protected:Npn \stycmd_generate:NN #1#2
{
- \@@_init_vars:Nn { #1 } { #2 }
- \IfNoValueTF {#3}
+ \NewDocumentCommand #1 {m m}
{
- \exp_args:Nc \newcommand { \@@_cmd: } {#4}
+ \@@_init_vars:Nn { ##1 } { ##2 }
+ \@@_macro_default:VV \l_@@_cexp_str \l_@@_fexp_str
+ \@@_macro_declaration:V \l_@@_cexp_str
+ \exp_args:Nc #2 { \@@_cmd: }
}
+ }
+
+\cs_new_protected:Npn \stycmd_generate_renew:NN #1#2
+ {
+ \NewDocumentCommand #1 {m m}
{
- \exp_args:Nc \newcommand { \@@_cmd: } [#3] {#4}
+ \@@_init_vars:Nn { ##1 } { ##2 }
+ \@@_erroring:VV \l_@@_cexp_str \l_@@_fexp_str
+ \exp_args:Nc #2 { \@@_cmd: }
}
-
- \@@_macro_default:VV \l_@@_cexp_str \l_@@_fexp_str
- \@@_macro_declaration:V \l_@@_cexp_str
}
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\NewDocStyledCMD}
+%\begin{macro}{\newstyledcmd, \renewstyledcmd, \providestyledcmd}
+%Declare a new macro with the specified style name.
+% \begin{macrocode}
+\stycmd_generate:NN \newstyledcmd \newcommand
+\stycmd_generate_renew:NN \renewstyledcmd \renewcommand
+\stycmd_generate:NN \providestyledcmd \providecommand
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\NewDocStyledCMD, \RenewDocStyledCMD, \ProvideDocStyledCMD}
%Declare a new styled macro with the \tn{NewDocumentCommand} syntax.
% \begin{macrocode}
-\NewDocumentCommand \NewDocStyledCMD {m m m +m}
- {
- \@@_init_vars:Nn { #1 } { #2 }
-
- \exp_args:Nc \NewDocumentCommand { \@@_cmd: } {#3} {#4}
-
- \@@_macro_default:VV \l_@@_cexp_str \l_@@_fexp_str
- \@@_macro_declaration:V \l_@@_cexp_str
- }
+\stycmd_generate:NN \NewDocStyledCMD \NewDocumentCommand
+\stycmd_generate_renew:NN \RenewDocStyledCMD \RenewDocumentCommand
+\stycmd_generate:NN \ProvideDocStyledCMD \ProvideDocumentCommand
% \end{macrocode}
%\end{macro}
%
diff --git a/macros/latex/contrib/styledcmd/styledcmd.pdf b/macros/latex/contrib/styledcmd/styledcmd.pdf
index d552446b58..34d9942d43 100644
--- a/macros/latex/contrib/styledcmd/styledcmd.pdf
+++ b/macros/latex/contrib/styledcmd/styledcmd.pdf
Binary files differ
diff --git a/macros/latex/contrib/tabularray/tabularray-2021.sty b/macros/latex/contrib/tabularray/tabularray-2021.sty
index 90ddaadd34..8e5c2b9369 100644
--- a/macros/latex/contrib/tabularray/tabularray-2021.sty
+++ b/macros/latex/contrib/tabularray/tabularray-2021.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{tabularray}{2021-05-25}{2021J}
+\ProvidesExplPackage{tabularray}{2021-06-05}{2021K}
{Typeset tabulars and arrays with LaTeX3}
\RequirePackage{xparse}
@@ -97,60 +97,78 @@
\box_new:N \l__tblr_c_box % for cell box
\box_new:N \l__tblr_d_box
+%% Some counters for row and column numbering
+\newcounter{rownum}
+\newcounter{colnum}
+\newcounter{rowcount}
+\newcounter{colcount}
+
%%% --------------------------------------------------------
%% \section{Data Structures Based on Property Lists}
%%% --------------------------------------------------------
\int_new:N \g_tblr_level_int % store table nesting level
+\cs_new_protected:Npn \__tblr_clear_prop_lists:
+ {
+ \prop_gclear_new:c { g__tblr_text_ \int_use:N \g_tblr_level_int _prop }
+ \prop_gclear_new:c { g__tblr_command_ \int_use:N \g_tblr_level_int _prop }
+ \prop_gclear_new:c { g__tblr_table_ \int_use:N \g_tblr_level_int _prop }
+ \prop_gclear_new:c { g__tblr_row_ \int_use:N \g_tblr_level_int _prop }
+ \prop_gclear_new:c { g__tblr_column_ \int_use:N \g_tblr_level_int _prop }
+ \prop_gclear_new:c { g__tblr_cell_ \int_use:N \g_tblr_level_int _prop }
+ \prop_gclear_new:c { g__tblr_hline_ \int_use:N \g_tblr_level_int _prop }
+ \prop_gclear_new:c { g__tblr_vline_ \int_use:N \g_tblr_level_int _prop }
+ }
+
\cs_new_protected:Npn \__tblr_prop_gput:nnn #1 #2 #3
{
\prop_gput:cnn
- { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 } { #3 }
+ { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 } { #3 }
}
\cs_generate_variant:Nn \__tblr_prop_gput:nnn { nnx, nnV, nxn, nxx, nxV }
\cs_new:Npn \__tblr_prop_item:nn #1 #2
{
- \prop_item:cn { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 }
+ \prop_item:cn { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 }
}
\cs_generate_variant:Nn \__tblr_prop_item:nn { ne }
\cs_new_protected:Npn \__tblr_prop_if_in:nnT #1
{
- \prop_if_in:cnT { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop }
+ \prop_if_in:cnT { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop }
}
\cs_new_protected:Npn \__tblr_prop_if_in:nnF #1
{
- \prop_if_in:cnF { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop }
+ \prop_if_in:cnF { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop }
}
\cs_new_protected:Npn \__tblr_prop_if_in:nnTF #1
{
- \prop_if_in:cnTF { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop }
+ \prop_if_in:cnTF { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop }
}
\prg_generate_conditional_variant:Nnn \__tblr_prop_if_in:nn { nx } { T, F, TF }
\cs_new_protected:Npn \__tblr_prop_log:n #1
{
- \prop_log:c { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop }
+ \prop_log:c { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop }
}
\cs_new_protected:Npn \__tblr_prop_map_inline:nn #1 #2
{
- \prop_map_inline:cn { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop } {#2}
+ \prop_map_inline:cn { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop } {#2}
}
\cs_new_protected:Npn \__tblr_prop_gput_if_larger:nnn #1 #2 #3
{
\__tblr_gput_if_larger:cnn
- { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 } { #3 }
+ { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 } { #3 }
}
\cs_generate_variant:Nn \__tblr_prop_gput_if_larger:nnn { nnx, nnV, nxn, nxx, nxV }
\cs_new_protected:Npn \__tblr_prop_gadd_dimen_value:nnn #1 #2 #3
{
\__tblr_gadd_dimen_value:cnn
- { g_tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 } { #3 }
+ { g__tblr_#1_ \int_use:N \g_tblr_level_int _prop } { #2 } { #3 }
}
\cs_generate_variant:Nn \__tblr_prop_gadd_dimen_value:nnn { nnx, nnV, nxn, nxx }
@@ -193,27 +211,90 @@
}
\cs_generate_variant:Nn \__tblr_gadd_dimen_value:Nnn { cnn }
-%% Some counters for row and column numbering
-\newcounter{rownum}
-\newcounter{colnum}
-\newcounter{rowcount}
-\newcounter{colcount}
+%%% --------------------------------------------------------
+%% \section{Data Structures Based on Token Lists}
+%%% --------------------------------------------------------
+
+\cs_new_protected:Npn \__tblr_clear_text_lists:
+ {
+ \__tblr_clear_one_text_lists:n { text }
+ \__tblr_clear_one_text_lists:n { hline }
+ \__tblr_clear_one_text_lists:n { vline }
+ }
+
+\cs_new_protected:Npn \__tblr_clear_one_text_lists:n #1
+ {
+ \clist_if_exist:cTF { g__tblr_#1_ \int_use:N \g_tblr_level_int _clist }
+ {
+ \clist_map_inline:cn { g__tblr_#1_ \int_use:N \g_tblr_level_int _clist }
+ {
+ \tl_gclear:c { g__tblr_text_ \int_use:N \g_tblr_level_int _#1_##1_tl }
+ }
+ }
+ { \clist_new:c { g__tblr_#1_ \int_use:N \g_tblr_level_int _clist } }
+ }
+
+\cs_new_protected:Npn \__tblr_text_gput:nnn #1 #2 #3
+ {
+ \tl_gset:cn
+ { g__tblr_text_ \int_use:N \g_tblr_level_int _#1_#2_tl } {#3}
+ \clist_gput_right:cx { g__tblr_#1_ \int_use:N \g_tblr_level_int _clist } {#2}
+ }
+\cs_generate_variant:Nn \__tblr_text_gput:nnn { nne, nnV, nen, nee, neV }
+
+\cs_new:Npn \__tblr_text_item:nn #1 #2
+ {
+ \tl_if_exist:cT { g__tblr_text_ \int_use:N \g_tblr_level_int _#1_#2_tl }
+ {
+ \exp_args:Nv \exp_not:n
+ { g__tblr_text_ \int_use:N \g_tblr_level_int _#1_#2_tl }
+ }
+ }
+\cs_generate_variant:Nn \__tblr_text_item:nn { ne }
+
+\cs_new_protected:Npn \__tblr_text_gput_if_larger:nnn #1 #2 #3
+ {
+ \tl_set:Nx \l__tblr_put_if_larger_tl { \__tblr_text_item:nn {#1} {#2} }
+ \bool_lazy_or:nnT
+ { \tl_if_empty_p:N \l__tblr_put_if_larger_tl }
+ { \dim_compare_p:nNn {#3} > { \l__tblr_put_if_larger_tl } }
+ { \__tblr_text_gput:nnn {#1} {#2} {#3} }
+ }
+\cs_generate_variant:Nn \__tblr_text_gput_if_larger:nnn { nne, nnV, nen, nee, neV }
+
+\cs_new_protected:Npn \__tblr_text_log:n #1
+ {
+ \clist_gremove_duplicates:c
+ { g__tblr_#1_ \int_use:N \g_tblr_level_int _clist }
+ \tl_log:n { ----------~----------~----------~----------~---------- }
+ \clist_map_inline:cn { g__tblr_#1_ \int_use:N \g_tblr_level_int _clist }
+ {
+ \tl_log:x
+ {
+ \space { #1 ##1 } ~\space=>~\space { \__tblr_text_item:nn {#1} {##1} }
+ }
+ }
+ }
%%% --------------------------------------------------------
%% \section{Data Structures Based on Integer Arrays}
%%% --------------------------------------------------------
-\int_new:N \g__tblr_array_int
+\msg_new:nnn { tabularray } { intarray-beyond-bound }
+ { Position ~ #2 ~ is ~ beyond ~ the ~ bound ~ of ~ intarray ~ #1.}
-\cs_new_protected:Npn \__tblr_initial_table_data:
+\cs_new_protected:Npn \__tblr_intarray_gset:Nnn #1 #2 #3
{
- \int_gincr:N \g__tblr_array_int
- \intarray_new:cn { g__tblr_row_ \int_use:N \g__tblr_array_int _intarray }
- { \g__tblr_data_row_key_count_int * \c@rowcount }
- \cs_set_eq:cc { g__tblr_row_ \int_use:N \g_tblr_level_int _intarray }
- { g__tblr_row_ \int_use:N \g__tblr_array_int _intarray }
- %\intarray_log:c { g__tblr_row_ \int_use:N \g_tblr_level_int _intarray }
+ \bool_lazy_or:nnTF
+ { \int_compare_p:nNn {#2} < {0} }
+ { \int_compare_p:nNn {#2} > {\intarray_count:N #1} }
+ {
+ \bool_if:NT \g__tblr_tracing_intarray_bool
+ { \msg_warning:nnnn { tabularray } { intarray-beyond-bound } {#1} {#2} }
+ }
+ { \intarray_gset:Nnn #1 {#2} {#3} }
}
+\cs_generate_variant:Nn \__tblr_intarray_gset:Nnn { cnn }
%% #1: data name; #2: key name; #3: value type
\cs_new_protected:Npn \__tblr_data_new_key:nnn #1 #2 #3
@@ -231,7 +312,6 @@
}
\int_new:N \g__tblr_data_row_key_count_int
-
\__tblr_data_new_key:nnn { row } { height } { dim }
\__tblr_data_new_key:nnn { row } { coefficient } { dec }
\__tblr_data_new_key:nnn { row } { abovesep } { dim }
@@ -242,6 +322,52 @@
\__tblr_data_new_key:nnn { row } { @row-upper } { dim }
\__tblr_data_new_key:nnn { row } { @row-lower } { dim }
+\int_new:N \g__tblr_data_column_key_count_int
+\__tblr_data_new_key:nnn { column } { width } { dim }
+\__tblr_data_new_key:nnn { column } { coefficient } { dec }
+\__tblr_data_new_key:nnn { column } { leftsep } { dim }
+\__tblr_data_new_key:nnn { column } { rightsep } { dim }
+\__tblr_data_new_key:nnn { column } { @col-width } { dim }
+
+\int_new:N \g__tblr_data_cell_key_count_int
+\__tblr_data_new_key:nnn { cell } { width } { dim }
+\__tblr_data_new_key:nnn { cell } { rowspan } { int }
+\__tblr_data_new_key:nnn { cell } { colspan } { int }
+\__tblr_data_new_key:nnn { cell } { halign } { str }
+\__tblr_data_new_key:nnn { cell } { valign } { str }
+\__tblr_data_new_key:nnn { cell } { background } { str }
+\__tblr_data_new_key:nnn { cell } { omit } { int }
+\__tblr_data_new_key:nnn { cell } { @cell-width } { dim }
+\__tblr_data_new_key:nnn { cell } { @cell-height } { dim }
+\__tblr_data_new_key:nnn { cell } { @cell-depth } { dim }
+
+\clist_const:Nn \g__tblr_data_clist { row, column, cell }
+\tl_const:Nn \g__tblr_data_row_count_tl { \c@rowcount }
+\tl_const:Nn \g__tblr_data_column_count_tl { \c@colcount }
+\tl_const:Nn \g__tblr_data_cell_count_tl { \c@rowcount * \c@colcount }
+\tl_const:Nn \g__tblr_data_row_index_number_tl {1}
+\tl_const:Nn \g__tblr_data_column_index_number_tl {1}
+\tl_const:Nn \g__tblr_data_cell_index_number_tl {2}
+\int_new:N \g__tblr_array_int
+
+\cs_new_protected:Npn \__tblr_initial_table_data:
+ {
+ \clist_map_function:NN \g__tblr_data_clist \__tblr_initial_one_data:n
+ }
+
+\cs_new_protected:Npn \__tblr_initial_one_data:n #1
+ {
+ \int_gincr:N \g__tblr_array_int
+ \intarray_new:cn { g__tblr_#1_ \int_use:N \g__tblr_array_int _intarray }
+ {
+ \int_use:c { g__tblr_data_#1_key_count_int }
+ * \tl_use:c { g__tblr_data_#1_count_tl }
+ }
+ \cs_set_eq:cc { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
+ { g__tblr_#1_ \int_use:N \g__tblr_array_int _intarray }
+ %\intarray_log:c { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
+ }
+
%% #1: data name; #2: data index; #3: key name
\cs_new:Npn \__tblr_data_key_to_int:nnn #1 #2 #3
{
@@ -249,8 +375,17 @@
+ \tl_use:c { g__tblr_data_#1_key_number_#3_tl }
}
+%% #1: data name; #2: data index 1; #3: data index 2; #4: key name
+\cs_new:Npn \__tblr_data_key_to_int:nnnn #1 #2 #3 #4
+ {
+ ( #2 - 1 ) * \c@colcount * \int_use:c { g__tblr_data_#1_key_count_int }
+ + ( #3 - 1 ) * \int_use:c { g__tblr_data_#1_key_count_int }
+ + \tl_use:c { g__tblr_data_#1_key_number_#4_tl }
+ }
+
\int_new:N \l__tblr_key_count_int
\int_new:N \l__tblr_key_quotient_int
+\int_new:N \l__tblr_key_quotient_two_int
\int_new:N \l__tblr_key_remainder_int
%% #1: data name; #2: array position;
@@ -275,11 +410,50 @@
{ g__tblr_data_#1_key_name_ \int_use:N \l__tblr_key_remainder_int _tl }
}
+%% #1: data name; #2: array position;
+%% #3: returning tl with index 1; #4: returning tl with index 2;
+%% #5: returning tl with key name
+\cs_new:Npn \__tblr_data_int_to_key:nnNNN #1 #2 #3 #4 #5
+ {
+ \int_set_eq:Nc \l__tblr_key_count_int { g__tblr_data_#1_key_count_int }
+ \int_set:Nn \l__tblr_key_quotient_int
+ {
+ \int_div_truncate:nn
+ { #2 + \l__tblr_key_count_int - 1 } { \l__tblr_key_count_int }
+ }
+ \int_set:Nn \l__tblr_key_remainder_int
+ {
+ #2 + \l__tblr_key_count_int
+ - \l__tblr_key_quotient_int * \l__tblr_key_count_int
+ }
+ \int_compare:nNnT { \l__tblr_key_remainder_int } = { 0 }
+ { \int_set_eq:NN \l__tblr_key_remainder_int \l__tblr_key_count_int }
+ \tl_set_eq:Nc #5
+ { g__tblr_data_#1_key_name_ \int_use:N \l__tblr_key_remainder_int _tl }
+ \int_set:Nn \l__tblr_key_quotient_two_int
+ {
+ \int_div_truncate:nn
+ { \l__tblr_key_quotient_int + \c@colcount - 1 } { \c@colcount }
+ }
+ \int_set:Nn \l__tblr_key_remainder_int
+ {
+ \l__tblr_key_quotient_int + \c@colcount
+ - \l__tblr_key_quotient_two_int * \c@colcount
+ }
+ \int_compare:nNnT { \l__tblr_key_remainder_int } = { 0 }
+ { \int_set_eq:NN \l__tblr_key_remainder_int \c@colcount }
+ \tl_set:Nx #4 { \int_use:N \l__tblr_key_remainder_int }
+ \tl_set:Nx #3 { \int_use:N \l__tblr_key_quotient_two_int }
+ }
+
+\tl_new:N \g__tblr_data_int_from_value_tl
+
%% #1: data name; #2: key name; #3: value
-\cs_new:Npn \__tblr_data_value_to_int:nnn #1 #2 #3
+%% The result will be stored in \g__tblr_data_int_from_value_tl
+\cs_new_protected:Npn \__tblr_data_int_from_value:nnn #1 #2 #3
{
\cs:w
- __tblr_data_ \tl_use:c { g__tblr_data_#1_key_type_#2_tl } _to_int:n
+ __tblr_data_int_from_ \tl_use:c { g__tblr_data_#1_key_type_#2_tl } :n
\cs_end:
{#3}
}
@@ -294,9 +468,19 @@
}
\cs_generate_variant:Nn \__tblr_data_int_to_value:nnn { nne, nVe }
-\cs_new:Npn \__tblr_data_dim_to_int:n #1
+\cs_new_protected:Npn \__tblr_data_int_from_int:n #1
{
- \dim_to_decimal_in_sp:n {#1}
+ \tl_gset:Nn \g__tblr_data_int_from_value_tl {#1}
+ }
+
+\cs_new:Npn \__tblr_data_int_to_int:n #1
+ {
+ #1
+ }
+
+\cs_new_protected:Npn \__tblr_data_int_from_dim:n #1
+ {
+ \tl_gset:Nx \g__tblr_data_int_from_value_tl { \dim_to_decimal_in_sp:n {#1} }
}
%% Return a dimension in pt so that it's easier to understand in tracing messages
@@ -307,9 +491,10 @@
\dim_to_decimal:n { #1 sp } pt
}
-\cs_new:Npn \__tblr_data_dec_to_int:n #1
+\cs_new_protected:Npn \__tblr_data_int_from_dec:n #1
{
- \dim_to_decimal_in_sp:n {#1 pt}
+ \tl_gset:Nx \g__tblr_data_int_from_value_tl
+ { \dim_to_decimal_in_sp:n {#1 pt} }
}
\cs_new:Npn \__tblr_data_int_to_dec:n #1
@@ -317,17 +502,57 @@
\dim_to_decimal:n {#1 sp}
}
+\int_new:N \g__tblr_data_str_value_count_int
+\tl_set:cn { g__tblr_data_0_to_str_tl } { }
+
+\cs_new_protected:Npn \__tblr_data_int_from_str:n #1
+ {
+ \tl_if_exist:cTF { g__tblr_data_#1_to_int_tl }
+ {
+ \tl_gset_eq:Nc \g__tblr_data_int_from_value_tl
+ { g__tblr_data_#1_to_int_tl }
+ }
+ {
+ \int_gincr:N \g__tblr_data_str_value_count_int
+ \tl_gset:cx { g__tblr_data_#1_to_int_tl }
+ { \int_use:N \g__tblr_data_str_value_count_int }
+ \tl_gset:cx
+ { g__tblr_data_ \int_use:N \g__tblr_data_str_value_count_int _to_str_tl }
+ { #1 }
+ \tl_gset:Nx \g__tblr_data_int_from_value_tl
+ { \int_use:N \g__tblr_data_str_value_count_int }
+ }
+ }
+
+\cs_new:Npn \__tblr_data_int_to_str:n #1
+ {
+ \tl_use:c { g__tblr_data_#1_to_str_tl }
+ }
+
%% #1: data name; #2: data index; #3: key; #4: value
\cs_new_protected:Npn \__tblr_data_gput:nnnn #1 #2 #3 #4
{
- \intarray_gset:cnn
+ \__tblr_data_int_from_value:nnn {#1} {#3} {#4}
+ \__tblr_intarray_gset:cnn
{ g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
{ \__tblr_data_key_to_int:nnn {#1} {#2} {#3} }
- { \__tblr_data_value_to_int:nnn {#1} {#3} {#4} }
+ { \g__tblr_data_int_from_value_tl }
}
\cs_generate_variant:Nn \__tblr_data_gput:nnnn
{ nnne, nnnV, nenn, nene, nenV, nVnn }
+%% #1: data name; #2: data index 1; #3: data index 2; #4: key; #5: value
+\cs_new_protected:Npn \__tblr_data_gput:nnnnn #1 #2 #3 #4 #5
+ {
+ \__tblr_data_int_from_value:nnn {#1} {#4} {#5}
+ \__tblr_intarray_gset:cnn
+ { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
+ { \__tblr_data_key_to_int:nnnn {#1} {#2} {#3} {#4} }
+ { \g__tblr_data_int_from_value_tl }
+ }
+\cs_generate_variant:Nn \__tblr_data_gput:nnnnn
+ { nnnne, nnnnV, neenn, neene, neenV, neeen, nVVnn }
+
%% #1: data name; #2: data index; #3: key
\cs_new:Npn \__tblr_data_item:nnn #1 #2 #3
{
@@ -339,13 +564,32 @@
}
\cs_generate_variant:Nn \__tblr_data_item:nnn { nen }
+%% #1: data name; #2: data index 1; #3: data index 2; #4: key
+\cs_new:Npn \__tblr_data_item:nnnn #1 #2 #3 #4
+ {
+ \__tblr_data_int_to_value:nne {#1} {#4}
+ {
+ \intarray_item:cn { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
+ { \__tblr_data_key_to_int:nnnn {#1} {#2} {#3} {#4} }
+ }
+ }
+\cs_generate_variant:Nn \__tblr_data_item:nnnn { neen }
+
\tl_new:N \l__tblr_data_key_tl
\tl_new:N \l__tblr_data_index_tl
+\tl_new:N \l__tblr_data_index_two_tl
\cs_new_protected:Npn \__tblr_data_log:n #1
{
+ \use:c { __tblr_data_log_ \use:c { g__tblr_data_#1_index_number_tl } :n } {#1}
+ \__tblr_prop_log:n {#1}
+ }
+
+\cs_new_protected:cpn { __tblr_data_log_1:n } #1
+ {
%\intarray_log:c { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
\tl_set:Nx \l_tmpa_tl { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
+ \tl_log:n { ----------~----------~----------~----------~---------- }
\int_step_inline:nn
{ \intarray_count:c { \l_tmpa_tl } }
{
@@ -353,52 +597,80 @@
\l__tblr_data_index_tl \l__tblr_data_key_tl
\tl_log:x
{
+ \space
{ #1 [\l__tblr_data_index_tl] / \l__tblr_data_key_tl }
- \space = \space
+ ~\space => ~\space
+ {
+ \__tblr_data_int_to_value:nVe {#1} \l__tblr_data_key_tl
+ { \intarray_item:cn { \l_tmpa_tl } {##1} }
+ }
+ }
+ }
+ }
+
+\cs_new_protected:cpn { __tblr_data_log_2:n } #1
+ {
+ %\intarray_log:c { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
+ \tl_set:Nx \l_tmpa_tl { g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
+ \tl_log:n { ----------~----------~----------~----------~---------- }
+ \int_step_inline:nn
+ { \intarray_count:c { \l_tmpa_tl } }
+ {
+ \__tblr_data_int_to_key:nnNNN {#1} {##1}
+ \l__tblr_data_index_tl \l__tblr_data_index_two_tl \l__tblr_data_key_tl
+ \tl_log:x
+ {
+ \space
+ {
+ #1 [\l__tblr_data_index_tl][\l__tblr_data_index_two_tl]
+ / \l__tblr_data_key_tl
+ }
+ ~\space => ~\space
{
\__tblr_data_int_to_value:nVe {#1} \l__tblr_data_key_tl
{ \intarray_item:cn { \l_tmpa_tl } {##1} }
}
}
}
- \__tblr_prop_log:n {#1}
}
%% #1: data name; #2: row index; #3: key; #4: value
\cs_new_protected:Npn \__tblr_data_gput_if_larger:nnnn #1 #2 #3 #4
{
+ \__tblr_data_int_from_value:nnn {#1} {#3} {#4}
\__tblr_array_gput_if_larger:cnn
{ g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
{ \__tblr_data_key_to_int:nnn {#1} {#2} {#3} }
- { \__tblr_data_value_to_int:nnn {#1} {#3} {#4} }
+ { \g__tblr_data_int_from_value_tl }
}
\cs_generate_variant:Nn \__tblr_data_gput_if_larger:nnnn { nnne, nnnV, nene, nenV }
\cs_new_protected:Npn \__tblr_array_gput_if_larger:Nnn #1 #2 #3
{
\int_compare:nNnT {#3} > { \intarray_item:Nn #1 {#2} }
- { \intarray_gset:Nnn #1 {#2} {#3} }
+ { \__tblr_intarray_gset:Nnn #1 {#2} {#3} }
}
\cs_generate_variant:Nn \__tblr_array_gput_if_larger:Nnn { cnn }
%% #1: data name; #2: data index; #3: key; #4: value
\cs_new_protected:Npn \__tblr_data_gadd_dimen_value:nnnn #1 #2 #3 #4
{
+ \__tblr_data_int_from_value:nnn {#1} {#3} {#4}
\__tblr_array_gadd_value:cnn
{ g__tblr_#1_ \int_use:N \g_tblr_level_int _intarray }
{ \__tblr_data_key_to_int:nnn {#1} {#2} {#3} }
- { \__tblr_data_value_to_int:nnn {#1} {#3} {#4} }
+ { \g__tblr_data_int_from_value_tl }
}
\cs_generate_variant:Nn \__tblr_data_gadd_dimen_value:nnnn { nnne, nnnV, nene }
\cs_new_protected:Npn \__tblr_array_gadd_value:Nnn #1 #2 #3
{
- \intarray_gset:Nnn #1 {#2} { \intarray_item:Nn #1 {#2} + #3 }
+ \__tblr_intarray_gset:Nnn #1 {#2} { \intarray_item:Nn #1 {#2} + #3 }
}
\cs_generate_variant:Nn \__tblr_array_gadd_value:Nnn { cnn }
\bool_new:N \g__tblr_use_intarray_bool
-%\bool_set_true:N \g__tblr_use_intarray_bool
+\bool_set_true:N \g__tblr_use_intarray_bool
\AtBeginDocument
{
@@ -408,10 +680,18 @@
{
\__tblr_prop_gput:nnn {#1} { [#2] / #3 } {#4}
}
+ \cs_set_protected:Npn \__tblr_data_gput:nnnnn #1 #2 #3 #4 #5
+ {
+ \__tblr_prop_gput:nnn {#1} { [#2][#3] / #4 } {#5}
+ }
\cs_set:Npn \__tblr_data_item:nnn #1 #2 #3
{
\__tblr_prop_item:nn {#1} { [#2] / #3 }
}
+ \cs_set:Npn \__tblr_data_item:nnnn #1 #2 #3 #4
+ {
+ \__tblr_prop_item:nn {#1} { [#2][#3] / #4 }
+ }
\cs_set_protected:Npn \__tblr_data_log:n #1
{
\__tblr_prop_log:n {#1}
@@ -420,10 +700,18 @@
{
\__tblr_prop_gput_if_larger:nnn {#1} { [#2] / #3 } {#4}
}
+ \cs_set_protected:Npn \__tblr_data_gput_if_larger:nnnnn #1 #2 #3 #4 #5
+ {
+ \__tblr_prop_gput_if_larger:nnn {#1} { [#2][#3] / #4 } {#5}
+ }
\cs_set_protected:Npn \__tblr_data_gadd_dimen_value:nnnn #1 #2 #3 #4
{
\__tblr_prop_gadd_dimen_value:nnn {#1} { [#2] / #3 } {#4}
}
+ \cs_set_protected:Npn \__tblr_data_gadd_dimen_value:nnnnn #1 #2 #3 #4 #5
+ {
+ \__tblr_prop_gadd_dimen_value:nnn {#1} { [#2][#3] / #4 } {#5}
+ }
}
}
@@ -490,7 +778,6 @@
\regex_const:Nn \c__tblr_split_selector_name_regex { ^ ( [A-Za-z] {2,} ) ( . * ) }
\seq_new:N \l__tblr_childs_split_seq
\seq_new:N \l__tblr_childs_regex_seq
-\tl_new:N \l__tblr_childs_end_tl
\tl_new:N \l__tblr_childs_selector_tl
%% #1, child specifications; #2, total number.
@@ -524,15 +811,16 @@
{
\seq_set_split:Nnn \l__tblr_childs_split_seq {,} {#1}
\seq_map_inline:Nn \l__tblr_childs_split_seq
- { \__tblr_get_childs_normal_aux:w ##1 - s \scan_stop }
+ {
+ \tl_if_in:nnTF {##1} {-}
+ { \__tblr_get_childs_normal_aux:w ##1 \scan_stop }
+ { \__tblr_get_childs_normal_aux:w ##1 - ##1 \scan_stop }
+ }
}
-\cs_new_protected_nopar:Npn \__tblr_get_childs_normal_aux:w #1 - #2 #3 \scan_stop
+\cs_new_protected_nopar:Npn \__tblr_get_childs_normal_aux:w #1 - #2 \scan_stop
{
- \tl_if_eq:nnTF {#2} {s}
- { \tl_set:Nn \l__tblr_childs_end_tl {#1} }
- { \tl_set:Nn \l__tblr_childs_end_tl {#2} }
- \int_step_inline:nnn {#1} { \l__tblr_childs_end_tl }
+ \int_step_inline:nnn {#1} {#2}
{ \clist_put_right:Nn \l_tblr_childs_clist {##1} }
}
@@ -780,11 +1068,12 @@
{
\tl_clear:N \l__tblr_hline_num_tl
\tl_set:Nx \l__tblr_hline_count_tl
- { \__tblr_prop_item:ne { hline } { [\int_use:N \c@rownum] / @hline-count } }
- \tl_if_empty:NTF \l__tblr_hline_count_tl
+ { \__tblr_text_item:ne { hline } { [\int_use:N \c@rownum] / @hline-count } }
+ %% \l__tblr_hline_count_tl may be empty when rowspec has extra |'s
+ \int_compare:nNnTF { \l__tblr_hline_count_tl + 0 } = {0}
{
\tl_set:Nx \l__tblr_hline_num_tl { 1 }
- \__tblr_prop_gput:nxx { hline }
+ \__tblr_text_gput:nen { hline }
{ [\int_use:N \c@rownum] / @hline-count } { 1 }
}
{
@@ -806,7 +1095,7 @@
{
\tl_set:Nx \l__tblr_hline_count_tl
{ \int_eval:n { \l__tblr_hline_count_tl + 1 } }
- \__tblr_prop_gput:nxx { hline }
+ \__tblr_text_gput:nee { hline }
{ [\int_use:N \c@rownum] / @hline-count } { \l__tblr_hline_count_tl }
\tl_set_eq:NN \l__tblr_hline_num_tl \l__tblr_hline_count_tl
}
@@ -842,18 +1131,18 @@
\__tblr_get_childs:nx {#1} { \int_use:N \c@colcount }
\clist_map_inline:Nn \l_tblr_childs_clist
{
- \__tblr_prop_gput:nxx { hline }
+ \__tblr_text_gput:nee { hline }
{ [\int_use:N \c@rownum][##1](\l__tblr_hline_num_tl) / @dash }
{ \l__tblr_hline_dash_tl }
\tl_if_empty:NF \l__tblr_hline_wd_tl
{
- \__tblr_prop_gput:nxx { hline }
+ \__tblr_text_gput:nee { hline }
{ [\int_use:N \c@rownum][##1](\l__tblr_hline_num_tl) / wd }
{ \l__tblr_hline_wd_tl }
}
\tl_if_empty:NF \l__tblr_hline_fg_tl
{
- \__tblr_prop_gput:nxx { hline }
+ \__tblr_text_gput:nee { hline }
{ [\int_use:N \c@rownum][##1](\l__tblr_hline_num_tl) / fg }
{ \l__tblr_hline_fg_tl }
}
@@ -978,11 +1267,12 @@
{
\tl_clear:N \l__tblr_vline_num_tl
\tl_set:Nx \l__tblr_vline_count_tl
- { \__tblr_prop_item:ne { vline } { [\int_use:N \c@colnum] / @vline-count } }
- \tl_if_empty:NTF \l__tblr_vline_count_tl
+ { \__tblr_text_item:ne { vline } { [\int_use:N \c@colnum] / @vline-count } }
+ %% \l__tblr_vline_count_tl may be empty when colspec has extra |'s
+ \int_compare:nNnTF { \l__tblr_vline_count_tl + 0 } = {0}
{
\tl_set:Nx \l__tblr_vline_num_tl { 1 }
- \__tblr_prop_gput:nxx { vline }
+ \__tblr_text_gput:nen { vline }
{ [\int_use:N \c@colnum] / @vline-count } { 1 }
}
{
@@ -1004,7 +1294,7 @@
{
\tl_set:Nx \l__tblr_vline_count_tl
{ \int_eval:n { \l__tblr_vline_count_tl + 1 } }
- \__tblr_prop_gput:nxx { vline }
+ \__tblr_text_gput:nee { vline }
{ [\int_use:N \c@colnum] / @vline-count } { \l__tblr_vline_count_tl }
\tl_set_eq:NN \l__tblr_vline_num_tl \l__tblr_vline_count_tl
}
@@ -1039,18 +1329,18 @@
\__tblr_get_childs:nx {#1} { \int_use:N \c@rowcount }
\clist_map_inline:Nn \l_tblr_childs_clist
{
- \__tblr_prop_gput:nxx { vline }
+ \__tblr_text_gput:nee { vline }
{ [##1][\int_use:N \c@colnum](\l__tblr_vline_num_tl) / @dash }
{ \l__tblr_vline_dash_tl }
\tl_if_empty:NF \l__tblr_vline_wd_tl
{
- \__tblr_prop_gput:nxx { vline }
+ \__tblr_text_gput:nee { vline }
{ [##1][\int_use:N \c@colnum](\l__tblr_vline_num_tl) / wd }
{ \l__tblr_vline_wd_tl }
}
\tl_if_empty:NF \l__tblr_vline_fg_tl
{
- \__tblr_prop_gput:nxx { vline }
+ \__tblr_text_gput:nee { vline }
{ [##1][\int_use:N \c@colnum](\l__tblr_vline_num_tl) / fg }
{ \l__tblr_vline_fg_tl }
}
@@ -1150,42 +1440,77 @@
\keys_define:nn { tblr-cell-spec }
{
- l .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / halign} {l},
- c .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / halign} {c},
- r .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / halign} {r},
- t .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / valign} {t},
- p .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / valign} {t},
- m .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / valign} {m},
- b .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / valign} {b},
- h .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / valign} {h},
- f .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / valign} {f},
- wd .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / width} {#1},
- bg .code:n = \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / background} {#1},
+ l .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { halign } {l},
+ c .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { halign } {c},
+ r .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { halign } {r},
+ t .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { valign} {t},
+ p .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { valign} {t},
+ m .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { valign} {m},
+ b .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { valign} {b},
+ h .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { valign} {h},
+ f .code:n = \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { valign} {f},
+ wd .code:n = \__tblr_data_gput:neene { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { width } {#1},
+ bg .code:n = \__tblr_data_gput:neene { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum }
+ { background } {#1},
+ preto .code:n = \__tblr_cell_preto_text:n {#1},
+ appto .code:n = \__tblr_cell_appto_text:n {#1},
+ fg .code:n = \__tblr_cell_preto_text:n { \color{#1} },
+ font .code:n = \__tblr_cell_preto_text:n { #1 \selectfont },
unknown .code:n = \__tblr_cell_unknown_key:V \l_keys_key_str,
}
+\tl_new:N \l__tblr_cell_text_tl
+
+\cs_new_protected:Npn \__tblr_cell_preto_text:n #1
+ {
+ \__tblr_cell_preto_text:een
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } {#1}
+ }
+
+\cs_new_protected:Npn \__tblr_cell_preto_text:nnn #1 #2 #3
+ {
+ \tl_set:Nx \l__tblr_cell_text_tl { \__tblr_text_item:nn { text } { [#1][#2] } }
+ \tl_put_left:Nn \l__tblr_cell_text_tl {#3}
+ \__tblr_text_gput:nnV { text } { [#1][#2] } \l__tblr_cell_text_tl
+ }
+\cs_generate_variant:Nn \__tblr_cell_preto_text:nnn { nen, enn, een }
+
+\cs_new_protected:Npn \__tblr_cell_appto_text:n #1
+ {
+ \__tblr_cell_appto_text:een
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } {#1}
+ }
+
+\cs_new_protected:Npn \__tblr_cell_appto_text:nnn #1 #2 #3
+ {
+ \tl_set:Nx \l__tblr_cell_text_tl { \__tblr_text_item:ne { text } { [#1][#2] } }
+ \tl_put_right:Nn \l__tblr_cell_text_tl {#3}
+ \__tblr_text_gput:neV { text } { [#1][#2] } \l__tblr_cell_text_tl
+ }
+\cs_generate_variant:Nn \__tblr_cell_appto_text:nnn { nen, enn, een }
+
\cs_new_protected:Npn \__tblr_cell_unknown_key:n #1
{
\regex_match:NnTF \c__tblr_is_color_key_regex {#1}
{
- \__tblr_prop_gput:nxx {cell}
- {[\int_use:N \c@rownum][\int_use:N \c@colnum] / background} {#1}
+ \__tblr_data_gput:neene { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { background } {#1}
}
{
\tl_set_rescan:Nnn \l__tblr_v_tl {} {#1}
- \__tblr_prop_gput:nxx {cell}
- { [\int_use:N \c@rownum][\int_use:N \c@colnum] / width }
+ \__tblr_data_gput:neene { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { width }
{ \dim_eval:n { \l__tblr_v_tl } }
}
}
@@ -1196,14 +1521,14 @@
\int_compare:nNnT { #1 } > { 1 }
{
\__tblr_prop_gput:nnn {table} {rowspan} {true}
- \__tblr_prop_gput:nxn {cell}
- { [\int_use:N \c@rownum][\int_use:N \c@colnum] / rowspan } { #1 }
+ \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { rowspan } {#1}
}
\int_compare:nNnT { #2 } > { 1 }
{
\__tblr_prop_gput:nnn {table} {colspan} {true}
- \__tblr_prop_gput:nxn {cell}
- { [\int_use:N \c@rownum][\int_use:N \c@colnum] / colspan } { #2 }
+ \__tblr_data_gput:neenn { cell }
+ { \int_use:N \c@rownum } { \int_use:N \c@colnum } { colspan } {#2}
}
\int_step_variable:nnNn
{ \int_use:N \c@rownum } { \int_eval:n { \c@rownum + #1 - 1 } } \l__tblr_i_tl
@@ -1216,17 +1541,17 @@
{ \int_compare_p:nNn { \l__tblr_i_tl } = { \c@rownum } }
{ \int_compare_p:nNn { \l__tblr_j_tl } = { \c@colnum } }
{
- \__tblr_prop_gput:nxx {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / omit } {true}
+ \__tblr_data_gput:neenn { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { omit } {1}
}
\int_compare:nNnF { \l__tblr_i_tl } = { \c@rownum }
{
- \__tblr_prop_gput:nxx {hline}
+ \__tblr_text_gput:nen { hline }
{ [\l__tblr_i_tl][\l__tblr_j_tl] / omit } {true}
}
\int_compare:nNnF { \l__tblr_j_tl } = { \c@colnum }
{
- \__tblr_prop_gput:nxx {vline}
+ \__tblr_text_gput:nee { vline }
{ [\l__tblr_i_tl][\l__tblr_j_tl] / omit } {true}
}
}
@@ -1373,19 +1698,21 @@
{ \int_use:N \c@colnum } { valign } {f},
bg .code:n = \__tblr_set_key_for_every_column_cell:nnn
{ \int_use:N \c@colnum } { background } {#1},
- wd .code:n = \__tblr_prop_gput:nxx { column }
- { [\int_use:N \c@colnum] / width } { \dim_eval:n {#1} },
- co .code:n = \__tblr_prop_gput:nxx { column }
- { [\int_use:N \c@colnum] / coefficient } {#1},
- leftsep .code:n = \__tblr_prop_gput:nxx { column }
- { [\int_use:N \c@colnum] / leftsep } { \dim_eval:n {#1} },
- rightsep .code:n = \__tblr_prop_gput:nxx { column }
- { [\int_use:N \c@colnum] / rightsep } { \dim_eval:n {#1} },
+ fg .code:n = \__tblr_preto_text_for_every_column_cell:n { \color{#1} },
+ font .code:n = \__tblr_preto_text_for_every_column_cell:n { #1 \selectfont },
+ wd .code:n = \__tblr_data_gput:nene { column }
+ { \int_use:N \c@colnum } { width } { \dim_eval:n {#1} },
+ co .code:n = \__tblr_data_gput:nene { column }
+ { \int_use:N \c@colnum } { coefficient } {#1},
+ leftsep .code:n = \__tblr_data_gput:nene { column }
+ { \int_use:N \c@colnum } { leftsep } { \dim_eval:n {#1} },
+ rightsep .code:n = \__tblr_data_gput:nene { column }
+ { \int_use:N \c@colnum } { rightsep } { \dim_eval:n {#1} },
colsep .meta:n = { leftsep = #1, rightsep = #1},
- leftsep+ .code:n = \__tblr_prop_gadd_dimen_value:nxx { column }
- { [\int_use:N \c@colnum] / leftsep } { \dim_eval:n {#1} },
- rightsep+ .code:n = \__tblr_prop_gadd_dimen_value:nxx { column }
- { [\int_use:N \c@colnum] / rightsep } { \dim_eval:n {#1} },
+ leftsep+ .code:n = \__tblr_data_gadd_dimen_value:nene { column }
+ { \int_use:N \c@colnum } { leftsep } { \dim_eval:n {#1} },
+ rightsep+ .code:n = \__tblr_data_gadd_dimen_value:nene { column }
+ { \int_use:N \c@colnum } { rightsep } { \dim_eval:n {#1} },
colsep+ .meta:n = { leftsep+ = #1, rightsep+ = #1},
unknown .code:n = \__tblr_column_unknown_key:V \l_keys_key_str,
}
@@ -1395,7 +1722,23 @@
{
\int_step_inline:nn { \c@rowcount }
{
- \__tblr_prop_gput:nxn {cell} { [##1][#1] / #2 } {#3}
+ \__tblr_data_gput:neenn { cell } {##1} {#1} {#2} {#3}
+ }
+ }
+
+\cs_new_protected:Npn \__tblr_preto_text_for_every_column_cell:n #1
+ {
+ \int_step_inline:nn { \c@rowcount }
+ {
+ \__tblr_cell_preto_text:nen {##1} { \int_use:N \c@colnum } {#1}
+ }
+ }
+
+\cs_new_protected:Npn \__tblr_appto_text_for_every_column_cell:n #1
+ {
+ \int_step_inline:nn { \c@rowcount }
+ {
+ \__tblr_cell_appto_text:nen {##1} { \int_use:N \c@colnum } {#1}
}
}
@@ -1405,8 +1748,8 @@
{
\regex_match:NnTF \c__tblr_is_number_key_regex {#1}
{
- \__tblr_prop_gput:nxx { column }
- { [\int_use:N \c@colnum] / coefficient } {#1}
+ \__tblr_data_gput:nene { column }
+ { \int_use:N \c@colnum } { coefficient } {#1}
}
{
\regex_match:NnTF \c__tblr_is_color_key_regex {#1}
@@ -1416,8 +1759,8 @@
}
{
\tl_set_rescan:Nnn \l__tblr_v_tl {} {#1}
- \__tblr_prop_gput:nxx { column }
- { [\int_use:N \c@colnum] / width } { \dim_eval:n { \l__tblr_v_tl } }
+ \__tblr_data_gput:nene { column }
+ { \int_use:N \c@colnum } { width } { \dim_eval:n { \l__tblr_v_tl } }
}
}
}
@@ -1507,6 +1850,8 @@
{ \int_use:N \c@rownum } { valign } {f},
bg .code:n = \__tblr_set_key_for_every_row_cell:nnn
{ \int_use:N \c@rownum } { background } {#1},
+ fg .code:n = \__tblr_preto_text_for_every_row_cell:n { \color{#1} },
+ font .code:n = \__tblr_preto_text_for_every_row_cell:n { #1 \selectfont },
ht .code:n = \__tblr_data_gput:nene { row } { \int_use:N \c@rownum }
{ height } { \dim_eval:n {#1} },
co .code:n = \__tblr_data_gput:nene { row } { \int_use:N \c@rownum }
@@ -1531,7 +1876,23 @@
{
\int_step_inline:nn { \c@colcount }
{
- \__tblr_prop_gput:nxn {cell} { [#1][##1] / #2 } {#3}
+ \__tblr_data_gput:neenn { cell } {#1} {##1} {#2} {#3}
+ }
+ }
+
+\cs_new_protected:Npn \__tblr_preto_text_for_every_row_cell:n #1
+ {
+ \int_step_inline:nn { \c@colcount }
+ {
+ \__tblr_cell_preto_text:enn { \int_use:N \c@rownum } {##1} {#1}
+ }
+ }
+
+\cs_new_protected:Npn \__tblr_appto_text_for_every_row_cell:n #1
+ {
+ \int_step_inline:nn { \c@colcount }
+ {
+ \__tblr_cell_appto_text:enn { \int_use:N \c@rownum } {##1} {#1}
}
}
@@ -1614,26 +1975,16 @@
\exp_args:Nc \NewDocumentCommand { tblr_primitive_column_type_ > } { O{} m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF {#1}
{
- \__tblr_prop_gput:nxx
+ \__tblr_data_gput:nene
{ column }
- { [\int_use:N \c@colnum] / leftsep}
- { \dim_eval:n { #1 } }
+ { \int_use:N \c@colnum } { leftsep }
+ { \dim_eval:n {#1} }
}
- \tl_if_blank:nF { #2 }
+ \tl_if_blank:nF {#2}
{
- \int_step_variable:nNn { \c@rowcount } \l__tblr_i_tl
- {
- \tl_set:Nx \l_tmpa_tl
- {
- \__tblr_prop_item:ne {text}
- { [\l__tblr_i_tl][\int_use:N \c@colnum] }
- }
- \tl_put_left:Nn \l_tmpa_tl { #2 }
- \__tblr_prop_gput:nxV {text}
- { [\l__tblr_i_tl][\int_use:N \c@colnum] } \l_tmpa_tl
- }
+ \__tblr_preto_text_for_every_column_cell:n {#2}
}
\__tblr_execute_colrow_spec_next:N
}
@@ -1645,24 +1996,14 @@
\exp_args:Nc \NewDocumentCommand { tblr_primitive_row_type_ > } { O{} m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF {#1}
{
\__tblr_data_gput:nene { row } { \int_use:N \c@rownum }
{ abovesep } { \dim_eval:n { #1 } }
}
- \tl_if_blank:nF { #2 }
+ \tl_if_blank:nF {#2}
{
- \int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
- {
- \tl_set:Nx \l_tmpa_tl
- {
- \__tblr_prop_item:ne {text}
- { [\int_use:N \c@rownum][\l__tblr_j_tl] }
- }
- \tl_put_left:Nn \l_tmpa_tl { #2 }
- \__tblr_prop_gput:nxV {text}
- { [\int_use:N \c@rownum][\l__tblr_j_tl] } \l_tmpa_tl
- }
+ \__tblr_preto_text_for_every_row_cell:n {#2}
}
\__tblr_execute_colrow_spec_next:N
}
@@ -1674,26 +2015,17 @@
\exp_args:Nc \NewDocumentCommand { tblr_primitive_column_type_ < } { O{} m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF {#1}
{
- \__tblr_prop_gput:nxx
- { column }
- { [\int_eval:n {\c@colnum - 1}] / rightsep }
- { \dim_eval:n { #1 } }
+ \__tblr_data_gput:nene { column }
+ { \int_eval:n {\c@colnum - 1} } { rightsep } { \dim_eval:n {#1} }
}
- \tl_if_blank:nF { #2 }
+ \tl_if_blank:nF {#2}
{
- \int_step_variable:nNn { \c@rowcount } \l__tblr_i_tl
- {
- \tl_set:Nx \l_tmpa_tl
- {
- \__tblr_prop_item:ne {text}
- { [\l__tblr_i_tl][\int_eval:n {\c@colnum - 1}] }
- }
- \tl_put_right:Nn \l_tmpa_tl { #2 }
- \__tblr_prop_gput:nxV {text}
- { [\l__tblr_i_tl][\int_eval:n {\c@colnum - 1}] } \l_tmpa_tl
- }
+ \group_begin:
+ \int_decr:N \c@colnum
+ \__tblr_appto_text_for_every_column_cell:n {#2}
+ \group_end:
}
\__tblr_execute_colrow_spec_next:N
}
@@ -1705,24 +2037,17 @@
\exp_args:Nc \NewDocumentCommand { tblr_primitive_row_type_ < } { O{} m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF {#1}
{
\__tblr_data_gput:nene { row } { \int_eval:n {\c@rownum - 1} }
{ belowsep } { \dim_eval:n {#1} }
}
- \tl_if_blank:nF { #2 }
+ \tl_if_blank:nF {#2}
{
- \int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
- {
- \tl_set:Nx \l_tmpa_tl
- {
- \__tblr_prop_item:ne {text}
- { [\int_eval:n {\c@rownum - 1}][\l__tblr_j_tl] }
- }
- \tl_put_right:Nn \l_tmpa_tl { #2 }
- \__tblr_prop_gput:nxV {text}
- { [\int_eval:n {\c@rownum - 1}][\l__tblr_j_tl] } \l_tmpa_tl
- }
+ \group_begin:
+ \int_decr:N \c@rownum
+ \__tblr_appto_text_for_every_row_cell:n {#2}
+ \group_end:
}
\__tblr_execute_colrow_spec_next:N
}
@@ -1902,6 +2227,7 @@
\mode_leave_vertical:
\int_gincr:N \g_tblr_level_int
\__tblr_clear_prop_lists:
+ \__tblr_clear_text_lists:
\__tblr_enable_table_commands:
\__tblr_split_table:n { #3 }
\LogTblrTracing { command }
@@ -1916,18 +2242,6 @@
\int_gdecr:N \g_tblr_level_int
}
-\cs_new_protected:Npn \__tblr_clear_prop_lists:
- {
- \prop_gclear_new:c { g_tblr_text_ \int_use:N \g_tblr_level_int _prop }
- \prop_gclear_new:c { g_tblr_command_ \int_use:N \g_tblr_level_int _prop }
- \prop_gclear_new:c { g_tblr_table_ \int_use:N \g_tblr_level_int _prop }
- \prop_gclear_new:c { g_tblr_row_ \int_use:N \g_tblr_level_int _prop }
- \prop_gclear_new:c { g_tblr_column_ \int_use:N \g_tblr_level_int _prop }
- \prop_gclear_new:c { g_tblr_cell_ \int_use:N \g_tblr_level_int _prop }
- \prop_gclear_new:c { g_tblr_hline_ \int_use:N \g_tblr_level_int _prop }
- \prop_gclear_new:c { g_tblr_vline_ \int_use:N \g_tblr_level_int _prop }
- }
-
%% Insert and remove braces for nesting environments inside cells
%% These make line split and cell split workable
%% We need to replace N times for N level nestings
@@ -2034,7 +2348,7 @@
\__tblr_remove_braces:N \l_tmpa_tl
\int_incr:N \c@colnum
\__tblr_extract_table_commands:N \l_tmpa_tl
- \__tblr_prop_gput:nxV {text} { [#1][\int_use:N \c@colnum] } \l_tmpa_tl
+ \__tblr_text_gput:neV { text } { [#1][\int_use:N \c@colnum] } \l_tmpa_tl
\__tblr_add_multicolumn_empty_cell:
}
%% Decrease row count by 1 if the last row has only one empty cell text
@@ -2059,7 +2373,7 @@
\int_step_inline:nn { \l__multicolumn_cell_number_int - 1 }
{
\int_incr:N \c@colnum
- \__tblr_prop_gput:nxn {text}
+ \__tblr_text_gput:nen { text }
{ [\int_use:N \c@rownum][\int_use:N \c@colnum] } { }
}
}
@@ -2175,6 +2489,7 @@
\prop_gset_from_keyval:Nn \g__tblr_default_tblr_table_prop
{
stretch = 1,
+ rulesep = 2pt,
}
\prop_gset_from_keyval:Nn \g__tblr_default_tblr_rows_prop
@@ -2192,6 +2507,8 @@
{
leftsep = 6pt,
rightsep = 6pt,
+ width = -1pt, % column width unset
+ coefficient = 0, % column coefficient unset
@col-width = 0pt,
}
@@ -2199,16 +2516,20 @@
{
halign = l,
valign = t,
+ width = -1pt, % cell width unset
+ rowspan = 1,
+ colspan = 1,
+ omit = 0,
}
\prop_gset_from_keyval:Nn \g__tblr_default_tblr_hlines_prop
{
- rulesep = 2pt,
+ @hline-count = 0,
}
\prop_gset_from_keyval:Nn \g__tblr_default_tblr_vlines_prop
{
- rulesep = 2pt,
+ @vline-count = 0,
}
\cs_new_protected:Npn \__tblr_initial_table_spec:
@@ -2225,37 +2546,37 @@
}
\prop_map_inline:cn { g__tblr_default_ \l__tblr_env_name_tl _hlines_prop }
{
- \__tblr_prop_gput:nxn { hline } { [\l__tblr_i_tl] / ##1 } {##2}
+ \__tblr_text_gput:nen { hline } { [\l__tblr_i_tl] / ##1 } {##2}
}
\int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
{
\prop_map_inline:cn
{ g__tblr_default_ \l__tblr_env_name_tl _cells_prop }
{
- \__tblr_prop_gput:nxn { cell }
- { [\l__tblr_i_tl][\l__tblr_j_tl] / ##1 } {##2}
+ \__tblr_data_gput:neeen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } {##1} {##2}
}
}
}
\prop_map_inline:cn { g__tblr_default_ \l__tblr_env_name_tl _hlines_prop }
{
- \__tblr_prop_gput:nxn { hline }
+ \__tblr_text_gput:nen { hline }
{ [\int_eval:n { \c@rowcount + 1}] / ##1 } {##2}
}
\int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
{
\prop_map_inline:cn { g__tblr_default_ \l__tblr_env_name_tl _columns_prop }
{
- \__tblr_prop_gput:nxn { column } { [\l__tblr_j_tl] / ##1 } {##2}
+ \__tblr_data_gput:nenn { column } { \l__tblr_j_tl } {##1} {##2}
}
\prop_map_inline:cn { g__tblr_default_ \l__tblr_env_name_tl _vlines_prop }
{
- \__tblr_prop_gput:nxn { vline } { [\l__tblr_j_tl] / ##1 } {##2}
+ \__tblr_text_gput:nen { vline } { [\l__tblr_j_tl] / ##1 } {##2}
}
}
\prop_map_inline:cn { g__tblr_default_ \l__tblr_env_name_tl _vlines_prop }
{
- \__tblr_prop_gput:nxn { vline }
+ \__tblr_text_gput:nen { vline }
{ [\int_eval:n { \c@colcount + 1}] / ##1 } {##2}
}
\keys_set:nv { tblr } { l__tblr_default_ \l__tblr_env_name_tl _tl }
@@ -2279,7 +2600,7 @@
{
long, colspec, rowspec, width, hspan, stretch,
column, row, cell, vline, hline, columns, rows, cells, vlines, hlines,
- leftsep, rightsep, colsep, abovesep, belowsep, rowsep,
+ leftsep, rightsep, colsep, abovesep, belowsep, rowsep, rulesep,
}
\bool_new:N \l__tblr_long_table_bool
@@ -2303,6 +2624,7 @@
abovesep .code:n = \tblr_set_every_row:nn { } { abovesep = #1 },
belowsep .code:n = \tblr_set_every_row:nn { } { belowsep = #1 },
rowsep .meta:n = { abovesep = #1, belowsep = #1 },
+ rulesep .code:n = \__tblr_keys_gput:nn { rulesep } {#1},
unknown .code:n = \__tblr_table_special_key:Vn \l_keys_key_str {#1},
}
@@ -2403,11 +2725,11 @@
{
\dim_zero:N \l__tblr_w_dim
\tl_set:Nx \l__tblr_n_tl
- { \__tblr_prop_item:ne { vline } { [#2] / @vline-count } }
- \tl_if_empty:NF \l__tblr_n_tl
+ { \__tblr_text_item:ne { vline } { [#2] / @vline-count } }
+ \int_compare:nNnT { \l__tblr_n_tl } > {0}
{
\tl_set:Nx \l__tblr_s_tl
- { \__tblr_prop_item:ne { vline } { [#2] / rulesep } }
+ { \__tblr_prop_item:ne { table } { rulesep } }
\int_step_inline:nn { \l__tblr_n_tl }
{
\vbox_set_to_ht:Nnn \l__tblr_b_box {1pt}
@@ -2416,14 +2738,14 @@
{#1} {#2} {##1} {1pt} {1pt}
}
\tl_set:Nx \l__tblr_w_tl { \dim_eval:n { \box_wd:N \l__tblr_b_box } }
- \__tblr_prop_gput_if_larger:nxx { vline }
+ \__tblr_text_gput_if_larger:nee { vline }
{ [#2](##1) / @vline-width } { \l__tblr_w_tl }
\dim_add:Nn \l__tblr_w_dim { \l__tblr_w_tl }
\dim_add:Nn \l__tblr_w_dim { \l__tblr_s_tl }
}
\dim_add:Nn \l__tblr_w_dim { - \l__tblr_s_tl }
}
- \__tblr_prop_gput_if_larger:nxx { vline }
+ \__tblr_text_gput_if_larger:nee { vline }
{ [#2]/ @vline-width } { \dim_use:N \l__tblr_w_dim }
}
@@ -2434,10 +2756,10 @@
{
\group_begin:
\tl_set:Nx \l__tblr_w_tl
- { \__tblr_prop_item:ne { vline } { [#1][#2](#3) / wd } }
+ { \__tblr_text_item:ne { vline } { [#1][#2](#3) / wd } }
\tl_if_empty:NF \l__tblr_w_tl { \dim_set:Nn \rulewidth { \l__tblr_w_tl } }
\tl_set:Nx \l__tblr_d_tl
- { \__tblr_prop_item:ne { vline } { [#1][#2](#3) / @dash } }
+ { \__tblr_text_item:ne { vline } { [#1][#2](#3) / @dash } }
\tl_set:Nx \l__tblr_a_tl { \tl_head:N \l__tblr_d_tl }
\tl_set:Nx \l__tblr_b_tl { \tl_tail:N \l__tblr_d_tl }
\exp_args:NV \tl_if_eq:NNTF \l__tblr_a_tl \@tblr@dash
@@ -2461,11 +2783,11 @@
{
\dim_zero:N \l__tblr_h_dim
\tl_set:Nx \l__tblr_n_tl
- { \__tblr_prop_item:ne { hline } { [#1] / @hline-count } }
- \tl_if_empty:NF \l__tblr_n_tl
+ { \__tblr_text_item:ne { hline } { [#1] / @hline-count } }
+ \int_compare:nNnT { \l__tblr_n_tl } > {0}
{
\tl_set:Nx \l__tblr_s_tl
- { \__tblr_prop_item:ne { hline } { [#1] / rulesep } }
+ { \__tblr_prop_item:ne { table } { rulesep } }
\int_step_inline:nn { \l__tblr_n_tl }
{
\hbox_set_to_wd:Nnn \l__tblr_b_box {1pt}
@@ -2475,14 +2797,14 @@
\dim_eval:n
{ \box_ht:N \l__tblr_b_box + \box_dp:N \l__tblr_b_box }
}
- \__tblr_prop_gput_if_larger:nxx { hline }
+ \__tblr_text_gput_if_larger:nee { hline }
{ [#1](##1) / @hline-height } { \l__tblr_h_tl }
\dim_add:Nn \l__tblr_h_dim { \l__tblr_h_tl }
\dim_add:Nn \l__tblr_h_dim { \l__tblr_s_tl }
}
\dim_add:Nn \l__tblr_h_dim { - \l__tblr_s_tl }
}
- \__tblr_prop_gput_if_larger:nxx { hline }
+ \__tblr_text_gput_if_larger:nee { hline }
{ [#1] / @hline-height } { \dim_use:N \l__tblr_h_dim }
}
@@ -2492,10 +2814,10 @@
{
\group_begin:
\tl_set:Nx \l__tblr_w_tl
- { \__tblr_prop_item:ne { hline } { [#1][#2](#3) / wd } }
+ { \__tblr_text_item:ne { hline } { [#1][#2](#3) / wd } }
\tl_if_empty:NF \l__tblr_w_tl { \dim_set:Nn \rulewidth { \l__tblr_w_tl } }
\tl_set:Nx \l__tblr_d_tl
- { \__tblr_prop_item:ne { hline } { [#1][#2](#3) / @dash } }
+ { \__tblr_text_item:ne { hline } { [#1][#2](#3) / @dash } }
\tl_set:Nx \l__tblr_a_tl { \tl_head:N \l__tblr_d_tl }
\tl_set:Nx \l__tblr_b_tl { \tl_tail:N \l__tblr_d_tl }
\exp_args:NV \tl_if_eq:NNTF \l__tblr_a_tl \@tblr@dash
@@ -2527,9 +2849,9 @@
{
\group_begin:
\tl_gset:Nx \g__tblr_cell_halign_tl
- { \__tblr_prop_item:ne { cell } { [#1][#2] / halign } }
+ { \__tblr_data_item:neen { cell } {#1} {#2} { halign } }
\tl_set:Nx \l__tblr_v_tl
- { \__tblr_prop_item:ne { cell } { [#1][#2] / valign } }
+ { \__tblr_data_item:neen { cell } {#1} {#2} { valign } }
\tl_case:NnF \l__tblr_v_tl
{
\c__tblr_valign_t_tl
@@ -2607,7 +2929,7 @@
%% #1: row number, #2: column number
\cs_new_protected:Npn \__tblr_get_cell_text:nn #1 #2
{
- \__tblr_prop_if_in:nxTF {cell} { [#1][#2] / omit }
+ \int_compare:nNnTF { \__tblr_data_item:neen { cell } {#1} {#2} { omit } } > {0}
{
\dim_gzero:N \g__tblr_cell_wd_dim
\dim_gzero:N \g__tblr_cell_ht_dim
@@ -2623,18 +2945,19 @@
\cs_new_protected:Npn \__tblr_get_cell_text_real:nn #1 #2
{
\group_begin:
- \tl_set:Nx \l__tblr_c_tl { \__tblr_prop_item:ne {text} {[#1][#2]} }
+ \tl_set:Nx \l__tblr_c_tl { \__tblr_text_item:ne { text } {[#1][#2]} }
\tl_set:Nx \l__tblr_w_tl
- { \__tblr_prop_item:ne { cell } { [#1][#2] / width } }
- \tl_if_empty:NT \l__tblr_w_tl
+ { \__tblr_data_item:neen { cell } {#1} {#2} { width } }
+ \dim_compare:nNnT { \l__tblr_w_tl } < { 0pt } % cell width unset
{
- \__tblr_prop_if_in:nxF { cell } { [#1][#2] / colspan }
+ \int_compare:nNnT
+ { \__tblr_data_item:neen { cell } {#1} {#2} { colspan } } < {2}
{
\tl_set:Nx \l__tblr_w_tl
- { \__tblr_prop_item:ne { column } { [#2] / width } }
+ { \__tblr_data_item:nen { column } {#2} { width } }
}
}
- \tl_if_empty:NT \l__tblr_w_tl
+ \dim_compare:nNnT { \l__tblr_w_tl } < { 0pt } % column width unset
{
\bool_if:NTF \l__tblr_math_mode_bool
{
@@ -2757,15 +3080,15 @@
{
\group_begin:
\tl_set:Nx \l__tblr_c_tl
- { \__tblr_prop_item:ne {cell} { [#1][#2] / colspan } }
- \tl_if_empty:NF \l__tblr_c_tl
+ { \__tblr_data_item:neen { cell } {#1} {#2} { colspan } }
+ \int_compare:nNnT { \l__tblr_c_tl } > {1}
{
- \__tblr_prop_gput:nxx {cell} { [#1][#2] / @cell-width } { \dim_use:N #3 }
+ \__tblr_data_gput:neene { cell } {#1} {#2} { @cell-width } {\dim_use:N #3}
\dim_gzero:N #3 % don't affect column width
}
\tl_set:Nx \l__tblr_r_tl
- { \__tblr_prop_item:ne {cell} { [#1][#2] / rowspan } }
- \tl_if_empty:NF \l__tblr_r_tl
+ { \__tblr_data_item:neen { cell } {#1} {#2} { rowspan } }
+ \int_compare:nNnT { \l__tblr_r_tl } > {1}
{
\tl_case:Nn \g__tblr_cell_valign_tl
{
@@ -2794,8 +3117,8 @@
#4 #5 #6 \l__tblr_u_tl \l__tblr_v_tl
}
}
- \__tblr_prop_gput:nxV {cell} { [#1][#2] / @cell-height } \l__tblr_u_tl
- \__tblr_prop_gput:nxV {cell} { [#1][#2] / @cell-depth } \l__tblr_v_tl
+ \__tblr_data_gput:neenV { cell } {#1} {#2} { @cell-height } \l__tblr_u_tl
+ \__tblr_data_gput:neenV { cell } {#1} {#2} { @cell-depth } \l__tblr_v_tl
%% Don't affect row sizes
\dim_gzero:N #4
\dim_gzero:N #5
@@ -2876,12 +3199,12 @@
\cs_new_protected:Npn \__tblr_update_col_size:nN #1 #2
{
\tl_set:Nx \l_tmpb_tl
- { \__tblr_prop_item:ne {column} { [#1] / @col-width } }
+ { \__tblr_data_item:nen { column } {#1} { @col-width } }
\bool_lazy_or:nnT
{ \tl_if_empty_p:N \l_tmpb_tl }
{ \dim_compare_p:nNn { \dim_use:N #2 } > { \l_tmpb_tl } }
{
- \__tblr_prop_gput:nxx {column} { [#1] / @col-width } { \dim_use:N #2 }
+ \__tblr_data_gput:nene { column } {#1} { @col-width } { \dim_use:N #2 }
}
}
@@ -2925,14 +3248,14 @@
\int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
{
\tl_set:Nx \l__tblr_a_tl
- { \__tblr_prop_item:ne {column} { [\l__tblr_j_tl] / width } }
+ { \__tblr_data_item:nen { column } { \l__tblr_j_tl } { width } }
\tl_set:Nx \l__tblr_b_tl
- { \__tblr_prop_item:ne {column} { [\l__tblr_j_tl] / coefficient } }
+ { \__tblr_data_item:nen { column } { \l__tblr_j_tl } { coefficient } }
\tl_set:Nx \l__tblr_c_tl
- { \__tblr_prop_item:ne {column} { [\l__tblr_j_tl] / @col-width } }
- \tl_if_empty:NTF \l__tblr_a_tl
+ { \__tblr_data_item:nen { column } { \l__tblr_j_tl } { @col-width } }
+ \dim_compare:nNnTF { \l__tblr_a_tl } < { 0pt } % column width unset
{
- \tl_if_empty:NTF \l__tblr_b_tl
+ \dim_compare:nNnTF { \l__tblr_b_tl pt } = { 0pt }
{ \dim_sub:Nn \l__column_target_dim { \l__tblr_c_tl } }
{
\prop_put:Nxx \l__column_coefficient_prop
@@ -2948,17 +3271,17 @@
}
{ \dim_sub:Nn \l__column_target_dim { \l__tblr_a_tl } }
\tl_set:Nx \l__tblr_a_tl
- { \__tblr_prop_item:ne {vline} { [\l__tblr_j_tl] / @vline-width } }
+ { \__tblr_text_item:ne { vline } { [\l__tblr_j_tl] / @vline-width } }
\tl_set:Nx \l__tblr_b_tl
- { \__tblr_prop_item:ne {column} { [\l__tblr_j_tl] / leftsep} }
+ { \__tblr_data_item:nen { column } { \l__tblr_j_tl } { leftsep } }
\tl_set:Nx \l__tblr_c_tl
- { \__tblr_prop_item:ne {column} { [\l__tblr_j_tl] / rightsep } }
+ { \__tblr_data_item:nen { column } { \l__tblr_j_tl } { rightsep } }
\dim_set:Nn \l__column_target_dim
{ \l__column_target_dim - \l__tblr_a_tl - \l__tblr_b_tl - \l__tblr_c_tl }
}
\tl_set:Nx \l__tblr_a_tl
{
- \__tblr_prop_item:ne {vline}
+ \__tblr_text_item:ne { vline }
{ [\int_eval:n {\c@colcount + 1}] / @vline-width }
}
\tl_if_empty:NF \l__tblr_a_tl
@@ -2979,8 +3302,8 @@
}
\prop_map_inline:Nn \l__column_computed_width_prop
{
- \__tblr_prop_gput:nnx {column} { [##1] / width } { ##2 }
- \__tblr_prop_gput:nnn {column} { [##1] / @col-width } { 0pt }
+ \__tblr_data_gput:nnne { column } {##1} { width } {##2}
+ \__tblr_data_gput:nnnn { column } {##1} { @col-width } { 0pt }
}
\__tblr_calculate_cell_sizes:
}
@@ -3067,7 +3390,7 @@
\__tblr_collect_span_widths:
\__tblr_set_column_widths_from_span_widths:
}
- \LogTblrTracing {column}
+ \LogTblrTracing { column }
\__tblr_calculate_cell_sizes:
}
\__tblr_prop_if_in:nnT {table} {rowspan}
@@ -3095,14 +3418,13 @@
{
\dim_eval:n
{
- \__tblr_prop_item:ne {column}
- { [\int_eval:n { \l__tblr_j_tl - 1 }] / rightsep }
+ \__tblr_data_item:nen { column }
+ { \int_eval:n { \l__tblr_j_tl - 1 } } { rightsep }
+
- \__tblr_prop_item:ne {vline}
+ \__tblr_text_item:ne { vline }
{ [\l__tblr_j_tl] / @vline-width }
+
- \__tblr_prop_item:ne {column}
- { [\l__tblr_j_tl] / leftsep}
+ \__tblr_data_item:nen { column } { \l__tblr_j_tl } { leftsep }
}
}
}
@@ -3111,7 +3433,7 @@
{ 0pt }
}
\prop_put:Nxx \l__tblr_col_item_skip_size_prop { item[\l__tblr_j_tl] }
- { \__tblr_prop_item:ne {column} { [\l__tblr_j_tl] / @col-width } }
+ { \__tblr_data_item:nen { column } { \l__tblr_j_tl } { @col-width } }
}
\__tblr_do_if_tracing:nn { cellspan }
{ \prop_log:N \l__tblr_col_item_skip_size_prop }
@@ -3131,7 +3453,7 @@
\__tblr_data_item:nen { row }
{ \int_eval:n {\l__tblr_i_tl - 1} } { belowsep }
+
- \__tblr_prop_item:ne {hline}
+ \__tblr_text_item:ne { hline }
{ [\l__tblr_i_tl] / @hline-height }
+
\__tblr_data_item:nen { row } { \l__tblr_i_tl } { abovesep }
@@ -3165,10 +3487,10 @@
{
\tl_set:Nx \l__tblr_a_tl
{
- \__tblr_prop_item:ne {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / colspan }
+ \__tblr_data_item:neen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { colspan }
}
- \tl_if_empty:NF \l__tblr_a_tl
+ \int_compare:nNnT { \l__tblr_a_tl } > {1}
{
\__tblr_put_if_larger:Nxx \l__tblr_col_span_size_prop
{
@@ -3176,8 +3498,8 @@
\int_eval:n {\l__tblr_j_tl + \l__tblr_a_tl - 1} )
}
{
- \__tblr_prop_item:ne {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / @cell-width }
+ \__tblr_data_item:neen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { @cell-width }
}
}
}
@@ -3198,15 +3520,15 @@
{
\tl_set:Nx \l__tblr_a_tl
{
- \__tblr_prop_item:ne {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / rowspan }
+ \__tblr_data_item:neen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { rowspan }
}
- \tl_if_empty:NF \l__tblr_a_tl
+ \int_compare:nNnT { \l__tblr_a_tl } > {1}
{
\tl_set:Nx \l__tblr_v_tl
{
- \__tblr_prop_item:ne {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / valign }
+ \__tblr_data_item:neen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { valign }
}
\tl_if_eq:NnT \l__tblr_v_tl { h }
{
@@ -3215,8 +3537,8 @@
\__tblr_data_item:nen { row }
{ \l__tblr_i_tl } { @row-head }
}
- \__tblr_prop_gput:nxV {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / @cell-height }
+ \__tblr_data_gput:neenV { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { @cell-height }
\l__tblr_h_tl
}
\tl_if_eq:NnT \l__tblr_v_tl { f }
@@ -3228,8 +3550,8 @@
{ \int_eval:n { \l__tblr_i_tl + \l__tblr_a_tl - 1 } }
{ @row-foot }
}
- \__tblr_prop_gput:nxV {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / @cell-depth }
+ \__tblr_data_gput:neenV { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { @cell-depth }
\l__tblr_d_tl
}
\__tblr_put_if_larger:Nxx \l__tblr_row_span_size_prop
@@ -3240,11 +3562,11 @@
{
\dim_eval:n
{
- \__tblr_prop_item:ne {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / @cell-height }
+ \__tblr_data_item:neen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { @cell-height }
+
- \__tblr_prop_item:ne {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / @cell-depth }
+ \__tblr_data_item:neen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { @cell-depth }
}
}
\prop_put:Nxx \l__tblr_row_span_to_row_prop
@@ -3340,8 +3662,8 @@
{
\int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
{
- \__tblr_prop_gput:nxx {column}
- { [\l__tblr_j_tl] / @col-width }
+ \__tblr_data_gput:nene { column }
+ { \l__tblr_j_tl } { @col-width }
{ \prop_item:Ne \l__tblr_col_item_skip_size_prop { item[\l__tblr_j_tl] } }
}
}
@@ -3383,17 +3705,17 @@
{
\tl_set:Nx \l__tblr_a_tl
{
- \__tblr_prop_item:ne {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / colspan }
+ \__tblr_data_item:neen { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { colspan }
}
- \tl_if_empty:NF \l__tblr_a_tl
+ \int_compare:nNnT { \l__tblr_a_tl } > {1}
{
\__tblr_calc_span_widths:xxN
{ \l__tblr_j_tl }
{ \int_eval:n { \l__tblr_j_tl + \l__tblr_a_tl - 1 } }
\l__tblr_w_dim
- \__tblr_prop_gput:nxx {cell}
- { [\l__tblr_i_tl][\l__tblr_j_tl] / width }
+ \__tblr_data_gput:neene { cell }
+ { \l__tblr_i_tl } { \l__tblr_j_tl } { width }
{ \dim_use:N \l__tblr_w_dim }
}
}
@@ -3448,7 +3770,7 @@
{
\dim_set:Nn \l_tmpa_dim
{
- \__tblr_prop_item:ne { hline } { [\l__tblr_i_tl] / @hline-height }
+ \__tblr_text_item:ne { hline } { [\l__tblr_i_tl] / @hline-height }
+
\__tblr_data_item:nen { row } { \l__tblr_i_tl } { abovesep }
+
@@ -3546,7 +3868,7 @@
\cs_new_protected:Npn \__tblr_valign_whole_top:N #1
{
\tl_set:Nx \l__tblr_a_tl
- { \__tblr_prop_item:ne { hline } { [1] / @hline-height } }
+ { \__tblr_text_item:ne { hline } { [1] / @hline-height } }
%% Note that \l__tblr_b_tl may be empty
\tl_set:Nx \l__tblr_b_tl
{ \__tblr_prop_item:ne { table } { baseline } }
@@ -3580,7 +3902,7 @@
{
\tl_set:Nx \l__tblr_a_tl
{
- \__tblr_prop_item:ne { hline }
+ \__tblr_text_item:ne { hline }
{ [\int_eval:n {\c@rowcount + 1}] / @hline-height }
}
%% Note that \l__tblr_b_tl may be empty
@@ -3630,14 +3952,14 @@
\cs_new_protected:Npn \__tblr_build_hline_segment:nn #1 #2
{
\tl_set:Nx \l__tblr_n_tl
- { \__tblr_prop_item:ne { hline } { [#1] / @hline-count } }
+ { \__tblr_text_item:ne { hline } { [#1] / @hline-count } }
\tl_set:Nx \l__tblr_o_tl
- { \__tblr_prop_item:ne { hline } { [#1][#2] / omit } }
+ { \__tblr_text_item:ne { hline } { [#1][#2] / omit } }
\__tblr_get_col_outer_width_border_width:nNN {#2}
\l__tblr_col_o_wd_dim \l__tblr_col_b_wd_dim
\tl_if_empty:NTF \l__tblr_o_tl
{
- \tl_if_empty:NF \l__tblr_n_tl
+ \int_compare:nNnT { \l__tblr_n_tl } > {0}
{ \__tblr_build_hline_segment_real:nn {#1} {#2} }
}
{ \__tblr_build_hline_segment_omit:nn {#1} {#2} }
@@ -3653,7 +3975,7 @@
\cs_new_protected:Npn \__tblr_build_hline_segment_real:nn #1 #2
{
\tl_set:Nx \l__tblr_s_tl
- { \__tblr_prop_item:ne { hline } { [#1] / rulesep } }
+ { \__tblr_prop_item:ne { table } { rulesep } }
\vbox_set:Nn \l__tblr_c_box
{
%% add an empty hbox to support vbox width
@@ -3661,12 +3983,12 @@
\int_step_inline:nn { \l__tblr_n_tl }
{
\tl_set:Nx \l__tblr_h_tl
- { \__tblr_prop_item:ne { hline } { [#1](##1) / @hline-height } }
+ { \__tblr_text_item:ne { hline } { [#1](##1) / @hline-height } }
\hrule height ~ 0pt % remove lineskip
\hbox_set_to_wd:Nnn \l__tblr_b_box { \l__tblr_col_o_wd_dim }
{
\tl_set:Nx \l__tblr_f_tl
- { \__tblr_prop_item:ne { hline } { [#1][#2](##1) / fg } }
+ { \__tblr_text_item:ne { hline } { [#1][#2](##1) / fg } }
\tl_if_empty:NF \l__tblr_f_tl { \color{\l__tblr_f_tl} }
\__tblr_get_hline_segment_child:nnn {#1} {#2} {##1}
}
@@ -3687,16 +4009,16 @@
\cs_new_protected:Npn \__tblr_get_col_outer_width_border_width:nNN #1 #2 #3
{
\dim_set:Nn #3
- { \__tblr_prop_item:ne {vline} { [\int_eval:n {#1 + 1}] / @vline-width } }
+ { \__tblr_text_item:ne { vline } { [\int_eval:n {#1 + 1}] / @vline-width } }
\dim_set:Nn #2
{
- \__tblr_prop_item:ne {vline} { [#1] / @vline-width }
+ \__tblr_text_item:ne { vline } { [#1] / @vline-width }
+
- \__tblr_prop_item:ne {column} { [#1] / leftsep }
+ \__tblr_data_item:nen { column } {#1} { leftsep }
+
- \__tblr_prop_item:ne {column} { [#1] / @col-width }
+ \__tblr_data_item:nen { column } {#1} { @col-width }
+
- \__tblr_prop_item:ne {column} { [#1] / rightsep }
+ \__tblr_data_item:nen { column } {#1} { rightsep }
+
#3
}
@@ -3756,12 +4078,12 @@
\cs_new_protected:Npn \__tblr_build_vline_segment:nn #1 #2
{
\tl_set:Nx \l__tblr_n_tl
- { \__tblr_prop_item:ne { vline } { [#2] / @vline-count } }
+ { \__tblr_text_item:ne { vline } { [#2] / @vline-count } }
\tl_set:Nx \l__tblr_o_tl
- { \__tblr_prop_item:ne { vline } { [#1][#2] / omit } }
+ { \__tblr_text_item:ne { vline } { [#1][#2] / omit } }
\tl_if_empty:NTF \l__tblr_o_tl
{
- \tl_if_empty:NF \l__tblr_n_tl
+ \int_compare:nNnT { \l__tblr_n_tl } > {0}
{ \__tblr_build_vline_segment_real:nn {#1} {#2} }
}
{ \__tblr_build_vline_segment_omit:nn {#1} {#2} }
@@ -3771,7 +4093,7 @@
\cs_new_protected:Npn \__tblr_build_vline_segment_omit:nn #1 #2
{
\tl_set:Nx \l__tblr_w_tl
- { \__tblr_prop_item:ne { vline } { [#2] / @vline-width } }
+ { \__tblr_text_item:ne { vline } { [#2] / @vline-width } }
\skip_horizontal:N \l__tblr_w_tl
}
@@ -3781,10 +4103,10 @@
\cs_new_protected:Npn \__tblr_build_vline_segment_real:nn #1 #2
{
\tl_set:Nx \l__tblr_s_tl
- { \__tblr_prop_item:ne { vline } { [#2] / rulesep } }
+ { \__tblr_prop_item:ne { table } { rulesep } }
\tl_set:Nx \l__tblr_b_tl
{
- \__tblr_prop_item:ne { hline }
+ \__tblr_text_item:ne { hline }
{ [\int_eval:n{#1 + 1}](1) / @hline-height }
}
\tl_if_empty:NT \l__tblr_b_tl { \tl_set:Nn \l__tblr_b_tl { 0pt } }
@@ -3793,12 +4115,12 @@
\int_step_inline:nn { \l__tblr_n_tl }
{
\tl_set:Nx \l__tblr_w_tl
- { \__tblr_prop_item:ne { vline } { [#2](##1) / @vline-width } }
+ { \__tblr_text_item:ne { vline } { [#2](##1) / @vline-width } }
\vbox_set_to_ht:Nnn \l__tblr_b_box
{ \dim_eval:n { \l__tblr_row_ht_dim + \l__tblr_row_dp_dim } }
{
\tl_set:Nx \l__tblr_f_tl
- { \__tblr_prop_item:ne { vline } { [#1][#2](##1) / fg } }
+ { \__tblr_text_item:ne { vline } { [#1][#2](##1) / fg } }
\tl_if_empty:NF \l__tblr_f_tl { \color{\l__tblr_f_tl} }
\__tblr_get_vline_segment_child:nnnxx {#1} {#2} {##1}
{ \dim_eval:n { \l__tblr_row_ht_dim } }
@@ -3828,24 +4150,24 @@
\int_set:Nn \c@colnum {#2}
\group_begin:
\tl_set:Nx \l__tblr_w_tl
- { \__tblr_prop_item:ne { column } { [#2] / @col-width } }
+ { \__tblr_data_item:nen { column } {#2} { @col-width } }
\tl_set:Nx \l__tblr_h_tl
{ \__tblr_data_item:nen { row } {#1} { @row-height } }
\tl_set:Nx \l__tblr_x_tl
- { \__tblr_prop_item:ne { column } { [#2] / leftsep} }
+ { \__tblr_data_item:nen { column } {#2} { leftsep} }
\tl_set:Nx \l__tblr_y_tl
- { \__tblr_prop_item:ne { column } { [#2] / rightsep } }
+ { \__tblr_data_item:nen { column } {#2} { rightsep } }
\tl_set:Nx \l__tblr_cell_colspan_tl
- { \__tblr_prop_item:ne { cell } { [#1][#2] / colspan } }
- \tl_if_empty:NTF \l__tblr_cell_colspan_tl
+ { \__tblr_data_item:neen { cell } {#1} {#2} { colspan } }
+ \int_compare:nNnTF { \l__tblr_cell_colspan_tl } < {2}
{ \dim_set:Nn \l__tblr_cell_wd_dim { \l__tblr_w_tl } }
{
\__tblr_get_span_horizontal_sizes:NNNNN #1 #2
\l__tblr_o_dim \l__tblr_cell_wd_dim \l__tblr_q_dim
}
\tl_set:Nx \l__tblr_cell_rowspan_tl
- { \__tblr_prop_item:ne { cell } { [#1][#2] / rowspan } }
- \tl_if_empty:NTF \l__tblr_cell_rowspan_tl
+ { \__tblr_data_item:neen { cell } {#1} {#2} { rowspan } }
+ \int_compare:nNnTF { \l__tblr_cell_rowspan_tl } < {2}
{ \dim_set:Nn \l__tblr_cell_ht_dim { \l__tblr_h_tl } }
{
\__tblr_get_span_vertical_sizes:NNNNN #1 #2
@@ -3872,7 +4194,7 @@
\c__tblr_valign_m_tl
{
\vfil
- \tl_if_empty:NT \l__tblr_cell_rowspan_tl
+ \int_compare:nNnT { \l__tblr_cell_rowspan_tl } < {2}
{
\box_set_ht:Nn \l__tblr_a_box
{ \__tblr_data_item:nen { row } {#1} { @row-upper } }
@@ -3892,7 +4214,7 @@
\c__tblr_valign_f_tl
{
\vfil
- \tl_if_empty:NTF \l__tblr_cell_rowspan_tl
+ \int_compare:nNnTF { \l__tblr_cell_rowspan_tl } < {2}
{
\box_set_dp:Nn \l__tblr_a_box
{ \__tblr_data_item:nen { row } {#1} { @row-foot } }
@@ -3924,11 +4246,11 @@
\cs_new_protected:Npn \__tblr_build_cell_background:NN #1 #2
{
- \__tblr_prop_if_in:nxF {cell} { [#1][#2] / omit }
+ \int_compare:nNnT { \__tblr_data_item:neen { cell } {#1} {#2} { omit } } = {0}
{
\group_begin:
\tl_set:Nx \l__tblr_b_tl
- { \__tblr_prop_item:ne { cell } { [#1][#2] / background } }
+ { \__tblr_data_item:neen { cell } {#1} {#2} { background } }
\tl_if_empty:NF \l__tblr_b_tl
{
\__tblr_get_cell_background_width:NNN #1 #2 \l_tmpa_dim
@@ -3946,7 +4268,7 @@
%% #1: row number; #2: column number; #3 resulting dimension
\cs_new_protected:Npn \__tblr_get_cell_background_width:NNN #1 #2 #3
{
- \tl_if_empty:NTF \l__tblr_cell_colspan_tl
+ \int_compare:nNnTF { \l__tblr_cell_colspan_tl } < {2}
{ \dim_set:Nn #3 { \l__tblr_x_tl + \l__tblr_w_tl + \l__tblr_y_tl } }
{
\dim_set:Nn #3 { \l__tblr_o_dim + \l__tblr_cell_wd_dim + \l__tblr_q_dim }
@@ -3956,7 +4278,7 @@
%% #1: row number; #2: column number; #3 resulting dimension
\cs_new_protected:Npn \__tblr_get_cell_background_depth:NNN #1 #2 #3
{
- \tl_if_empty:NTF \l__tblr_cell_rowspan_tl
+ \int_compare:nNnTF { \l__tblr_cell_rowspan_tl } < {2}
{ \dim_set_eq:NN #3 \l__tblr_row_dp_dim }
{
\dim_set:Nn #3
@@ -4014,7 +4336,7 @@
\cs_new_protected:Npn \__tblr_get_span_horizontal_sizes:NNNNN #1 #2 #3 #4 #5
{
\dim_set:Nn #3
- { \__tblr_prop_item:ne { column } { [#2] / leftsep} }
+ { \__tblr_data_item:nen { column } {#2} { leftsep } }
\dim_zero:N #4
\int_step_inline:nnn { #2 } { #2 + \l__tblr_cell_colspan_tl - 2 }
{
@@ -4033,8 +4355,8 @@
}
\dim_set:Nn #5
{
- \__tblr_prop_item:ne { column }
- { [\int_eval:n {#2 + \l__tblr_cell_colspan_tl - 1}] / rightsep }
+ \__tblr_data_item:nen { column }
+ { \int_eval:n {#2 + \l__tblr_cell_colspan_tl - 1} } { rightsep }
}
%\tl_log:x { cell[#1][#2] ~:~ \dim_use:N #3, \dim_use:N #4, \dim_use:N #5 }
}
@@ -4061,6 +4383,7 @@
\bool_new:N \g__tblr_tracing_rowspec_bool
\bool_new:N \g__tblr_tracing_target_bool
\bool_new:N \g__tblr_tracing_cellspan_bool
+\bool_new:N \g__tblr_tracing_intarray_bool
\keys_define:nn { tblr-set-tracing }
{
@@ -4088,6 +4411,8 @@
-target .code:n = \bool_gset_false:N \g__tblr_tracing_target_bool,
+cellspan .code:n = \bool_gset_true:N \g__tblr_tracing_cellspan_bool,
-cellspan .code:n = \bool_gset_false:N \g__tblr_tracing_cellspan_bool,
+ +intarray .code:n = \bool_gset_true:N \g__tblr_tracing_intarray_bool,
+ -intarray .code:n = \bool_gset_false:N \g__tblr_tracing_intarray_bool,
all .code:n = \__tblr_enable_all_tracings:,
none .code:n = \__tblr_disable_all_tracings:,
}
@@ -4106,6 +4431,7 @@
\bool_gset_true:N \g__tblr_tracing_rowspec_bool
\bool_gset_true:N \g__tblr_tracing_target_bool
\bool_gset_true:N \g__tblr_tracing_cellspan_bool
+ \bool_gset_true:N \g__tblr_tracing_intarray_bool
}
\cs_new_protected_nopar:Npn \__tblr_disable_all_tracings:
@@ -4122,6 +4448,7 @@
\bool_gset_false:N \g__tblr_tracing_rowspec_bool
\bool_gset_false:N \g__tblr_tracing_target_bool
\bool_gset_false:N \g__tblr_tracing_cellspan_bool
+ \bool_gset_false:N \g__tblr_tracing_intarray_bool
}
\NewDocumentCommand \LogTabularrayTracing { m }
@@ -4143,7 +4470,7 @@
\cs_new_protected:Npn \__tblr_log_tracing_text:
{
- \__tblr_prop_log:n { text }
+ \__tblr_text_log:n { text }
}
\cs_new_protected:Npn \__tblr_log_tracing_command:
@@ -4158,7 +4485,7 @@
\cs_new_protected:Npn \__tblr_log_tracing_column:
{
- \__tblr_prop_log:n { column }
+ \__tblr_data_log:n { column }
}
\cs_new_protected:Npn \__tblr_log_tracing_row:
@@ -4168,17 +4495,17 @@
\cs_new_protected:Npn \__tblr_log_tracing_cell:
{
- \__tblr_prop_log:n { cell }
+ \__tblr_data_log:n { cell }
}
\cs_new_protected:Npn \__tblr_log_tracing_vline:
{
- \__tblr_prop_log:n { vline }
+ \__tblr_text_log:n { vline }
}
\cs_new_protected:Npn \__tblr_log_tracing_hline:
{
- \__tblr_prop_log:n { hline }
+ \__tblr_text_log:n { hline }
}
\cs_new_protected:Npn \__tblr_log_tracing_colspec:
diff --git a/macros/latex/contrib/tabularray/tabularray.pdf b/macros/latex/contrib/tabularray/tabularray.pdf
index c7b3de29ca..198b6fd211 100644
--- a/macros/latex/contrib/tabularray/tabularray.pdf
+++ b/macros/latex/contrib/tabularray/tabularray.pdf
Binary files differ
diff --git a/macros/latex/contrib/tabularray/tabularray.sty b/macros/latex/contrib/tabularray/tabularray.sty
index 4717992539..2e3fa4eb5d 100644
--- a/macros/latex/contrib/tabularray/tabularray.sty
+++ b/macros/latex/contrib/tabularray/tabularray.sty
@@ -12,18 +12,12 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{tabularray}{2021-08-01}{2021M}
+\ProvidesExplPackage{tabularray}{2021-09-01}{2021N}
{Typeset tabulars and arrays with LaTeX3}
\RequirePackage{xparse}
-\AtBeginDocument
- {
- \@ifpackageloaded{xcolor}{\RequirePackage{ninecolors}}{}
- \@ifpackageloaded{hyperref}{\hypersetup{pdfborder={0 0 0}}}{}
- }
-
-\ExplSyntaxOn
+\AtBeginDocument{\@ifpackageloaded{xcolor}{\RequirePackage{ninecolors}}{}}
%% Backport \tl_if_eq:NnTF for old texlive 2020
\cs_if_exist:NF \tl_if_eq:NnTF
@@ -1114,11 +1108,18 @@
\tl_new:N \l__tblr_hline_dash_tl % dash style
\tl_new:N \l__tblr_hline_fg_tl % dash foreground
\tl_new:N \l__tblr_hline_wd_tl % dash width
+\tl_new:N \l__tblr_hline_leftpos_tl % left position
+\tl_new:N \l__tblr_hline_rightpos_tl % right position
+\bool_new:N \l__tblr_hline_endpos_bool % whether set positions only for both ends
\NewTableCommand \cline [2] [] { \SetHline [=] {#2} {#1} }
\NewTableCommand \hline [1] [] { \SetHline [+] {-} {#1} }
+%% Some keys can be set by any hline, such as abovespace and belowspace keys.
+%% Using special hline of index 0, you can set these keys without adding any hlines.
+\NewTableCommand \SetVspace [1] { \SetHline [0] {-} {#1} }
+
%% #1: the index of the hline (may be + or =)
%% #2: which columns of the hline, separate by commas
%% #3: key=value pairs
@@ -1132,13 +1133,19 @@
\cs_new_protected:Npn \tblr_set_hline:nnn #1 #2 #3
{
\group_begin:
- \keys_set_groups:nnn { tblr-hline } { text } {#3}
- \tl_if_eq:NnF \l__tblr_hline_dash_tl { \exp_not:N \@tblr@text }
+ %% We can not use \int_compare:nNnTF here since #1 may be + or = .
+ %% Also we treat hline of index 0 specially, not adding hline count.
+ \tl_if_eq:nnTF {#1} {0}
+ { \keys_set:nn { tblr-hline } {#3} }
{
- \__tblr_set_hline_num:n {#1}
- \tl_clear:N \l__tblr_hline_dash_tl
- \keys_set:nn { tblr-hline } { dash = solid, #3 }
- \__tblr_set_hline_cmd:n {#2}
+ \keys_set_groups:nnn { tblr-hline } { text } {#3}
+ \tl_if_eq:NnF \l__tblr_hline_dash_tl { \exp_not:N \@tblr@text }
+ {
+ \__tblr_set_hline_num:n {#1}
+ \tl_clear:N \l__tblr_hline_dash_tl
+ \keys_set:nn { tblr-hline } { dash = solid, #3 }
+ \__tblr_set_hline_cmd:n {#2}
+ }
}
\group_end:
}
@@ -1215,6 +1222,21 @@
wd .code:n = \tl_set:Nn \l__tblr_hline_wd_tl { \dim_eval:n {#1} },
fg .code:n = \tl_set:Nn \l__tblr_hline_fg_tl {#1},
baseline .code:n = \__tblr_hline_set_baseline:n {#1},
+ leftpos .code:n = \tl_set:Nx \l__tblr_hline_leftpos_tl {#1},
+ rightpos .code:n = \tl_set:Nx \l__tblr_hline_rightpos_tl {#1},
+ l .meta:n = { leftpos = #1 },
+ l .default:n = { -0.8 },
+ r .meta:n = { rightpos = #1 },
+ r .default:n = { -0.8 },
+ lr .meta:n = { leftpos = #1, rightpos = #1 },
+ lr .default:n = { -0.8 },
+ endpos .bool_set:N = \l__tblr_hline_endpos_bool,
+ abovespace .code:n = \__tblr_row_gput_above:ne { belowsep } { \dim_eval:n {#1} },
+ belowspace .code:n = \__tblr_row_gput:ne { abovesep } { \dim_eval:n {#1} },
+ abovespace+ .code:n = \__tblr_row_gadd_dimen_above:ne
+ { belowsep } { \dim_eval:n {#1} },
+ belowspace+ .code:n = \__tblr_row_gadd_dimen:ne
+ { abovesep } { \dim_eval:n {#1} },
unknown .code:n = \__tblr_hline_unknown_key:V \l_keys_key_str,
}
@@ -1238,24 +1260,59 @@
\__tblr_get_childs:nx {#1} { \int_use:N \c@colcount }
\clist_map_inline:Nn \l_tblr_childs_clist
{
- \__tblr_spec_gput:nee { hline }
- { [\int_use:N \c@rownum][##1](\l__tblr_hline_num_tl) / @dash }
- { \l__tblr_hline_dash_tl }
+ \__tblr_set_hline_option:nnn { ##1 } { @dash } { \l__tblr_hline_dash_tl }
\tl_if_empty:NF \l__tblr_hline_wd_tl
{
- \__tblr_spec_gput:nee { hline }
- { [\int_use:N \c@rownum][##1](\l__tblr_hline_num_tl) / wd }
- { \l__tblr_hline_wd_tl }
+ \__tblr_set_hline_option:nnn { ##1 } { wd } { \l__tblr_hline_wd_tl }
}
\tl_if_empty:NF \l__tblr_hline_fg_tl
{
- \__tblr_spec_gput:nee { hline }
- { [\int_use:N \c@rownum][##1](\l__tblr_hline_num_tl) / fg }
- { \l__tblr_hline_fg_tl }
+ \__tblr_set_hline_option:nnn { ##1 } { fg } { \l__tblr_hline_fg_tl }
+ }
+ }
+ \tl_if_empty:NF \l__tblr_hline_leftpos_tl
+ {
+ \bool_if:NTF \l__tblr_hline_endpos_bool
+ {
+ \__tblr_set_hline_option:nnn
+ { \clist_item:Nn \l_tblr_childs_clist {1} }
+ { leftpos }
+ { \l__tblr_hline_leftpos_tl }
+ }
+ {
+ \clist_map_inline:Nn \l_tblr_childs_clist
+ {
+ \__tblr_set_hline_option:nnn
+ { ##1 } { leftpos } { \l__tblr_hline_leftpos_tl }
+ }
+ }
+ }
+ \tl_if_empty:NF \l__tblr_hline_rightpos_tl
+ {
+ \bool_if:NTF \l__tblr_hline_endpos_bool
+ {
+ \__tblr_set_hline_option:nnn
+ { \clist_item:Nn \l_tblr_childs_clist {-1} }
+ { rightpos }
+ { \l__tblr_hline_rightpos_tl }
+ }
+ {
+ \clist_map_inline:Nn \l_tblr_childs_clist
+ {
+ \__tblr_set_hline_option:nnn
+ { ##1 } { rightpos } { \l__tblr_hline_rightpos_tl }
+ }
}
}
}
+%% #1: column; #2: key; #3: value
+\cs_new_protected_nopar:Npn \__tblr_set_hline_option:nnn #1 #2 #3
+ {
+ \__tblr_spec_gput:nee { hline }
+ { [\int_use:N \c@rownum][#1](\l__tblr_hline_num_tl) / #2 } { #3 }
+ }
+
\NewTableCommand \firsthline [1] [] { \SetHline [+] {-} { #1, baseline=below } }
\NewTableCommand \lasthline [1] [] { \SetHline [+] {-} { #1, baseline=above } }
@@ -1313,6 +1370,8 @@
\tl_new:N \l__tblr_vline_dash_tl % dash style
\tl_new:N \l__tblr_vline_fg_tl % dash foreground
\tl_new:N \l__tblr_vline_wd_tl % dash width
+\tl_new:N \l__tblr_vline_abovepos_tl % above position
+\tl_new:N \l__tblr_vline_belowpos_tl % below position
\NewTableCommand \rline [2] [] { \SetVline [=] {#2} {#1} }
@@ -1413,6 +1472,8 @@
text .groups:n = { text },
wd .code:n = \tl_set:Nn \l__tblr_vline_wd_tl { \dim_eval:n {#1} },
fg .code:n = \tl_set:Nn \l__tblr_vline_fg_tl {#1},
+ abovepos .code:n = \tl_set:Nx \l__tblr_vline_abovepos_tl {#1},
+ belowpos .code:n = \tl_set:Nx \l__tblr_vline_belowpos_tl {#1},
unknown .code:n = \__tblr_vline_unknown_key:V \l_keys_key_str,
}
@@ -1451,6 +1512,18 @@
{ [##1][\int_use:N \c@colnum](\l__tblr_vline_num_tl) / fg }
{ \l__tblr_vline_fg_tl }
}
+ \tl_if_empty:NF \l__tblr_vline_abovepos_tl
+ {
+ \__tblr_spec_gput:nee { vline }
+ { [##1][\int_use:N \c@colnum](\l__tblr_vline_num_tl) / abovepos }
+ { \l__tblr_vline_abovepos_tl }
+ }
+ \tl_if_empty:NF \l__tblr_vline_belowpos_tl
+ {
+ \__tblr_spec_gput:nee { vline }
+ { [##1][\int_use:N \c@colnum](\l__tblr_vline_num_tl) / belowpos }
+ { \l__tblr_vline_belowpos_tl }
+ }
}
}
@@ -1549,6 +1622,7 @@
{
halign .code:n = \__tblr_cell_gput:nn { halign } {#1},
valign .code:n = \__tblr_cell_gput:nn { valign } {#1},
+ j .meta:n = { halign = j },
l .meta:n = { halign = l },
c .meta:n = { halign = c },
r .meta:n = { halign = r },
@@ -1685,6 +1759,23 @@
}
}
}
+ %% Make continuous borders for multirow cells
+ \tl_set:Nx \l__tblr_n_tl
+ {
+ \int_max:nn
+ {
+ \__tblr_spec_item:ne { vline } { [\int_use:N \c@colnum] / @vline-count }
+ }
+ { 1 }
+ }
+ \int_step_variable:nnNn
+ { \c@rownum } { \int_eval:n { \c@rownum + #1 -1 } } \l__tblr_i_tl
+ {
+ \__tblr_spec_gput:nee { vline }
+ { [\l__tblr_i_tl][\int_use:N \c@colnum](\l__tblr_n_tl) / belowpos } {1}
+ \__tblr_spec_gput:nee { vline }
+ { [\l__tblr_i_tl][\int_eval:n {\c@colnum + #2}](1) / belowpos } {1}
+ }
}
\cs_generate_variant:Nn \__tblr_set_span_spec:nn { VV }
@@ -1809,6 +1900,7 @@
{
halign .code:n = \__tblr_column_gput_cell:nn { halign } {#1},
valign .code:n = \__tblr_column_gput_cell:nn { valign } {#1},
+ j .meta:n = { halign = j },
l .meta:n = { halign = l },
c .meta:n = { halign = c },
r .meta:n = { halign = r },
@@ -1968,6 +2060,7 @@
{
halign .code:n = \__tblr_row_gput_cell:nn { halign } {#1},
valign .code:n = \__tblr_row_gput_cell:nn { valign } {#1},
+ j .meta:n = { halign = j },
l .meta:n = { halign = l },
c .meta:n = { halign = c },
r .meta:n = { halign = r },
@@ -2004,12 +2097,25 @@
}
\cs_generate_variant:Nn \__tblr_row_gput:nn { ne }
+\cs_new_protected:Npn \__tblr_row_gput_above:nn #1 #2
+ {
+ \__tblr_data_gput:nenn { row } { \int_eval:n { \c@rownum - 1 } } {#1} {#2}
+ }
+\cs_generate_variant:Nn \__tblr_row_gput_above:nn { ne }
+
\cs_new_protected:Npn \__tblr_row_gadd_dimen:nn #1 #2
{
\__tblr_data_gadd_dimen_value:nenn { row } { \int_use:N \c@rownum } {#1} {#2}
}
\cs_generate_variant:Nn \__tblr_row_gadd_dimen:nn { ne }
+\cs_new_protected:Npn \__tblr_row_gadd_dimen_above:nn #1 #2
+ {
+ \__tblr_data_gadd_dimen_value:nenn { row }
+ { \int_eval:n { \c@rownum - 1 } } {#1} {#2}
+ }
+\cs_generate_variant:Nn \__tblr_row_gadd_dimen_above:nn { ne }
+
%% #1: key; #2: value
\cs_new_protected:Npn \__tblr_row_gput_cell:nn #1 #2
{
@@ -2271,6 +2377,7 @@
\NewColumnRowType { l } { Q[l] }
\NewColumnRowType { c } { Q[c] }
\NewColumnRowType { r } { Q[r] }
+\NewColumnRowType { j } { Q[j] }
\NewColumnType { t } [1] { Q[t,wd=#1] }
\NewColumnType { p } [1] { Q[p,wd=#1] }
@@ -2333,7 +2440,10 @@
}
{
\str_if_in:cnTF { g_tblr_used_ \g__tblr_column_or_row_tl _types_str } {#1}
- { \cs:w tblr_ \g__tblr_column_or_row_tl _type_ #1 \cs_end: }
+ {
+ %% Note that #1 may be an active character (see issue #58)
+ \cs:w tblr_ \g__tblr_column_or_row_tl _type_ \token_to_str:N #1 \cs_end:
+ }
{
\msg_error:nnVn { tabularray } { unknown-colrow-type }
\g__tblr_column_or_row_tl {#1}
@@ -2578,8 +2688,10 @@
{
\tl_set:Nn \l_tmpa_tl { ##1 }
\__tblr_remove_braces:N \l_tmpa_tl
+ \__tblr_trim_par_space_tokens:N \l_tmpa_tl
\int_incr:N \c@colnum
\__tblr_extract_table_commands:N \l_tmpa_tl
+ \__tblr_trim_par_space_tokens:N \l_tmpa_tl
\__tblr_spec_gput:neV { text } { [#1][\int_use:N \c@colnum] } \l_tmpa_tl
\__tblr_add_multicolumn_empty_cell:
}
@@ -2599,6 +2711,15 @@
}
}
+\regex_const:Nn \c__tblr_trim_left_par_space_regex { ^ \c{par} ? \s * }
+\regex_const:Nn \c__tblr_trim_right_space_par_regex { \s * \c{par} ? $ }
+
+\cs_new_protected:Npn \__tblr_trim_par_space_tokens:N #1
+ {
+ \regex_replace_once:NnN \c__tblr_trim_left_par_space_regex {} #1
+ \regex_replace_once:NnN \c__tblr_trim_right_space_par_regex {} #1
+ }
+
%% Add empty cells after the \multicolumn span cell
\cs_new_protected:Npn \__tblr_add_multicolumn_empty_cell:
{
@@ -2627,7 +2748,7 @@
\tl_clear:N \l__tblr_saved_table_commands_before_cell_text_tl
\tl_clear:N \l__tblr_saved_cell_text_after_table_commands_tl
\int_set:Nn \l__multicolumn_cell_number_int {1}
- \exp_last_unbraced:NV \__tblr_extract_table_commands_next:w #1 \q_stop
+ \exp_last_unbraced:NV \__tblr_extract_table_commands_next:n #1 \q_stop
\tl_if_empty:NF \l__tblr_saved_table_commands_before_cell_text_tl
{
\__tblr_prop_gput:nxV { command }
@@ -2637,26 +2758,26 @@
\tl_set_eq:NN #1 \l__tblr_saved_cell_text_after_table_commands_tl
}
-%% #1 maybe a single token or multiple tokens given in braces
-\cs_new_protected:Npn \__tblr_extract_table_commands_next:w #1
+%% #1 maybe a single token or multiple tokens from a pair of braces
+\cs_new_protected:Npn \__tblr_extract_table_commands_next:n #1
{
- \clist_if_in:NnTF \g__tblr_table_commands_clist { #1 }
+ \tl_if_single_token:nTF {#1}
{
- \clist_if_in:NnTF \g__tblr_table_commands_unbrace_next_clist { #1 }
- { \bool_set_true:N \l__tblr_table_command_unbrace_next_bool }
- { \bool_set_false:N \l__tblr_table_command_unbrace_next_bool }
- \token_if_eq_meaning:NNTF #1 \multicolumn
- { \__tblr_extract_multicolumn_command:Nn #1 }
- { \__tblr_extract_one_table_command:N #1 }
- }
- {
- \tl_if_single_token:nTF {#1}
+ \clist_if_in:NnTF \g__tblr_table_commands_clist { #1 }
+ {
+ \clist_if_in:NnTF \g__tblr_table_commands_unbrace_next_clist { #1 }
+ { \bool_set_true:N \l__tblr_table_command_unbrace_next_bool }
+ { \bool_set_false:N \l__tblr_table_command_unbrace_next_bool }
+ \token_if_eq_meaning:NNTF #1 \multicolumn
+ { \__tblr_extract_multicolumn_command:Nn #1 }
+ { \__tblr_extract_one_table_command:N #1 }
+ }
{
\token_if_eq_meaning:NNF #1 \q_stop
{ \__tblr_save_real_cell_text:w #1 }
}
- { \__tblr_save_real_cell_text:w {#1} }
}
+ { \__tblr_save_real_cell_text:w {#1} }
}
\cs_new_protected:Npn \__tblr_extract_multicolumn_command:Nn #1 #2
@@ -2701,8 +2822,8 @@
}
{
\bool_if:NTF \l__tblr_table_command_unbrace_next_bool
- { \__tblr_last_unbraced:Nn \__tblr_extract_table_commands_next:w }
- { \__tblr_extract_table_commands_next:w }
+ { \__tblr_last_unbraced:Nn \__tblr_extract_table_commands_next:n }
+ { \__tblr_extract_table_commands_next:n }
}
}
@@ -2764,6 +2885,7 @@
@vline-count = 0,
}
+\tl_new:N \l__tblr_inner_spec_measure_tl
\tl_new:N \l__tblr_inner_spec_verb_tl
\cs_new_protected:Npn \__tblr_init_table_inner_spec:
@@ -2812,6 +2934,7 @@
\__tblr_spec_gput:nen { vline }
{ [\int_eval:n { \c@colcount + 1}] / ##1 } {##2}
}
+ \tl_clear:N \l__tblr_inner_spec_measure_tl
\tl_clear:N \l__tblr_inner_spec_verb_tl
\keys_set:nv { tblr } { l__tblr_default_ \l__tblr_env_name_tl _inner_tl }
}
@@ -3091,10 +3214,13 @@
\xleaders \l__tblr_b_tl \vfil
}
{
+ %% When using text as vline, we need to omit abovepos and belowpos.
+ \unskip
\hbox_set:Nn \l__tblr_d_box { \l__tblr_b_tl }
\box_set_ht:Nn \l__tblr_d_box {#4}
\box_set_dp:Nn \l__tblr_d_box {#5}
\box_use:N \l__tblr_d_box
+ \vss
}
\group_end:
}
@@ -3317,21 +3443,7 @@
\tl_set:Nx \l__tblr_w_tl { \box_wd:N \l_tmpa_box }
}
{
- \tl_set_eq:NN \l_tmpb_tl \l__tblr_c_tl
- \__tblr_insert_braces:N \l_tmpb_tl
- \seq_set_split:NnV \l_tmpa_seq { \\ } \l_tmpb_tl
- \tl_set:Nn \l__tblr_w_tl { 0pt }
- \seq_map_variable:NNn \l_tmpa_seq \l_tmpa_tl
- {
- \__tblr_remove_braces:N \l_tmpa_tl
- \hbox_set:Nn \l_tmpa_box
- {
- \l__tblr_f_tl
- \__tblr_rescan_cell_tokens:N \l_tmpa_tl
- }
- \tl_set:Nx \l__tblr_w_tl
- { \dim_max:nn { \l__tblr_w_tl } { \box_wd:N \l_tmpa_box } }
- }
+ \__tblr_get_cell_size_with_box:
}
}
\tl_put_left:NV \l__tblr_c_tl \l__tblr_f_tl
@@ -3339,6 +3451,54 @@
\group_end:
}
+\cs_new_protected:Npn \__tblr_get_cell_size_with_box:
+ {
+ \tl_if_eq:NnTF \l__tblr_inner_spec_measure_tl { vbox }
+ { \__tblr_get_cell_size_with_vbox: }
+ { \__tblr_get_cell_size_with_hbox: }
+ }
+
+%% Varwidth won't work as expected when \color command occurs in it,
+%% and we can not fix this problem with \leavevmode command.
+%% See https://tex.stackexchange.com/q/460489.
+%% But we need to use \color command for fg option,
+%% or users may use it in the middle of the cell text,
+%% so we have redefine \color command and disable it before measuring cell.
+
+\NewDocumentCommand \__tblr_fake_color_command:w { o m } { }
+
+\cs_new_protected:Npn \__tblr_get_cell_size_with_vbox:
+ {
+ \hbox_set:Nn \l_tmpa_box
+ {
+ \cs_set_eq:NN \color \__tblr_fake_color_command:w
+ \begin{varwidth}{\paperwidth}
+ \l__tblr_f_tl
+ \__tblr_rescan_cell_tokens:N \l__tblr_c_tl
+ \end{varwidth}
+ }
+ \tl_set:Nx \l__tblr_w_tl { \box_wd:N \l_tmpa_box }
+ }
+
+\cs_new_protected:Npn \__tblr_get_cell_size_with_hbox:
+ {
+ \tl_set_eq:NN \l_tmpb_tl \l__tblr_c_tl
+ \__tblr_insert_braces:N \l_tmpb_tl
+ \seq_set_split:NnV \l_tmpa_seq { \\ } \l_tmpb_tl
+ \tl_set:Nn \l__tblr_w_tl { 0pt }
+ \seq_map_variable:NNn \l_tmpa_seq \l_tmpa_tl
+ {
+ \__tblr_remove_braces:N \l_tmpa_tl
+ \hbox_set:Nn \l_tmpa_box
+ {
+ \l__tblr_f_tl
+ \__tblr_rescan_cell_tokens:N \l_tmpa_tl
+ }
+ \tl_set:Nx \l__tblr_w_tl
+ { \dim_max:nn { \l__tblr_w_tl } { \box_wd:N \l_tmpa_box } }
+ }
+ }
+
%% #1: cell text; #2: box width
\cs_new_protected:Npn \__tblr_get_vcell_and_sizes:NN #1 #2
{
@@ -3401,13 +3561,18 @@
\box_use:N \l__tblr_strut_dp_box
}
+%% When using verb option, there is an end-of-line character at the end.
+%% This character causes extra horizontal space at the end when "measure=hbox",
+%% or causes extra vertical space at the end with "measure=vbox".
+%% Therefore we have to use an \empty to remove it.
+%% See https://tex.stackexchange.com/q/213659
\cs_new_protected:Npn \__tblr_rescan_cell_tokens:N #1
{
\tl_if_empty:NTF \l__tblr_inner_spec_verb_tl
{ #1 }
{
\regex_replace_all:nnN { . } { \c{string} \0 } #1
- \tl_set:Nx #1 { #1 }
+ \tl_set:Nx #1 { #1 \noexpand \empty }
\exp_args:NV \tex_scantokens:D #1
}
}
@@ -3657,7 +3822,8 @@
}
%% If all columns have negative coefficients and small natural widths,
-%% \l__column_coefficient_prop will be empty after one or more rounds
+%% \l__column_coefficient_prop will be empty after one or more rounds.
+%% We reset @row-height, etc for \linewidth graphics in X columns (issue #80)
\cs_new_protected:Npn \__tblr_adjust_extendable_column_width:
{
\bool_while_do:nn
@@ -3672,6 +3838,14 @@
\__tblr_data_gput:nnne { column } {##1} { width } {##2}
\__tblr_data_gput:nnnn { column } {##1} { @col-width } { 0pt }
}
+ \int_step_inline:nn { \c@rowcount }
+ {
+ \__tblr_data_gput:nnnn { row } {##1} { @row-height } { 0pt }
+ \__tblr_data_gput:nnnn { row } {##1} { @row-head } { 0pt }
+ \__tblr_data_gput:nnnn { row } {##1} { @row-foot } { 0pt }
+ \__tblr_data_gput:nnnn { row } {##1} { @row-upper } { 0pt }
+ \__tblr_data_gput:nnnn { row } {##1} { @row-lower } { 0pt }
+ }
\__tblr_calculate_cell_sizes:
}
@@ -4154,8 +4328,8 @@
%% Cell is spanned from col #1 to col #2, #3 is the return dim
\cs_new_protected:Npn \__tblr_calc_span_widths:nnN #1 #2 #3
{
- \dim_zero:N #3
- \int_step_inline:nnn { #1 } { #2 }
+ \dim_set:Nn #3 { \prop_item:Ne \l__tblr_col_item_skip_size_prop { item[#1] } }
+ \int_step_inline:nnn { #1 + 1 } { #2 }
{
\tl_set:Nx \l_tmpa_tl
{ \prop_item:Ne \l__tblr_col_item_skip_size_prop { skip[##1] } }
@@ -4535,6 +4709,17 @@
\par
}
}
+\DefTblrTemplate { caption } { simple }
+ {
+ \UseTblrAlign { caption }
+ \UseTblrIndent { caption }
+ \UseTblrHang { caption }
+ \leavevmode
+ \UseTblrTemplate { caption-tag } { default }
+ \UseTblrTemplate { caption-sep } { default }
+ \UseTblrTemplate { caption-text } { default }
+ \par
+ }
\SetTblrTemplate { caption } { normal }
\DefTblrTemplate { capcont } { empty } { }
@@ -4592,6 +4777,19 @@
\par
}
}
+\DefTblrTemplate { capcont } { simple }
+ {
+ \UseTblrAlign { caption }
+ \UseTblrIndent { caption }
+ \UseTblrHang { caption }
+ \leavevmode
+ \UseTblrTemplate { caption-tag } { default }
+ \UseTblrTemplate { caption-sep } { default }
+ \UseTblrTemplate { caption-text } { default }
+ \space
+ \UseTblrTemplate { conthead-text } { default }
+ \par
+ }
\SetTblrTemplate { capcont} { normal }
%%% --------------------------------------------------------
@@ -4627,8 +4825,19 @@
{ #2 }
}
+\DefTblrTemplate { note-border } { empty }
+ {
+ \hypersetup { pdfborder = { 0 ~ 0 ~ 0 } }
+ }
+\DefTblrTemplate { note-border } { normal }
+ {
+ \hypersetup { pdfborder = { 0 ~ 0 ~ 1 } }
+ }
+\SetTblrTemplate { note-border } { empty }
+
\NewDocumentCommand \TblrNote { m }
{
+ \cs_if_exist:NT \hypersetup { \ExpTblrTemplate { note-border }{ default } }
\__tblr_hyper_link:nn {#1}
{ \textsuperscript { \sffamily \UseTblrFont { note-tag } #1 } }
}
@@ -5005,9 +5214,10 @@
{ \skip_vertical:n { \__tblr_spec_item:nn { outer } { presep } } }
\LogTblrTracing { page }
\nointerlineskip
- \mode_leave_vertical:
+ \mode_leave_vertical: % enter horizontal mode to update \pagetotal
\LogTblrTracing { page }
\hrule height ~ 0pt
+ \nobreak % prevent page break after \hrule (see issue #42)
\LogTblrTracing { page }
\int_set:Nn \l__tblr_table_page_int {1}
\__tblr_build_head_foot:
@@ -5024,16 +5234,25 @@
\l_tmpa_dim \l__tblr_page_break_curr_bool
\__tblr_check_table_page_break:NNN
\l__tblr_remain_height_dim \l_tmpa_dim \l__tblr_page_break_prev_bool
+ \__tblr_do_if_tracing:nn { page } { \int_log:N \l__tblr_curr_i_int }
\bool_if:NTF \l__tblr_page_break_prev_bool
{
- \__tblr_do_if_tracing:nn { page } { \int_log:N \l__tblr_curr_i_int }
- \int_compare:nNnF
- { \l__tblr_prev_i_int - \l__tblr_long_from_int } < {0}
+ \int_compare:nNnTF
+ { \l__tblr_long_from_int } > { \l__tblr_prev_i_int }
+ {
+ % See issue #42: if longtblr starts at the bottom of a page,
+ % \pagetotal maybe exceed \pagegoal after adding presep,
+ % or after adding rowhead or rowfoot of the table.
+ % In these cases, we will not typeset table in this page,
+ % but rather do some negative \vskip and execute \newpage.
+ \skip_vertical:n { \pagegoal - \pagetotal }
+ }
{
\__tblr_build_page_table:nnx {#1}
{ \int_use:N \l__tblr_long_from_int }
{ \int_use:N \l__tblr_prev_i_int }
\int_incr:N \l__tblr_table_page_int
+ \int_set:Nn \l__tblr_long_from_int { \l__tblr_prev_i_int + 1 }
}
\newpage
\hbox{}\kern-\topskip\nobreak
@@ -5041,7 +5260,6 @@
\LogTblrTracing { page }
\dim_set:Nn \l__tblr_remain_height_dim
{ \pagegoal - \pagetotal - \l__tblr_row_head_foot_dim - \l_tmpa_dim }
- \int_set:Nn \l__tblr_long_from_int { \l__tblr_prev_i_int + 1 }
}
{
\bool_if:NTF \l__tblr_page_break_curr_bool
@@ -5073,7 +5291,10 @@
\__tblr_build_page_table:nnn {#1}
{ \int_use:N \l__tblr_long_from_int } { \int_use:N \l__tblr_long_to_int }
\skip_vertical:n { \__tblr_spec_item:nn { outer } { postsep } }
- \hrule height ~ 0pt
+ % In the past we used "\hrule height ~ 0pt" to get strict postsep,
+ % but the postsep was not discarded when page breaks, see issue #39.
+ % Therefore we use \nointerlineskip here.
+ \nointerlineskip
}
\cs_generate_variant:Nn \__tblr_build_long_table:n { e }
@@ -5225,10 +5446,16 @@
\bool_new:N \l__tblr_build_last_hline_bool
\bool_set_true:N \l__tblr_build_first_hline_bool
\bool_set_true:N \l__tblr_build_last_hline_bool
+\box_new:N \l__tblr_table_hlines_box
+\box_new:N \l__tblr_hline_box
+\box_new:N \l__tblr_row_box
%% #1: row from; #2: row to
+%% To fix disappeared hlines with colorful tables in Adobe Reader (see #76),
+%% we collect all hlines and draw them at the end of the table.
\cs_new_protected:Npn \__tblr_build_one_table:nn #1 #2
{
+ \box_clear:N \l__tblr_table_hlines_box
\vbox_set:Nn \l__tblr_table_box
{
\int_step_variable:nnNn {#1} {#2} \l__tblr_i_tl
@@ -5236,18 +5463,50 @@
\bool_lazy_or:nnT
{ \int_compare_p:nNn { \l__tblr_i_tl } > {#1} }
{ \bool_if_p:N \l__tblr_build_first_hline_bool }
- { \hbox:n { \__tblr_build_hline:V \l__tblr_i_tl } }
+ { \__tblr_put_one_hline:n { \__tblr_build_hline:V \l__tblr_i_tl } }
\hrule height ~ 0pt % remove lineskip between hlines and rows
- \hbox:n { \__tblr_build_row:N \l__tblr_i_tl }
+ \__tblr_put_one_row:n { \__tblr_build_row:N \l__tblr_i_tl }
\hrule height ~ 0pt
}
\bool_if:NT \l__tblr_build_last_hline_bool
- { \hbox:n { \__tblr_build_hline:n { \int_eval:n {#2 + 1} } } }
+ {
+ \__tblr_put_one_hline:n
+ { \__tblr_build_hline:n { \int_eval:n {#2 + 1} } }
+ }
+ \skip_vertical:n
+ {
+ - \box_ht:N \l__tblr_table_hlines_box
+ - \box_dp:N \l__tblr_table_hlines_box
+ }
+ \box_use:N \l__tblr_table_hlines_box
}
\bool_set_true:N \l__tblr_build_first_hline_bool
\bool_set_true:N \l__tblr_build_last_hline_bool
}
+\cs_new_protected:Npn \__tblr_put_one_hline:n #1
+ {
+ \hbox_set:Nn \l__tblr_hline_box {#1}
+ \skip_vertical:n { \box_ht:N \l__tblr_hline_box + \box_dp:N \l__tblr_hline_box }
+ \vbox_set:Nn \l__tblr_table_hlines_box
+ {
+ \vbox_unpack:N \l__tblr_table_hlines_box
+ \box_use:N \l__tblr_hline_box
+ }
+ }
+
+\cs_new_protected:Npn \__tblr_put_one_row:n #1
+ {
+ \hbox_set:Nn \l__tblr_row_box {#1}
+ \vbox_set:Nn \l__tblr_table_hlines_box
+ {
+ \vbox_unpack:N \l__tblr_table_hlines_box
+ \skip_vertical:n
+ { \box_ht:N \l__tblr_row_box + \box_dp:N \l__tblr_row_box }
+ }
+ \box_use:N \l__tblr_row_box
+ }
+
%% #1: hline number
\cs_new_protected:Npn \__tblr_build_one_hline:n #1
{
@@ -5411,10 +5670,13 @@
\hrule height ~ 0pt % remove lineskip
\hbox_set_to_wd:Nnn \l__tblr_b_box { \l__tblr_col_o_wd_dim }
{
+ \__tblr_get_hline_left_right_skips:nnn {#1} {#2} {##1}
+ \skip_horizontal:N \l__tblr_hline_leftskip_dim
\tl_set:Nx \l__tblr_f_tl
{ \__tblr_spec_item:ne { hline } { [#1][#2](##1) / fg } }
\tl_if_empty:NF \l__tblr_f_tl { \color{\l__tblr_f_tl} }
\__tblr_get_hline_segment_child:nnn {#1} {#2} {##1}
+ \skip_horizontal:N \l__tblr_hline_rightskip_dim
}
\box_set_ht:Nn \l__tblr_b_box { \l__tblr_h_tl }
\box_set_dp:Nn \l__tblr_b_box { 0pt }
@@ -5448,12 +5710,69 @@
}
}
+\dim_new:N \l__tblr_hline_leftskip_dim
+\dim_new:N \l__tblr_hline_rightskip_dim
+
+%% Calculate left and right skips from leftpos and rightpos specifications
+%% #1: row number; #2: column number; #3: hline index;
+\cs_new_protected:Npn \__tblr_get_hline_left_right_skips:nnn #1 #2 #3
+ {
+ \tl_set:Nx \l__tblr_hline_leftpos_tl
+ { \__tblr_spec_item:ne { hline } { [#1][#2](#3) / leftpos } }
+ \tl_if_empty:NT \l__tblr_hline_leftpos_tl
+ { \tl_set:Nn \l__tblr_hline_leftpos_tl {1} } % default position
+ \tl_set:Nx \l__tblr_hline_rightpos_tl
+ { \__tblr_spec_item:ne { hline } { [#1][#2](#3) / rightpos } }
+ \tl_if_empty:NT \l__tblr_hline_rightpos_tl
+ { \tl_set:Nn \l__tblr_hline_rightpos_tl {1} } % default position
+ \fp_compare:nNnT { \l__tblr_hline_leftpos_tl } < {1}
+ {
+ \dim_set:Nn \l_tmpa_dim
+ { \__tblr_spec_item:ne { vline } { [#2] / @vline-width } }
+ \dim_set:Nn \l_tmpb_dim
+ { \__tblr_data_item:nen { column } {#2} { leftsep } }
+ \fp_compare:nNnTF { \l__tblr_hline_leftpos_tl } < {0}
+ {
+ \dim_set:Nn \l__tblr_hline_leftskip_dim
+ { \l_tmpa_dim - \l__tblr_hline_leftpos_tl \l_tmpb_dim }
+ }
+ {
+ \dim_set:Nn \l__tblr_hline_leftskip_dim
+ { \l_tmpa_dim - \l__tblr_hline_leftpos_tl \l_tmpa_dim }
+ }
+ }
+ \fp_compare:nNnT { \l__tblr_hline_rightpos_tl } < {1}
+ {
+ \dim_set:Nn \l_tmpa_dim
+ {
+ \__tblr_spec_item:ne { vline }
+ { [\int_eval:n { #2 + 1 }] / @vline-width }
+ }
+ \dim_set:Nn \l_tmpb_dim
+ { \__tblr_data_item:nen { column } {#2} { rightsep } }
+ \fp_compare:nNnTF { \l__tblr_hline_rightpos_tl } < {0}
+ {
+ \dim_set:Nn \l__tblr_hline_rightskip_dim
+ { \l_tmpa_dim - \l__tblr_hline_rightpos_tl \l_tmpb_dim }
+ }
+ {
+ \dim_set:Nn \l__tblr_hline_rightskip_dim
+ { \l_tmpa_dim - \l__tblr_hline_rightpos_tl \l_tmpa_dim }
+ }
+ }
+ }
+
\dim_new:N \l__tblr_row_ht_dim
\dim_new:N \l__tblr_row_dp_dim
\dim_new:N \l__tblr_row_abovesep_dim
\dim_new:N \l__tblr_row_belowsep_dim
+\box_new:N \l__tblr_row_vlines_box
+\box_new:N \l__tblr_vline_box
+\box_new:N \l__tblr_cell_box
%% Build current row, #1: row number
+%% To fix disappeared vlines with colorful tables in Adobe Reader (see #76),
+%% we collect all vlines and draw them at the end of the row.
\cs_new_protected:Npn \__tblr_build_row:N #1
{
\int_set:Nn \c@rownum {#1}
@@ -5462,12 +5781,21 @@
\l__tblr_row_ht_dim \l__tblr_row_dp_dim
\l__tblr_row_abovesep_dim \l__tblr_row_belowsep_dim
\vrule width ~ 0pt ~ height ~ \l__tblr_row_ht_dim ~ depth ~ \l__tblr_row_dp_dim
+ \hbox_set:Nn \l__tblr_row_vlines_box
+ {
+ \vrule width ~ 0pt ~ height ~ \l__tblr_row_ht_dim
+ ~ depth ~ \l__tblr_row_dp_dim
+ }
\int_step_variable:nNn { \c@colcount } \l__tblr_j_tl
{
- \__tblr_build_vline_segment:nn {#1} { \l__tblr_j_tl }
- \__tblr_build_cell:NN #1 \l__tblr_j_tl
+ \__tblr_put_one_vline:n
+ { \__tblr_build_vline_segment:nn {#1} { \l__tblr_j_tl } }
+ \__tblr_put_one_cell:n { \__tblr_build_cell:NN #1 \l__tblr_j_tl }
}
- \__tblr_build_vline_segment:nn {#1} { \int_eval:n {\c@colcount + 1} }
+ \__tblr_put_one_vline:n
+ { \__tblr_build_vline_segment:nn {#1} { \int_eval:n {\c@colcount + 1} } }
+ \skip_horizontal:n { - \box_wd:N \l__tblr_row_vlines_box }
+ \box_use:N \l__tblr_row_vlines_box
}
%% Read from table specifications and calculate inner height/depth of the row
@@ -5500,6 +5828,28 @@
}
\cs_generate_variant:Nn \__tblr_get_row_inner_height_depth:nNNNN { V }
+\cs_new_protected:Npn \__tblr_put_one_vline:n #1
+ {
+ \hbox_set:Nn \l__tblr_vline_box {#1}
+ \skip_horizontal:n { \box_wd:N \l__tblr_vline_box }
+ \hbox_set:Nn \l__tblr_row_vlines_box
+ {
+ \hbox_unpack:N \l__tblr_row_vlines_box
+ \box_use:N \l__tblr_vline_box
+ }
+ }
+
+\cs_new_protected:Npn \__tblr_put_one_cell:n #1
+ {
+ \hbox_set:Nn \l__tblr_cell_box {#1}
+ \hbox_set:Nn \l__tblr_row_vlines_box
+ {
+ \hbox_unpack:N \l__tblr_row_vlines_box
+ \skip_horizontal:n { \box_wd:N \l__tblr_cell_box }
+ }
+ \box_use:N \l__tblr_cell_box
+ }
+
%% #1: row number, #2: column number
\cs_new_protected:Npn \__tblr_build_vline_segment:nn #1 #2
{
@@ -5530,12 +5880,6 @@
{
\tl_set:Nx \l__tblr_s_tl
{ \__tblr_prop_item:ne { inner } { rulesep } }
- \tl_set:Nx \l__tblr_b_tl
- {
- \__tblr_spec_item:ne { hline }
- { [\int_eval:n{#1 + 1}](1) / @hline-height }
- }
- \tl_if_empty:NT \l__tblr_b_tl { \tl_set:Nn \l__tblr_b_tl { 0pt } }
\hbox_set:Nn \l__tblr_a_box
{
\int_step_inline:nn { \l__tblr_n_tl }
@@ -5548,10 +5892,12 @@
\tl_set:Nx \l__tblr_f_tl
{ \__tblr_spec_item:ne { vline } { [#1][#2](##1) / fg } }
\tl_if_empty:NF \l__tblr_f_tl { \color{\l__tblr_f_tl} }
+ \__tblr_get_vline_above_below_skips:nnn {#1} {#2} {##1}
+ \skip_vertical:N \l__tblr_vline_aboveskip_dim
\__tblr_get_vline_segment_child:nnnxx {#1} {#2} {##1}
{ \dim_eval:n { \l__tblr_row_ht_dim } }
- { \dim_eval:n { \l__tblr_row_dp_dim + \l__tblr_b_tl } }
- \skip_vertical:n { - \l__tblr_b_tl }
+ { \dim_eval:n { \l__tblr_row_dp_dim } }
+ \skip_vertical:N \l__tblr_vline_belowskip_dim
}
\box_set_wd:Nn \l__tblr_b_box { \l__tblr_w_tl }
\box_use:N \l__tblr_b_box
@@ -5565,6 +5911,68 @@
\box_use:N \l__tblr_c_box
}
+\dim_new:N \l__tblr_vline_aboveskip_dim
+\dim_new:N \l__tblr_vline_belowskip_dim
+
+%% Calculate above and below skips from abovepos and belowpos specifications
+%% #1: row number; #2: column number; #3: vline index;
+\cs_new_protected:Npn \__tblr_get_vline_above_below_skips:nnn #1 #2 #3
+ {
+ \tl_set:Nx \l__tblr_vline_abovepos_tl
+ { \__tblr_spec_item:ne { vline } { [#1][#2](#3) / abovepos } }
+ \tl_if_empty:NT \l__tblr_vline_abovepos_tl
+ {
+ \tl_set:Nn \l__tblr_vline_abovepos_tl {0} % default position
+ }
+ \tl_set:Nx \l__tblr_vline_belowpos_tl
+ { \__tblr_spec_item:ne { vline } { [#1][#2](#3) / belowpos } }
+ \tl_if_empty:NT \l__tblr_vline_belowpos_tl
+ {
+ \tl_set:Nn \l__tblr_vline_belowpos_tl {0} % default position
+ }
+ \fp_compare:nNnF { \l__tblr_vline_abovepos_tl } = {0}
+ {
+ \dim_set:Nn \l_tmpa_dim
+ { \__tblr_spec_item:ne { hline } { [#1] / @hline-height } }
+ \fp_compare:nNnTF { \l__tblr_vline_abovepos_tl } < {0}
+ {
+ \dim_set:Nn \l__tblr_vline_aboveskip_dim
+ { - \l__tblr_vline_abovepos_tl \l__tblr_row_abovesep_dim }
+ }
+ {
+ \dim_set:Nn \l__tblr_vline_aboveskip_dim
+ { - \l__tblr_vline_abovepos_tl \l_tmpa_dim }
+ }
+ }
+ %% To join two vline segment above and below a cline,
+ %% we choose to extend every vline downwards a little (#55).
+ \fp_compare:nNnTF { \l__tblr_vline_belowpos_tl } = {0}
+ {
+ \dim_set:Nn \l__tblr_vline_belowskip_dim
+ {
+ - \__tblr_spec_item:ne { hline }
+ { [\int_eval:n { #1 + 1 }](1) / @hline-height }
+ + 0pt
+ }
+ }
+ {
+ \dim_set:Nn \l_tmpa_dim
+ {
+ \__tblr_spec_item:ne { hline }
+ { [\int_eval:n { #1 + 1 }] / @hline-height }
+ }
+ \fp_compare:nNnTF { \l__tblr_vline_belowpos_tl } < {0}
+ {
+ \dim_set:Nn \l__tblr_vline_belowskip_dim
+ { - \l__tblr_vline_belowpos_tl \l__tblr_row_belowsep_dim }
+ }
+ {
+ \dim_set:Nn \l__tblr_vline_belowskip_dim
+ { - \l__tblr_vline_belowpos_tl \l_tmpa_dim }
+ }
+ }
+ }
+
\tl_new:N \l__tblr_cell_rowspan_tl
\tl_new:N \l__tblr_cell_colspan_tl
\dim_new:N \l__tblr_cell_wd_dim
@@ -5609,9 +6017,13 @@
{
\hbox_set_to_wd:Nnn \l__tblr_a_box { \l__tblr_cell_wd_dim }
{
- \tl_if_eq:NnF \g__tblr_cell_halign_tl {l} { \hfil }
- \__tblr_get_cell_text:nn {#1} {#2}
- \tl_if_eq:NnF \g__tblr_cell_halign_tl {r} { \hfil }
+ \tl_if_eq:NnTF \g__tblr_cell_halign_tl {j}
+ { \__tblr_get_cell_text:nn {#1} {#2} }
+ {
+ \tl_if_eq:NnF \g__tblr_cell_halign_tl {l} { \hfil }
+ \__tblr_get_cell_text:nn {#1} {#2}
+ \tl_if_eq:NnF \g__tblr_cell_halign_tl {r} { \hfil }
+ }
}
\vbox_set_to_ht:Nnn \l__tblr_b_box { \l__tblr_cell_ht_dim }
{
@@ -6043,10 +6455,56 @@
\NewTblrLibrary { booktabs }
{
- \NewTableCommand \toprule [1] [] { \hline [0.08em, ##1] }
- \NewTableCommand \midrule [1] [] { \hline [0.05em, ##1] }
- \NewTableCommand \bottomrule [1] [] { \hline [0.08em, ##1] }
- \NewTableCommand \cmidrule [2] [] { \cline [0.03em, ##1] { ##2 } }
+ % We only use dimensions \aboverulesep and \belowrulesep in booktabs package
+ \RequirePackage { booktabs }
+ \newcommand \tblr@booktabs@hline [1] [] { \hline [##1] }
+ \newcommand \tblr@booktabs@oldhline [1] [] {
+ \hline [abovespace = \aboverulesep, belowspace = \belowrulesep, ##1]
+ }
+ \newcommand \tblr@booktabs@cline [2] [] { \cline [##1] {##2} }
+ \newcommand \tblr@booktabs@oldcline [2] [] {
+ \cline [abovespace = \aboverulesep, belowspace = \belowrulesep, ##1] {##2}
+ }
+ \newcommand \tblr@booktabs@cline@more [2] [] { \SetHline [+] {##2} {##1} }
+ \newcommand \tblr@booktabs@oldcline@more [2] [] {
+ \SetHline [+] {##2} {
+ abovespace = \aboverulesep, belowspace = \belowrulesep, ##1
+ }
+ }
+ \NewTableCommand \toprule [1] [] {
+ \tblr@booktabs@hline [wd=\heavyrulewidth, ##1]
+ }
+ \NewTableCommand \midrule [1] [] {
+ \tblr@booktabs@hline [wd=\lightrulewidth, ##1]
+ }
+ \NewTableCommand \bottomrule [1] [] {
+ \tblr@booktabs@hline [wd=\heavyrulewidth, ##1]
+ }
+ \NewTableCommand \cmidrule [2] [] {
+ \tblr@booktabs@cline [wd=\cmidrulewidth, endpos, ##1] {##2}
+ }
+ \NewTableCommand \cmidrulemore [2] [] {
+ \tblr@booktabs@cline@more [wd=\cmidrulewidth, endpos, ##1] {##2}
+ }
+ \newcommand \tblr@booktabs@change@more [1] { \cmidrulemore }
+ \NewTableCommand \morecmidrules {
+ \peek_meaning:NTF \cmidrule { \tblr@booktabs@change@more } { \relax }
+ }
+ \NewTblrEnviron { booktabs }
+ \SetTblrInner [ booktabs ] { rowsep = 0pt }
+ \RequirePackage { etoolbox }
+ \AtBeginEnvironment { booktabs }
+ {
+ \let \tblr@booktabs@hline = \tblr@booktabs@oldhline
+ \let \tblr@booktabs@cline = \tblr@booktabs@oldcline
+ \let \tblr@booktabs@cline@more = \tblr@booktabs@oldcline@more
+ }
+ \NewTableCommand \specialrule [3]
+ { \hline [##1, abovespace = ##2, belowspace = ##3] }
+ \NewTableCommand \addrowspace [1] [\defaultaddspace]
+ { \SetVspace { abovespace+ = (##1) / 2, belowspace+ = (##1) / 2 } }
+ \NewTableCommand \addlinespace [1] [\defaultaddspace]
+ { \SetVspace { abovespace+ = (##1) / 2, belowspace+ = (##1) / 2 } }
}
%% Library diagbox and command \diagbox
@@ -6136,4 +6594,12 @@
}
}
-\ExplSyntaxOff
+%% Library varwidth and measure option
+
+\NewTblrLibrary { varwidth }
+ {
+ \RequirePackage { varwidth }
+ \clist_gput_left:Nn \g__tblr_table_known_keys_clist { measure }
+ \keys_define:nn { tblr } { measure .tl_set:N = \l__tblr_inner_spec_measure_tl }
+ }
+
diff --git a/macros/latex/contrib/tabularray/tabularray.tex b/macros/latex/contrib/tabularray/tabularray.tex
index 1e5b4a104e..0d502f3bbc 100644
--- a/macros/latex/contrib/tabularray/tabularray.tex
+++ b/macros/latex/contrib/tabularray/tabularray.tex
@@ -11,7 +11,7 @@
\usepackage[firstpage=true]{background}
\backgroundsetup{contents={}}
-\UseTblrLibrary{booktabs,diagbox,siunitx}
+\UseTblrLibrary{booktabs,diagbox,siunitx,varwidth}
\usepackage{hyperref}
\hypersetup{
@@ -24,6 +24,7 @@
\tcbset{sharp corners, boxrule=0.5pt, colback=red9}
\usepackage{float}
+%\usepackage{enumerate}
\setcounter{tocdepth}{1}
@@ -59,7 +60,7 @@
\renewcommand*{\thefootnote}{*}
-\newcommand*{\myversion}{2021M}
+\newcommand*{\myversion}{2021N}
\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
\colorlet{highback}{azure9}
@@ -112,7 +113,7 @@
\noindent
\begin{tblr}{
- colspec = {lX}, colsep = 12mm, hlines = {2pt, white},
+ colspec = {rX}, colsep = 8mm, hlines = {2pt, white},
row{odd} = {azure8}, row{even} = {gray8},
row{1} = {6em,azure2,fg=white,font=\LARGE\bfseries\sffamily},
row{2-Z} = {3em,font=\Large},
@@ -122,13 +123,14 @@
Version & \myversion\ (\the\year-\mylpad\month-\mylpad\day) \\
Code & \url{https://github.com/lvjr/tabularray} \\
Code & \url{https://bitbucket.org/lvjr/tabularray} \\
- Issue & \url{https://github.com/lvjr/tabularray/issues} \\
Forum & \url{https://github.com/lvjr/tabularray/discussions} \\
+ Forum & \url{https://tex.stackexchange.com/questions/tagged/tabularray} \\
+ Issue & \url{https://github.com/lvjr/tabularray/issues} \\
\end{tblr}
-\begin{codehigh}[boxsep=6mm]
+\begin{codehigh}[boxsep=4mm]
\begin{tblr}{
- colspec = {lX}, colsep = 12mm, hlines = {2pt, white},
+ colspec = {rX}, colsep = 8mm, hlines = {2pt, white},
row{odd} = {azure8}, row{even} = {gray8},
row{1} = {6em,azure2,fg=white,font=\LARGE\bfseries\sffamily},
row{2-Z} = {3em,font=\Large},
@@ -138,8 +140,9 @@
Version & \myversion\ (\the\year-\mylpad\month-\mylpad\day) \\
Code & \url{https://github.com/lvjr/tabularray} \\
Code & \url{https://bitbucket.org/lvjr/tabularray} \\
- Issue & \url{https://github.com/lvjr/tabularray/issues} \\
Forum & \url{https://github.com/lvjr/tabularray/discussions} \\
+ Forum & \url{https://tex.stackexchange.com/questions/tagged/tabularray} \\
+ Issue & \url{https://github.com/lvjr/tabularray/issues} \\
\end{tblr}
\end{codehigh}
@@ -565,7 +568,7 @@ With \verb!tabularray! package, you can change the styles of tables via old inte
The old interfaces consist of some table commands inside the table contents.
Same as \verb!tabular! and \verb!array! environments,
-all table commands \textcolor{red3}{must} be put at the beginning ot the cell text.
+all table commands \textcolor{red3}{must} be put at the beginning of the cell text.
Also, new table commands \textcolor{red3}{must} be defined with \verb!\NewTableCommand!.
The new interfaces consist of some options inside the mandatory argument,
@@ -590,18 +593,38 @@ hence totally separating the styles and the contents of tables.
\section{Hlines and Vlines}
-All available keys for hlines and vlines are described in Table \ref{key:hvline}.
+All available keys for hlines and vlines are described in Table \ref{key:hline} and Table \ref{key:vline}.
\begin{spectblr}[
- caption = {Keys for Hlines and Vlines},
- label = {key:hvline},
+ caption = {Keys for Hlines},
+ label = {key:hline},
+ remark{Note} = {In most cases, you can omit the underlined key names and write only their values.}
+]{}
+ Key & Description and Values & Initial Value \\
+ \underline{\K{dash}} & dash style: \V{solid}, \V{dashed} or \V{dotted} & \V{solid} \\
+ \K{text} & replace hline with text (like \V{!} specifier in \K{rowspec}) & \None \\
+ \underline{\K{wd}} & rule width dimension & \V{0.4pt} \\
+ \underline{\K{fg}} & rule color name & \None \\
+ \K{leftpos} & crossing or trimming position at the left side & \V{1} \\
+ \K{rightpos} & crossing or trimming position at the right side & \V{1} \\
+ \K{abovespace} & set \V{belowsep} of previous row (see Table \ref{key:row}) & \V{2pt} \\
+ \K{belowspace} & set \V{abovesep} of current row (see Table \ref{key:row}) & \V{2pt} \\
+ \K{abovespace+} & increase \V{belowsep} of previous row & \None \\
+ \K{belowspace+} & increase \V{abovesep} of current row & \None \\
+\end{spectblr}
+\vspace{-2em}
+\begin{spectblr}[
+ caption = {Keys for Vlines},
+ label = {key:vline},
remark{Note} = {In most cases, you can omit the underlined key names and write only their values.}
]{}
Key & Description and Values & Initial Value \\
\underline{\K{dash}} & dash style: \V{solid}, \V{dashed} or \V{dotted} & \V{solid} \\
- \K{text} & replace hline/vline with text (like \V{!} specifier in \K{colspec}) & \None \\
- \underline{\K{wd}} & rule width dimension & \None \\
+ \K{text} & replace vline with text (like \V{!} specifier in \K{colspec}) & \None \\
+ \underline{\K{wd}} & rule width dimension & \V{0.4pt} \\
\underline{\K{fg}} & rule color name & \None \\
+ \K{abovepos} & crossing or trimming position at the above side & \V{0} \\
+ \K{belowpos} & crossing or trimming position at the below side & \V{0} \\
\end{spectblr}
\subsection{Hlines and Vlines in New Interfaces}
@@ -675,8 +698,10 @@ Another pair of braces before will draw more hlines/vlines (in which \verb!-! st
\end{tblr}
\end{demohigh}
+Note that you \underline{must} use indexes in order: first 1, then 2, etc.
+
Options \verb!hline{i}! and \verb!vline{j}! are for setting some hlines and vlines, respectively.
-Their values are the same as options \verb!hliness! and \verb!vlines!:
+Their values are the same as options \verb!hlines! and \verb!vlines!:
\begin{demohigh}
\begin{tblr}{
@@ -731,10 +756,49 @@ Now we show the usage of \verb!text! key by the following example%
You need to load \verb!chemmacros! package for the \verb!\ch! command.
+The \verb!leftpos! and \verb!rightpos! keys specify crossing or trimming positions for hlines.
+The possible values for them are decimal numbers between \verb!-1! and \verb!1!.
+Their initial values are \verb!1!.
+
+\begin{center}
+\begin{tblr}{width=0.5\textwidth,colspec={rX[l]},hlines}
+ -1 & the hline is trimmed by \V{colsep} \\
+ 0 & the hline only touches the first vline \\
+ 1 & the hline touches all the vlines \\
+\end{tblr}
+\end{center}
+
+The \verb!abovepos! and \verb!belowpos! keys for vlines have similar meanings.
+But their initial values are \verb!0!.
+
+\begin{center}
+\begin{tblr}{width=0.5\textwidth,colspec={rX[l]},hlines}
+ -1 & the vline is trimmed by \V{rowsep} \\
+ 0 & the vline only touches the first hline \\
+ 1 & the vline touches all the hlines \\
+\end{tblr}
+\end{center}
+
+Here is an example for these four keys:
+
+\begin{demohigh}
+\begin{tblr}{
+ hline{1,4} = {1}{-}{},
+ hline{1,4} = {2}{-}{},
+ hline{2,3} = {1}{-}{leftpos = -1, rightpos = -1},
+ hline{2,3} = {2}{-}{leftpos = -1, rightpos = -1},
+ vline{1,4} = {abovepos = 1, belowpos = 1},
+}
+ Alpha & Beta & Gamma \\
+ Epsilon & Zeta & Eta \\
+ Iota & Kappa & Lambda \\
+\end{tblr}
+\end{demohigh}
+
\subsection{Hlines and Vlines in Old Interfaces}
The \verb!\hline! command has an optional argument which accepts key-value options.
-The available keys are described in Table \ref{key:hvline}.
+The available keys are described in Table \ref{key:hline}.
\begin{demohigh}
\begin{tblr}{llll}
@@ -821,7 +885,7 @@ All available keys for cells are described in Table \ref{key:cell} and Table \re
]{}
Key & Description and Values & Initial Value \\
\underline{\K{halign}}
- & horizontal alignment: \V{l} (left), \V{c} (center), or \V{r} (right)
+ & horizontal alignment: \V{l} (left), \V{c} (center), \V{r} (right) or \V{j} (justify)
& \V{l} \\
\underline{\K{valign}}
& vertical alignment: \V{t} (top), \V{m} (middle), \V{b} (bottom),
@@ -2022,8 +2086,9 @@ To avoid potential conflict, you need to enable them with \verb!\UseTblrLibrary!
\section{Library \texttt{booktabs}}
-When you write \verb!\UseTblrLibrary{booktabs}!,
-\verb!tabularray! package will define commands \verb!\toprule!, \verb!\midrule!,
+With \verb!\UseTblrLibrary{booktabs}! in the preamble of the document,
+\verb!tabularray! will load \verb!booktabs! package,
+and define \verb!\toprule!, \verb!\midrule!,
\verb!\bottomrule! and \verb!\cmidrule! inside \verb!tblr! environment.
\begin{demohigh}
@@ -2040,24 +2105,113 @@ When you write \verb!\UseTblrLibrary{booktabs}!,
\end{tblr}
\end{demohigh}
-At this moment, \verb!trim! options for \verb!\cmidrule! command are not supported.
-(As a workaround, you may insert an empty column to separate two \verb!\cmidrule!'s.)
-But rule colors are possible just like \verb!\hline! and \verb!\cline! commands.
+Just like \verb!\hline! and \verb!\cline! commands,
+you can also specify rule width and color in the optional argument of any of these commands.
\begin{demohigh}
\begin{tblr}{llll}
-\toprule[purple3]
- Alpha & Beta & Gamma & Delta \\
+\toprule[2pt,purple3]
+ Alpha & Beta & Gamma & Delta \\
\midrule[blue3]
+ Epsilon & Zeta & Eta & Theta \\
+\cmidrule[azure3]{2-3}
+ Iota & Kappa & Lambda & Mu \\
+\bottomrule[2pt,purple3]
+\end{tblr}
+\end{demohigh}
+
+If you need more than one cmidrules, you can use \verb!\cmidrulemore! command.
+
+\begin{demohigh}
+\begin{tblr}{llll}
+\toprule
+ Alpha & Beta & Gamma & Delta \\
+\cmidrule{1-3} \cmidrulemore{2-4}
Epsilon & Zeta & Eta & Theta \\
-\cmidrule[azure3]{1-3}
+\cmidrule{1-3} \morecmidrules \cmidrule{2-4}
Iota & Kappa & Lambda & Mu \\
-\cmidrule[azure3]{2-4}
- Nu & Xi & Omicron & Pi \\
-\bottomrule[purple3]
+\bottomrule
\end{tblr}
\end{demohigh}
+From version \verb!2021N!, trim options (\verb!l!, \verb!r!, \verb!lr!)
+for \verb!\cmidrule! command are also supported.
+
+\begin{demohigh}
+\begin{tblr}{llll}
+\toprule
+ Alpha & Beta & Gamma & Delta \\
+\cmidrule[lr]{1-2} \cmidrule[lr=-0.4]{3-4}
+ Epsilon & Zeta & Eta & Theta \\
+\cmidrule[r]{1-2} \cmidrule[l]{3-4}
+ Iota & Kappa & Lambda & Mu \\
+\bottomrule
+\end{tblr}
+\end{demohigh}
+
+Note that you need to put \verb!l!, \verb!r! or \verb!lr! option into
+the \underline{\color{red3}square brackets}.
+and the possible values are decimal numbers between \verb!-1! and \verb!0!,
+where \verb!-1! means trimming the whole colsep, and \verb!0! means no trimming.
+The default value is \verb!-0.8!, which makes similar result as \verb!booktabs! package does.
+
+There is also a \verb!booktabs! environment for you. With this environment,
+the default \verb!rowsep=0pt!, but extra vertical space will be added by
+\verb!\toprule!, \verb!\midrule!, \verb!\bottomrule! and \verb!\cmidrule! commands.
+The sizes of vertical space are determined by \verb!\aboverulesep! and \verb!\belowrulesep! dimensions.
+
+\begin{demohigh}
+\begin{booktabs}{
+ colspec = lcccc,
+ cell{1}{1} = {r=2}{}, cell{1}{2,4} = {c=2}{},
+}
+\toprule
+ Sample & I & & II & \\
+\cmidrule[lr]{2-3} \cmidrule[lr]{4-5}
+ & A & B & C & D \\
+\midrule
+ S1 & 5 & 6 & 7 & 8 \\
+ S2 & 6 & 7 & 8 & 5 \\
+ S3 & 7 & 8 & 5 & 6 \\
+\bottomrule
+\end{booktabs}
+\end{demohigh}
+% S4 & 8 & 5 & 6 & 7 \\
+
+You can also use \verb!\specialrule! command.
+The second argument sets \verb!belowsep! of previous row,
+and the third argument sets \verb!abovesep! of current row,
+
+\begin{demohigh}
+\begin{booktabs}{row{2}={olive9}}
+\toprule
+ Alpha & Beta & Gamma & Delta \\
+\specialrule{0.5pt}{4pt}{6pt}
+ Epsilon & Zeta & Eta & Theta \\
+\specialrule{0.8pt,blue3}{3pt}{2pt}
+ Iota & Kappa & Lambda & Mu \\
+\bottomrule
+\end{booktabs}
+\end{demohigh}
+
+At last, there is also an \verb!\addlinespace! command.
+You can specify the size of vertical space to be added in its optional argument,
+and the default size is \verb!0.5em!.
+This command adds one half of the space to \verb!belowsep! of previous row,
+and the other half to \verb!abovesep! of current row.
+
+\begin{demohigh}
+\begin{booktabs}{row{2}={olive9}}
+\toprule
+ Alpha & Beta & Gamma & Delta \\
+\addlinespace
+ Epsilon & Zeta & Eta & Theta \\
+\addlinespace[1em]
+ Iota & Kappa & Lambda & Mu \\
+\bottomrule
+\end{booktabs}
+\end{demohigh}
+
\section{Library \texttt{diagbox}}
When writing \verb!\UseTblrLibrary{diagbox}! in the preamble of the document,
@@ -2102,39 +2256,31 @@ and defines \verb!S! column as \verb!Q! column with \verb!si! key.
\begin{demohigh}
\begin{tblr}{
hlines, vlines,
- colspec={
- S[table-format=3.2]
- S[table-format=3.2]
- S[table-format=3.2]
- }
+ colspec={S[table-format=3.2]S[table-format=3.2]},
}
- {{{Head}}} & {{{Head}}} & {{{Head}}} \\
- 111 & 111 & 111 \\
- 2.1 & 2.2 & 2.3 \\
- 33.11 & 33.22 & 33.33 \\
+ {{{Head}}} & {{{Head}}} \\
+ 111 & 111 \\
+ 2.1 & 2.2 \\
+ 33.11 & 33.22 \\
\end{tblr}
\end{demohigh}
\begin{demohigh}
\begin{tblr}{
hlines, vlines,
- colspec={
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- }
+ colspec={Q[si={table-format=3.2},c]Q[si={table-format=3.2},c]}
}
- {{{Head}}} & {{{Head}}} & {{{Head}}} \\
- 111 & 111 & 111 \\
- 2.1 & 2.2 & 2.3 \\
- 33.11 & 33.22 & 33.33 \\
+ {{{Head}}} & {{{Head}}} \\
+ 111 & 111 \\
+ 2.1 & 2.2 \\
+ 33.11 & 33.22 \\
\end{tblr}
\end{demohigh}
-Note that you need to use \underline{triple} pairs of braces to guard non-numeric cells.
+Note that you need to use \underline{\color{red3}triple} pairs of braces to guard non-numeric cells.
Also you must use \verb!l!, \verb!c! or \verb!r! to set horizontal alignment for non-numeric cells:
-
+\nopagebreak
\begin{demohigh}
\begin{tblr}{
hlines, vlines, columns={6em},
@@ -2157,6 +2303,30 @@ Both \verb!S! and \verb!s! columns are supported. In fact, These two columns are
\NewColumnType{s}[1][]{Q[si={##1},c,cmd=\TblrUnit]}
\end{codehigh}
+\section{Library \texttt{varwidth}}
+
+To build a nice table, \verb!tabularray! need to measure the widths of cells.
+By default, it uses \verb!\hbox! to measure the sizes.
+This causes an error if a cell contains some vertical material, such as lists or display maths.
+
+With \verb!\UseTblrLibrary{varwidth}! in the preamble of the document,
+\verb!tabularray! loads \verb!varwidth! package,
+and adds a new inner specification \verb!measure! for tables.
+After setting \verb!measure=vbox!, it will use \verb!\vbox! to measure cell widths.
+
+\begin{demohigh}
+\begin{tblr}{measure=vbox}
+\hline
+ Text Text Text Text Text Text Text
+ \begin{itemize}
+ \item List List List List List List
+ \item List List List List List List List
+ \end{itemize}
+ Text Text Text Text Text Text Text \\
+\hline
+\end{tblr}
+\end{demohigh}
+
\chapter{The Source Code}
%\CodeHigh{lite}
diff --git a/macros/latex/contrib/uni-titlepage/README.md b/macros/latex/contrib/uni-titlepage/README.md
index 1ba65bc61f..9386dbe962 100644
--- a/macros/latex/contrib/uni-titlepage/README.md
+++ b/macros/latex/contrib/uni-titlepage/README.md
@@ -2,7 +2,7 @@
Copyright (c) Markus Kohm <komascript at gmx.info>
-Release: 2021/08/16 v0.6
+Release: 2021/09/01 v0.7
License: LPPL 1.3c
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-DHBW.pdf b/macros/latex/contrib/uni-titlepage/titlepage-DHBW.pdf
index c3d9bc881d..02068b9734 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-DHBW.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-DHBW.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-JT-Aufsaetze.pdf b/macros/latex/contrib/uni-titlepage/titlepage-JT-Aufsaetze.pdf
index 518b266acd..2f566a32fd 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-JT-Aufsaetze.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-JT-Aufsaetze.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-JT-Geschichte.pdf b/macros/latex/contrib/uni-titlepage/titlepage-JT-Geschichte.pdf
index 7eaaed4be7..7e0707a6e5 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-JT-Geschichte.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-JT-Geschichte.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-JT-Typography.pdf b/macros/latex/contrib/uni-titlepage/titlepage-JT-Typography.pdf
index f54dfb332e..f4624aa528 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-JT-Typography.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-JT-Typography.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-KIT.pdf b/macros/latex/contrib/uni-titlepage/titlepage-KIT.pdf
index 15008ef21c..fe2204f7bc 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-KIT.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-KIT.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-KOMAScript.pdf b/macros/latex/contrib/uni-titlepage/titlepage-KOMAScript.pdf
index 9e6254c1f6..fef8094c68 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-KOMAScript.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-KOMAScript.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-Markus-1.pdf b/macros/latex/contrib/uni-titlepage/titlepage-Markus-1.pdf
index c29fe66bce..0df124c56a 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-Markus-1.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-Markus-1.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-Markus-2.pdf b/macros/latex/contrib/uni-titlepage/titlepage-Markus-2.pdf
index 62980fb613..0a3da486d0 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-Markus-2.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-Markus-2.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-Spacer.pdf b/macros/latex/contrib/uni-titlepage/titlepage-Spacer.pdf
index 0cef72436d..4d81e0f293 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-Spacer.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-Spacer.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-TU-DD.pdf b/macros/latex/contrib/uni-titlepage/titlepage-TU-DD.pdf
index f57767dbe2..b3e01d9bfa 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-TU-DD.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-TU-DD.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-TU-HH.pdf b/macros/latex/contrib/uni-titlepage/titlepage-TU-HH.pdf
index ff2ea43f52..19afe66206 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-TU-HH.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-TU-HH.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-UKoLa.pdf b/macros/latex/contrib/uni-titlepage/titlepage-UKoLa.pdf
new file mode 100644
index 0000000000..0eafc0d6f3
--- /dev/null
+++ b/macros/latex/contrib/uni-titlepage/titlepage-UKoLa.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/titlepage-WWUM.pdf b/macros/latex/contrib/uni-titlepage/titlepage-WWUM.pdf
index 1b63a2e183..50eb4a7abd 100644
--- a/macros/latex/contrib/uni-titlepage/titlepage-WWUM.pdf
+++ b/macros/latex/contrib/uni-titlepage/titlepage-WWUM.pdf
Binary files differ
diff --git a/macros/latex/contrib/uni-titlepage/uni-titlepage.dtx b/macros/latex/contrib/uni-titlepage/uni-titlepage.dtx
index e5cea81704..cb5d3bf669 100644
--- a/macros/latex/contrib/uni-titlepage/uni-titlepage.dtx
+++ b/macros/latex/contrib/uni-titlepage/uni-titlepage.dtx
@@ -63,6 +63,7 @@
%<JT-Geschichte> -JT-Geschichte%
%<JT-Typography> -JT-Typography%
%<WWUM> -WWUM%
+%<UKoLa> -UKoLa%
%<*dtx>
.dtx%
%</dtx>
@@ -80,10 +81,10 @@
}[%
%</!README>
%<README>
-%<README>Release: 2021/08/16 v0.6
+%<README>Release: 2021/09/01 v0.7
%<README>
%<README>License: LPPL 1.3c
-%<!README>2021/08/16 v0.6
+%<!README>2021/09/01 v0.7
%<README>
KOMA presents the title page project
%<*!README>
@@ -176,88 +177,96 @@ KOMA presents the title page project
% \endfoot
% \bottomrule
% \endlastfoot
-% advisor & TU-DD & if your personal advisor differs from the
+% advisor & TU-DD, UKoLa & if your personal advisor differs from the
% advising professor, this is the name of
% the advisor
% \\
% author & \normalfont\emph{every style}
% & the authors, with some styles (currently
-% not with \texttt{DHBW}) you may seperate
-% multiple authors by \cs{and}
+% not with \texttt{DHBW} or \texttt{UKoLa})
+% you may seperate multiple authors by
+% \cs{and}
% \tabularnewline
-% chair & TU-DD, KIT, WWUM & the chair of the faculty of the university
-% where you've made or presented your work
+% chair & TU-DD, KIT, WWUM, UKoLa
+% & the chair or institure of the faculty of
+% the university where you've made or
+% presented your work
% \tabularnewline
% company & DHBW & some works are made not only at a
% university but in cooperation with a
% company; at Duale Hochschule
% Baden-W\"urttemberg this is the default
% case
-% \\
+% \tabularnewline
% course & DHBW & the shortcut for your discipline or course
-% \\
+% \tabularnewline
% date & DHBW, KIT, KOMAScript, Markus-1, Markus-2, Spacer, TU-HH,
% TU-DD, JT-Typography, WWUM
% & the documents main date, this may by,
% e.\,g., the release date, the semester of a
% thesis or any other most valid date
-% \\
+% \tabularnewline
% dedication & KOMAScript, Markus-1, Markus-2, Spacer
% & sometimes it is nice to dedicate the work
% to someone, e.g., your wife, your
% children, your grandmother or your first
% love
-% \\
+% \tabularnewline
% academicgrade
-% & DHBW, TU-HH, WUMM & the academic grade or degree you
+% & DHBW, TU-HH, WUMM, UKoLa
+% & the academic grade or degree you
% reach with the work
-% \\
+% \tabularnewline
% discipline & DHBW, TU-DD, WUMM & the discipline in which you've made your
% work or reach your academic grade
-% \\
+% \tabularnewline
% duration & DHBW & the processing time for your work
-% \\
+% \tabularnewline
% faculty & TU-DD, KIT, WUMM & the faculty of the university where you've
% made or presented your work
-% \\
+% \tabularnewline
% homepage & KIT & the www-address of the homepage
-% \\
-% mainlogo & DHBW, KIT & a logo at the main title (currently used
+% \tabularnewline
+% mainlogo & DHBW, KIT, UKoLa & a logo at the main title (currently used
% for the DHBW or the KIT logo at the
-% default of \texttt{titlehead})
-% \\
+% default of \texttt{titlehead} and the
+% main logo of style \texttt{UKoLa})
+% \tabularnewline
+% secondlogo & UKoLa & a secondary logo
+% \tabularnewline
% matriculationnumber
% & DHBW, TU-DD & if you were a student while you've made
% the work, this is you number
-% \\
+% \tabularnewline
% oralexaminationdate
% & TU-HH, WUMM & sometimes the date of the oral examination
% is not the main date but has to be shown
% too
-% \\
-% place & DHBW, TU-HH, JT-Geschichte, JT-Typography, WUMM
+% \tabularnewline
+% place & DHBW, TU-HH, JT-Geschichte, JT-Typography, WUMM, UKoLa
% & the place, in general the city, where
% you've made the work or where the Duale
% Hochschule or the publisher resides
-% \\
+% \tabularnewline
% professor & TU-DD, WUMM & the name of the professor who advised you
% during your work
-% \\
+% \tabularnewline
% publisher & KOMAScript, Markus-1, Markus-2, Spacer, JT-Aufsaetze,
% JT-Geschichte, JT-Typography
% & most written works have a publisher
-% \\
-% referee & DHBW, TU-HH & every academic work will be referred;
+% \tabularnewline
+% referee & DHBW, TU-HH, UKoLa & every academic work will be referred;
% with some styles (currently
-% \texttt{TU-HH}, \texttt{WWUM}) multiple
+% \texttt{TU-HH}, \texttt{WWUM},
+% \texttt{UKoLa}) multiple
% referees may be seperated with \cs{and}
-% \\
+% \tabularnewline
% sience & WWUM & kind of sience,
% e.\,g., ``Naturwissenschaften''
-% \\
+% \tabularnewline
% student & \normalfont\emph{see \texttt{author}}
% & same like \texttt{author}
-% \\
+% \tabularnewline
% subject & \normalfont\emph{every style}
% & the kind of work, there are special
% predefined subjects; if you use one of
@@ -268,21 +277,21 @@ KOMA presents the title page project
% a language dependend replacement will
% be done; to avoid this, you may set the
% value in parentesis
-% \\
+% \tabularnewline
% subtitle & KOMAScript, Markus-1, Markus-2, Spacer, TU-HH
% & the sub-title of the document
-% \\
+% \tabularnewline
% title & \normalfont\emph{every style}
% & the main title of the document
-% \\
+% \tabularnewline
% titlehead & DHBW, KOMAScript, Markus-2, Spacer, KIT
% & page head over the main title of the
% document
-% \\
+% \tabularnewline
% university & DHBW, TU-DD, TU-HH, KIT, WWUM
% & the university where you've made or
% presented your work
-% \\
+% \tabularnewline
% \end{xltabular}
%
% Let's have a look at the already defined title page styles. You should find
@@ -693,7 +702,35 @@ KOMA presents the title page project
% \frame{\includegraphics[page=3,width=.5\textwidth]{titlepage-WWUM}}%^^A
% \frame{\includegraphics[page=4,width=.5\textwidth]{titlepage-WWUM}}%^^A
% \end{flushleft}
-
+%
+% \clearpage
+% \subsection{Style \File{UKoLa}}
+% \label{sec:Style-UKoLa}
+% \changes{v0.7}{2021/08/18}{new style \texttt{UKoLa}}
+%
+% In 2007 several students asked me for the title of the Universität
+% Koblenz-Landau. At that time, I've made a package for the title they asked
+% for. The package has been published at
+% \url{https://komascript.de/unikoblenzlandau} only. In 2021, after I've
+% published \Package{uni-titlepage}, it was time to implement this title also
+% as a title style definition. Note, this is not an official style of the
+% University Koblenz-Landau. Several referees can be separated by
+% \cs{and}. Female referees should be prefixed by \textsf{[f]}.
+% \begin{flushleft}
+% \parbox[b][.707\linewidth][t]{.475\linewidth}{\footnotesize The
+% page (in example \File{titlepage-UKoLa.tex}) is:
+% \begin{enumerate}
+% \item main title page with \texttt{mainlogo}, \texttt{secondlogo},
+% \texttt{title}, \texttt{subject}, \texttt{academicgrade},
+% \texttt{chair}, \texttt{dicipline}, \texttt{place}, \texttt{author},
+% \texttt{referee}, and \texttt{date}.
+% \end{enumerate}
+% }\hspace{0.025\linewidth}\nobreak
+% \frame{\includegraphics[page=1,width=.475\linewidth]{titlepage-UKoLa}}
+% \end{flushleft}
+% Note: The upper left corner is the logo placeholder. If you'd download the
+% logo from \url{http://www.uni-koblenz-landau.de/logo.png} and save it with
+% the name \verb|uni-koblenz-landau.png|, it would be used automaticly.
%
% \clearpage
%
@@ -854,6 +891,7 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\file{title-JT-Geschichte.def}{\from{uni-titlepage.dtx}{driver,JT-Geschichte}}%
\file{title-JT-Typography.def}{\from{uni-titlepage.dtx}{driver,JT-Typography}}%
\file{title-WWUM.def}{\from{uni-titlepage.dtx}{driver,WWUM}}%
+ \file{title-UKoLa.def}{\from{uni-titlepage.dtx}{driver,UKoLa}}%
\file{titlepage-DHBW.tex}{\from{uni-titlepage.dtx}{doc,example,DHBW}}%
\file{titlepage-KOMAScript.tex}{\from{uni-titlepage.dtx}{doc,example,KOMAScript}}%
\file{titlepage-Markus-1.tex}{\from{uni-titlepage.dtx}{doc,example,Markus,1}}%
@@ -866,6 +904,7 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\file{titlepage-JT-Geschichte.tex}{\from{uni-titlepage.dtx}{doc,example,JT-Geschichte}}%
\file{titlepage-JT-Typography.tex}{\from{uni-titlepage.dtx}{doc,example,JT-Typography}}%
\file{titlepage-WWUM.tex}{\from{uni-titlepage.dtx}{doc,example,WWUM}}%
+ \file{titlepage-UKoLa.tex}{\from{uni-titlepage.dtx}{doc,example,UKoLa}}%
\nopreamble\nopostamble
\file{README.md}{\from{uni-titlepage.dtx}{README}}%
}%
@@ -1410,6 +1449,18 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
% \end{option}
% \end{macro}
% \end{macro}
+% \begin{macro}{\secondlogo}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macro}{\@secondlogo}
+% \changes{v0.7}{2021/08/18}{new (internal)}
+% \begin{option}{secondlogo}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macrocode}
+\DefineSimpleTitleKey{secondlogo}
+% \end{macrocode}
+% \end{option}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\oralexaminationdate}
% \begin{macro}{\@oralexaminationdate}
% \begin{option}{oralexaminationdate}
@@ -1556,51 +1607,57 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
% \end{macrocode}
%
% \begin{macro}{\chairmanname}
-% \changes{v0.5}{2016/06/21}{new}%^^A
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5}{2016/06/21}{new}
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\projectpapername}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\seminarpapername}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\studentreserchname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\diplomathesisname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\degreethesisname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\masterthesisname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\bachelorthesisname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\presentedbyname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\advisorname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\thename}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\ofthename}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\fromname}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\fromplacename}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\malerefereename}
-% \changes{v0.5}{2016/06/21}{new}%^^A
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5}{2016/06/21}{new}
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\femalerefereename}
-% \changes{v0.5}{2016/06/21}{new}%^^A
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5}{2016/06/21}{new}
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
+% \begin{macro}{\ordinalmalerefereename}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macro}{\ordinalfemalerefereename}
+% \changes{v0.7}{2021/08/18}{new}
% \begin{macro}{\refereename}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\oralexaminationdatename}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\ordinal}
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
% \begin{macro}{\maleordinal}
-% \changes{v0.5}{2016/06/21}{new}%^^A
+% \changes{v0.5}{2016/06/21}{new}
% \begin{macro}{\femaleordinal}
-% \changes{v0.5}{2016/06/21}{new}%^^A
-% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}%^^A
+% \changes{v0.5}{2016/06/21}{new}
+% \changes{v0.5c}{2019/05/27}{not needed \cs{AtBeginDocument} removed}
+% \begin{macro}{\indatename}
+% \changes{v0.7}{2021/08/18}{new}
% Language dependent terms:
% \begin{macrocode}
\providecommand*{\chairmanname}{Chairman}
@@ -1620,6 +1677,8 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\providecommand*{\refereename}{Referee}
\providecommand*{\femalerefereename}{\refereename}
\providecommand*{\malerefereename}{\refereename}
+\providecommand*{\ordinalmalerefereename}{\englishordinalmalerefereename}
+\providecommand*{\ordinalfemalerefereename}{\englishordinalfemalerefereename}
\providecommand*{\oralexaminationdatename}{Date of Oral Examination}
\providecommand*{\atthename}{at}
\providecommand*{\durationname}{Processing Time}
@@ -1631,6 +1690,7 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\newcommand*{\ordinal}{\englishordinal}
\newcommand*{\femaleordinal}{\ordinal}
\newcommand*{\maleordinal}{\ordinal}
+\providecommand*{\indatename}{in}
\providecaptionname{american,australian,british,canadian,%
english,newzealand,UKenglish,USenglish}{\chairmanname}{Chairmain}%
\providecaptionname{american,australian,british,canadian,%
@@ -1666,6 +1726,12 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\providecaptionname{american,australian,british,canadian,%
english,newzealand,UKenglish,USenglish}{\refereename}{Referee}%
\providecaptionname{american,australian,british,canadian,%
+ english,newzealand,UKenglish,USenglish}{\ordinalmalerefereename}{%
+ \englishordinalmalerefereename}%
+\providecaptionname{american,australian,british,canadian,%
+ english,newzealand,UKenglish,USenglish}{\ordinalfemalerefereename}{%
+ \englishordinalfemalerefereename}%
+\providecaptionname{american,australian,british,canadian,%
english,newzealand,UKenglish,USenglish}{\oralexaminationdatename}{Date of
Oral Examination}%
\providecaptionname{american,australian,british,canadian,%
@@ -1681,6 +1747,8 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\providecaptionname{american,australian,british,canadian,%
english,newzealand,UKenglish,USenglish}{\examinationdatename}{Date of
Examination}%
+\providecaptionname{american,australian,british,canadian,%
+ english,newzealand,UKenglish,USenglish}{\indatename}{in}%
\providecaptionname{german,ngerman,austrian,naustrian,%
swissgerman,nswissgerman}{\chairmanname}{Dekan/Dekanin}%
\providecaptionname{german,ngerman,austrian,naustrian,%
@@ -1718,6 +1786,12 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\providecaptionname{german,ngerman,austrian,naustrian,%
swissgerman,nswissgerman}{\refereename}{Gutachter}%
\providecaptionname{german,ngerman,austrian,naustrian,%
+ swissgerman,nswissgerman}{\ordinalmalerefereename}{%
+ \germanordinalmalerefereename}%
+\providecaptionname{german,ngerman,austrian,naustrian,%
+ swissgerman,nswissgerman}{\ordinalfemalerefereename}{%
+ \germanordinalfemalerefereename}%
+\providecaptionname{german,ngerman,austrian,naustrian,%
swissgerman,nswissgerman}{\femalerefereename}{Gutachterin}%
\providecaptionname{german,ngerman,austrian,naustrian,%
swissgerman,nswissgerman}{\oralexaminationdatename}{Datum der m\"undlichen
@@ -1734,7 +1808,75 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
swissgerman,nswissgerman}{\examinationname}{Pr\"ufung}%
\providecaptionname{german,ngerman,austrian,naustrian,%
swissgerman,nswissgerman}{\examinationdatename}{Tag der Pr\"ufung}%
+\providecaptionname{german,ngerman,austrian,naustrian,%
+ swissgerman,nswissgerman}{\indatename}{im}%
% \end{macrocode}
+% \begin{macro}{\englishordinalmalerefereename}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macrocode}
+\newcommand*{\englishordinalmalerefereename}[1]{%
+ \englishordinal{#1} \refereename%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\englishordinalfemalerefereename}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macrocode}
+\newcommand*{\englishordinalfemalerefereename}[1]{%
+ \englishordinalmalereferename{#1}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\germanordinalmalerefereename}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macrocode}
+\newcommand*{\germanordinalmalerefereename}[1]{%
+ \ifnum #1<\@ne
+ \PackageError{uni-titlepage}{Ordinal of `#1' not defined}{%
+ This package does only define German ordinal names for referees from 1}%
+ \else
+ \ifcase #1\or Erstgutachter\or Zweitgutachter\or Drittgutachter%
+ \or Viertgutachter\else
+ \PackageError{uni-titlepage}{Ordinal of `#1' not defined}{%
+ This package does only define German ordinal names for referees up
+ to 4}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\germanordinalfemalerefereename}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macrocode}
+\newcommand*{\germanordinalfemalerefereename}[1]{%
+ \germanordinalfemalerefereename{#1}in%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\germanordinalmalecorrectorname}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macrocode}
+\newcommand*{\germanordinalmalecorrectorname}[1]{%
+ \ifnum #1<\@ne
+ \PackageError{uni-titlepage}{Ordinal of `#1' not defined}{%
+ This package does only define German ordinal names for correctors from 1}%
+ \else
+ \ifcase #1\or Erstkorrektor\or Zweitkorrektor\or Drittkorrektor%
+ \or Viertkorrektor\else
+ \PackageError{uni-titlepage}{Ordinal of `#1' not defined}{%
+ This package does only define German ordinal names for correctors up
+ to 6}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\germanordinalfemalecorrectorname}
+% \changes{v0.7}{2021/08/18}{new}
+% \begin{macrocode}
+\newcommand*{\germanordinalfemalecorrectorname}[1]{%
+ \germanordinalmalecorrectorname{#1}in%
+}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\englishordinal}
% \begin{macrocode}
\newcommand*{\englishordinal}[1]{%
@@ -1743,12 +1885,12 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\else
\ifnum #1<\@ne
\PackageError{uni-titlepage}{Ordinal of `#1' not defined}{%
- This package does only define english ordinals from 1}%
+ This package does only define English ordinals from 1}%
\else
\ifcase #1\or 1st\or 2nd\or 3rd\or 4th\or 5th\or 6th\or 7th\or 8th\or
9th\or 10th\else
\PackageError{uni-titlepage}{Ordinal of `#1' not defined}{%
- This package does only define english ordinals from 1 to
+ This package does only define English ordinals from 1 to
10.\MessageBreak
You may load package `engord' to improve support of english
ordinals}%
@@ -1815,6 +1957,9 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \iffalse meta-comment
%</package>
@@ -1860,6 +2005,7 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
%<JT-Geschichte> title-JT-Geschichte.def%
%<JT-Typography> title-JT-Typography.def%
%<WWUM> title-WWUM.def%
+%<UKoLA> title-UKoLa.def%
}%
\fi
\endgroup
@@ -1882,18 +2028,19 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
%<JT-Geschichte> JT-Geschichte%
%<JT-Typography> JT-Typography%
%<WWUM> WWUM%
+%<UKoLa> UKoLa%
]{title}
% \end{macrocode}
%
-% Nevertheless some style has their own switches:
+% Nevertheless some styles have their own switches:
% \begin{option}{blackborder}
-% \emph{Trauerrand} at style \File{TU-DD}:
+% \emph{Trauerrand} at style \File{TU-DD}:
% \begin{macrocode}
%<TU-DD>\FamilyBoolKey[TU-DD]{title}{blackborder}{blackborder}
% \end{macrocode}
% \end{option}
% \begin{option}{final}
-% Style \File{TU-HH} distinguishes between drafts and final thesis.
+% Style \File{TU-HH} distinguishes between drafts and final thesis.
% \begin{macrocode}
%<TU-HH>\FamilyBoolKey[TU-HH]{title}{final}{final}
% \end{macrocode}
@@ -1902,7 +2049,7 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
% \begin{macro}{\title@rulewidth}
% \begin{option}{rulesep}
% \begin{macro}{\title@rulesep}
-% Some styles have some variable rules at the title:
+% Some styles have some variable rules at the title:
% \begin{macrocode}
%<*Spacer|JT-Aufsaetze|JT-Geschichte|Markus&2>
\providecommand*{\title@rulewidth}{%
@@ -1939,23 +2086,44 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
% \end{option}
%
% An some has their own terms:
+% \begin{macro}{\presentationinformationUKoLA}
+% \changes{v0.7}{2021/08/18}{new}
% \begin{macro}{\presentationinformationWWUM}
-% \changes{v0.5}{2016/06/21}{new style WWUM}
+% \changes{v0.5}{2016/06/21}{new style WWUM}
% \begin{macro}{\presentationinformationTUHH}
-% \changes{v0.5}{2016/06/21}{\cs{NowButAfterBeginDocument} not needed any
-% more}^^A
-% \changes{v0.5}{2016/06/21}{provide sevaral English and German
-% languages}^^A
+% \changes{v0.5}{2016/06/21}{\cs{NowButAfterBeginDocument} not needed any
+% more}
+% \changes{v0.5}{2016/06/21}{provide sevaral English and German
+% languages}
% \begin{macro}{\presentationinformationDHBW}
% \changes{v0.5}{2016/06/21}{\cs{NowButAfterBeginDocument} not needed any
-% more}^^A
-% \changes{v0.5}{2016/06/21}{provide sevaral English and German languages}^^A
+% more}
+% \changes{v0.5}{2016/06/21}{provide sevaral English and German languages}
% \changes{0.5e}{2019/11/20}{\cs{if} replaced by \cs{ifx}}
% \begin{macro}{\presentationinformationKIT}
% \changes{v0.5}{2016/06/21}{\cs{NowButAfterBeginDocument} not needed any
-% more}^^A
-% \changes{v0.5}{2016/06/21}{provide sevaral English and German languages}^^A
+% more}
+% \changes{v0.5}{2016/06/21}{provide sevaral English and German languages}
% \begin{macrocode}
+%<*UKoLa>
+\providecommand*{\presentationinformationUKoLa}{%
+ to optain the degree\\
+ \@academicgrade\\
+ of \@discipline\\
+}
+\providecaptionname{american,australian,british,canadian,%
+ english,newzealand,UKenglish,USenglish}{\presentationinformationUKoLa}{%
+ to optain the degree\\
+ \@academicgrade\\
+ of \@discipline\\
+}%
+\providecaptionname{german,ngerman,austrian,naustrian,%
+ swissgerman,nswissgerman}{\presentationinformationUKoLa}{%
+ zur Erlangung des Grades eines\\
+ \@academicgrade\\
+ im Studiengang \@discipline\\
+}%
+%</UKoLa>
%<*DHBW>
\providecommand*{\presentationinformationDHBW}{%
for the \examinationname{} of\\[.5\baselineskip]
@@ -2048,6 +2216,7 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
% \begin{macro}{\KITlongname}
% \changes{v0.5}{2016/06/21}{\cs{NowButAfterBeginDocument} not needed any
% more}^^A
@@ -2115,39 +2284,69 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
% \end{macro}
% \end{macro}
% \end{macro}
+%
% \begin{macro}{\presentedbyname}
-% \changes{v0.5}{2016/06/21}{changed value for `WWUM'}%^^A
+% \changes{v0.5}{2016/06/21}{changed value for \texttt{WWUM}}
% \changes{v0.5a}{2016/06/22}{fixed \texttt{swissgerman} instead of
-% \texttt{swiss}}%^^A
-% \changes{v0.5b}{2018/08/31}{changes have to be delayed}%^^A
-% \begin{macrocode}
-%<*WWUM>
+% \texttt{swiss}}
+% \changes{v0.5b}{2018/08/31}{changes have to be delayed}
+% \changes{v0.7}{2021/08/18}{changed value also for \texttt{UKoLa}}
+% \begin{macro}{\ordinalmalerefereename}
+% \changes{v0.7}{2021/08/18}{changed value for \texttt{UKoLa}}
+% \begin{macro}{\ordinalfemalerefereename}
+% \changes{v0.7}{2021/08/18}{changed value for \texttt{UKoLa}}
+% \begin{macrocode}
+%<*WWUM|UKoLa>
\NowButAfterBeginDocument
{%
\providecaptionname{german,ngerman,austrian,naustrian,
swissgerman,nswissgerman}{\presentedbyname}{vorgelegt von}%
\scr@ifundefinedorrelax{captionsgerman}{}{%
\renewcaptionname{german}{\presentedbyname}{vorgelegt von}%
+ \renewcaptionname{german}{\ordinalfemalerefereename}{%
+ \ordinalfemalecorrectorname}%
}%
\scr@ifundefinedorrelax{captionsngerman}{}{%
\renewcaptionname{ngerman}{\presentedbyname}{vorgelegt von}%
+ \renewcaptionname{ngerman}{\ordinalmalerefereename}{%
+ \germanordinalmalecorrectorname}%
+ \renewcaptionname{ngerman}{\ordinalfemalerefereename}{%
+ \germanordinalfemalecorrectorname}%
}%
\scr@ifundefinedorrelax{captionsaustrian}{}{%
\renewcaptionname{austrian}{\presentedbyname}{vorgelegt von}%
+ \renewcaptionname{austrian}{\ordinalmalerefereeename}{%
+ \germanordinalmalecorrectorname}%
+ \renewcaptionname{austrian}{\ordinalfemalerefereeename}{%
+ \germanordinalfemalecorrectorname}%
}%
\scr@ifundefinedorrelax{captionsnaustrian}{}{%
\renewcaptionname{naustrian}{\presentedbyname}{vorgelegt von}%
+ \renewcaptionname{naustrian}{\ordinalmalerefereename}{%
+ \germanordinalmalecorrectorname}%
+ \renewcaptionname{naustrian}{\ordinalfemalerefereename}{%
+ \germanordinalfemalecorrectorname}%
}%
\scr@ifundefinedorrelax{captionsswissgerman}{}{%
\renewcaptionname{swissgerman}{\presentedbyname}{vorgelegt von}%
+ \renewcaptionname{swissgerman}{\ordinalmalerefereename}{%
+ \germanordinalmalecorrectorname}%
+ \renewcaptionname{swissgerman}{\ordinalfemalerefereename}{%
+ \germanordinalfemalecorrectorname}%
}%
\scr@ifundefinedorrelax{captionsnswissgerman}{}{%
\renewcaptionname{nswissgerman}{\presentedbyname}{vorgelegt von}%
+ \renewcaptionname{nswissgerman}{\ordinalmalerefereename}{%
+ \germanordinalmalecorrectorname}%
+ \renewcaptionname{nswissgerman}{\ordinalfemalerefereename}{%
+ \germanordinalfemalecorrectorname}%
}%
}
-%</WWUM>
+%</WWUM|UKoLa>
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% While style initialization, something may change:
% \begin{macrocode}
@@ -2164,8 +2363,8 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
%</KOMAScript>
% \end{macrocode}
-% styles \File{DHBW}, \File{TU-DD}, \File{TU-HH}, and \File{KIT} sets some
-% variable if not already done
+% styles \File{DHBW}, \File{TU-DD}, \File{TU-HH}, \File{KIT}, and \File{UKoLa}
+% set some variable if not already done
% \begin{macrocode}
%<*DHBW|TU-DD|TU-HH|KIT|WWUM>
\ifx\@university\@empty
@@ -2178,6 +2377,8 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
%<WWUM> Westf\"alischen Wilhelms-Universit\"at M\"unster%
}%
\fi
+%</DHBW|TU-DD|TU-HH|KIT|WWUM>
+%<*DHBW|TU-DD|TU-HH|KIT|WWUM|UKoLa>
\ifx\@place\@empty
\place{%
%<DHBW> Baden-W\"urttemberg%
@@ -2189,29 +2390,44 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
Style `WWUM' needs the birth place of\MessageBreak
the student}%
%</WWUM>
+%<UKoLa> Koblenz%
}
\fi
-%<*DHBW>
+%<*DHBW|UKoLa>
\ifx\@mainlogo\@empty
- \IfFileExists{DHBW_d_MOS_195x95_rgb_300.jpg}{%
+%<DHBW> \IfFileExists{DHBW_d_MOS_195x95_rgb_300.jpg}{%
+%<UKoLa> \IfFileExists{uni-koblenz-landau.png}{%
\scr@ifundefinedorrelax{includegraphics}{%
\if@atdocument\else\RequirePackage{graphicx}\fi
}{}%
\scr@ifundefinedorrelax{includegraphics}{}{%
\mainlogo{%
- \includegraphics[width=57mm,height=27mm]%
+%<*DHBW>
+ \includegraphics[width=57mm,height=27mm]
{DHBW_d_MOS_195x95_rgb_300.jpg}%
+%</DHBW>
+%<*UKoLa>
+ \includegraphics[width=63mm,height=10mm]
+ {uni-koblenz-landau.png}
+%</UKoLa>
}%
}%
}{}%
\fi
+%</DHBW|UKoLa>
+%<*DHBW>
\ifx\@titlehead\@empty
\titlehead{\hspace*{\fill}\@mainlogo}%
\fi
+%</DHBW>
+%<*DHBW|UKoLa>
\ifx\@titlepagefont\@empty
- \renewcommand*{\@titlepagefont}{\normalfont\sffamily}%
+ \renewcommand*{\@titlepagefont}{%
+%<DHBW> \normalfont\sffamily
+%<UKoLa> \normalfont
+ }%
\fi
-%</DHBW>
+%</DHBW|UKoLa>
%<*KIT>
\ifx\@homepage\@empty
\homepage{\KITurl}%
@@ -2255,7 +2471,7 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\renewcommand*{\@titlepagefont}{\normalfont\large}%
\fi
%</WWUM>
-%</DHBW|TU-DD|TU-HH|KIT|WWUM>
+%</DHBW|TU-DD|TU-HH|KIT|WWUM|UKoLa>
% \end{macrocode}
% style \File{Markus-2} uses it's own pagestyle at the first title page
% \begin{macrocode}
@@ -2315,9 +2531,9 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\renewcommand*{\makemaintitle}{%
\begin{%
%<DHBW|TU-DD|TU-HH|KIT> fullsizetitle}
-%<*KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM>
+%<*KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM|UKoLa>
titlepage}
-%</KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM>
+%</KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM|UKoLa>
\setlength{\parskip}{\z@}%
\setlength{\parindent}{\z@}%
\setlength{\parfillskip}{\z@\@plus 1fil}%
@@ -2609,11 +2825,43 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
\MakeUppercase{\@publisher}%
\fi}
%</JT-Typography>
+%<*UKoLa>
+ \begin{tabular}[t]{@{}c@{}}
+ \raisebox{\dimexpr\ht\strutbox-\height}{\@mainlogo}\\
+ \@chair\\
+ \end{tabular}\hfill
+ \begin{tabular}[r]{@{}c@{}}
+ \raisebox{\dimexpr\ht\strutbox-\height}{\@secondlogo}\\
+ \end{tabular}\par
+ \vspace{5\baselineskip}
+ \centering
+ {\LARGE\bfseries\titlefont{\@title\par}}%
+ \vspace{5\baselineskip}
+ {\Large\subject@font{\@subject\par}}%
+ \vspace{\baselineskip}
+ \presentationinformationUKoLa\par
+ \vspace{5\baselineskip}
+ \presentedbyname\\[\baselineskip]
+ {\Large\csname @authorfont\endcsname{\@author\par}}%
+ \vfill
+ \raggedright
+ \@hangfrom{\advisorname: }{\@advisor\par}%
+ \newcommand*{\test@male@female}[1][m]{%
+ \global\advance\@tempcnta by\@ne
+ \Ifstr{##1}{f}{\def\fe@male{female}}{\def\fe@male{male}}%
+ \@hangfrom{\csname ordinal\fe@male refereename\endcsname{\@tempcnta}: }%
+ \def\and{\par\test@male@female}%
+ }%
+ \@tempcnta \z@
+ \expandafter\test@male@female\@referee\par
+ \vspace{3\baselineskip}
+ \@place, \Ifstr{\indatename}{}{}{\indatename\ }\@date\par
+%</UKoLa>
\end{%
%<DHBW|TU-DD|TU-HH|KIT> fullsizetitle}
-%<*KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM>
+%<*KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM|UKoLa>
titlepage}
-%</KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM>
+%</KOMAScript|Markus|Spacer|JT-Aufsaetze|JT-Geschichte|JT-Typography|WWUM|UKoLa>
}
% \end{macrocode}
% \end{macro}
@@ -2854,16 +3102,16 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
%<*doc|README>
%<*example>
% \fi^^A meta-comment
+% \changes{v0.7}{2021/08/18}{don't use \Package{inputenc} any longer}
% \begin{macrocode}
\documentclass[a4paper,pagesize]{scrbook}
-\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%<JT-Geschichte>\usepackage{microtype}
%<TU-HH|TU-DD>\usepackage{mathpazo}
%<TU-HH|TU-DD>\usepackage[scaled]{helvet}
-%<DHBW|Spacer|KIT>\usepackage[demo]{graphicx}% remove option demo if you have the logo
+%<DHBW|Spacer|KIT|UKoLa>\usepackage[demo]{graphicx}% remove option demo if you have the logo
\usepackage{xcolor}
%<JT-Geschichte|JT-Typography>\colorlet{RED}{red}% because of \MakeUppercase{\textcolor{red}{…}}
\usepackage{uni-titlepage}
@@ -3090,6 +3338,44 @@ You may however distribute the file `uni-titlepage.dtx' without this file.
professor={\textcolor{red}{Klaus Naseschwarz}}
]
%</WWUM>
+%<*UKoLa>
+\TitlePageStyle{UKoLa}
+\maketitle[%
+ titlefont=\sffamily,
+ mainlogo=\textcolor{red}{{%
+ \includegraphics[height=10mm,width=63mm]%
+ {uni-koblenz-landau}%
+ }},
+ chair=\textcolor{red}{Nummer des Instituts:
+ Name des Instituts},
+ secondlogo=\textcolor{red}{Optionales weiteres Logo},
+ title=\textcolor{red}{Titel der Studien-, Bachelor-, Master- oder Diplomarbeit},
+ subject=\textcolor{red}{Diplomarbeit},
+ academicgrade=\textcolor{red}{Diplom-Informatikers},
+ discipline=\textcolor{red}{Name des Studiengangs},
+ place={\textcolor{red}{Koblenz}},
+ author=\textcolor{red}{Vorname und Nachname des Absolventen / der
+ Absolventin},
+ advisor=\textcolor{red}{Title{}
+ Vorname{}
+ Name,
+ Institut, Fachbereich innerhalb der Universität /
+ Institution außerhalb der Universität},
+ referee={\textcolor{red}{Title{}
+ Vorname{}
+ Name,
+ Institut, Fachbereich innerhalb der Universität /
+ Institution außerhalb der Universität}%
+ \and[f]\textcolor{red}{Title{}
+ Vorname{}
+ Name,
+ Institut, Fachbereich innerhalb der Universität /
+ Institution außerhalb der Universität}%
+ },%
+ date=\textcolor{red}{Abgabemonat},
+]
+
+%</UKoLa>
\end{document}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/uni-titlepage/uni-titlepage.pdf b/macros/latex/contrib/uni-titlepage/uni-titlepage.pdf
index 29db357407..4df09a5ca2 100644
--- a/macros/latex/contrib/uni-titlepage/uni-titlepage.pdf
+++ b/macros/latex/contrib/uni-titlepage/uni-titlepage.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/README b/macros/latex/contrib/univie-ling/README
index 1670d15cae..87baa1affc 100644
--- a/macros/latex/contrib/univie-ling/README
+++ b/macros/latex/contrib/univie-ling/README
@@ -80,6 +80,15 @@ also have a look at the example files.
== CHANGES ==
+V. 1.14 (2021-09-01)
+ - univie-ling-paper.cls:
+ * Do not overwrite user-set \texttype with default value.
+ - univie-ling.bbx:
+ * Sentence-case journal issue title and online title.
+ * Emphasize journal subtitle.
+ - univie-ling-wlg.cfg:
+ * Update editorial board.
+
V. 1.13 (2020-11-11)
- univie-ling.bbx:
* Fix whitespace issue in thematic issue string.
diff --git a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx
index c88d648c0c..0862f1f1f4 100644
--- a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx
+++ b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.bbx
@@ -36,7 +36,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{univie-ling.bbx}[2020/11/11 v1.13 biblatex bibliography style]
+\ProvidesFile{univie-ling.bbx}[2021/09/01 v1.14 biblatex bibliography style]
% Load base style (authoryear)
\RequireBibliographyStyle{authoryear}
@@ -67,8 +67,11 @@
This is a fatal error. I'm aborting now}%
\endinput}
-% Option "issueeditor": Output journal issue editor
-% (false by default)
+%
+% OPTIONS
+%
+
+% Option "issueeditor": Output journal issue editor (false by default)
\newtoggle{issueeditor}
\DeclareBibliographyOption{issueeditor}[false]{%
\settoggle{issueeditor}{#1}}
@@ -143,6 +146,23 @@
{}
{\printdate}}%
+\renewbibmacro*{issue}{%
+ \ifboolexpr{
+ test {\iffieldundef{issuetitle}}
+ and
+ test {\iffieldundef{issuesubtitle}}
+ }
+ {}
+ {\printtext{%
+ \printfield[issuetitle]{issuetitle}%
+ \iffieldundef{issuesubtitle}{}{
+ \setunit{\subtitlepunct}%
+ \printfield[issuetitle]{issuesubtitle}%
+ }%
+ }%
+ }%
+}
+
\renewbibmacro*{issue+date}{%
\ifboolexpr{
test {\iffieldundef{issue}}
@@ -202,10 +222,10 @@
\usebibmacro{#1}%
}%
\clearname{editor}%
- \newunit}% period instead of space
+ \newunit}% period instead of space
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
- \newunit}% period instead of space
+ \newunit}% period instead of space
\usebibmacro{date+extradate}}
\renewbibmacro*{translator}{%
@@ -225,10 +245,10 @@
\usebibmacro{bbx:savehash}}%
\usebibmacro{translator+othersstrg}%
\clearname{translator}%
- \newunit}% period instead of space
+ \newunit}% period instead of space
{\global\undef\bbx@lasthash
\usebibmacro{labeltitle}%
- \newunit}% period instead of space
+ \newunit}% period instead of space
\usebibmacro{date+extradate}}
@@ -238,7 +258,7 @@
\renewbibmacro*{journal}{%
\iffieldundef{journaltitle}
{}
- {\printtext{%
+ {\printtext[issuetitle]{%
\printfield{journaltitle}%
\setunit{\subtitlepunct}%
\printfield{journalsubtitle}}}}
@@ -256,10 +276,7 @@
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
- % The following three lines were originally not included inside of
- % the journal+issuetitle bibmacro. They have been moved inside of
- % this macro in order to allow them to be controlled by the toggle
- % `issueeditor` that is defined at the top of this style file.
+ % Output journal issue editors only if requested by 'issueeditor' option
\iftoggle{issueeditor}
{%
\newunit
@@ -414,7 +431,8 @@
\iffieldundef{urlyear}%
{}%
{\setunit*{\addspace}%
- \printtext[parens]{\bibstring{urlseen} \mkbibdateunified{urlyear}{urlmonth}{urlday}}}%
+ \printtext[parens]{\bibstring{urlseen}
+ \mkbibdateunified{urlyear}{urlmonth}{urlday}}}%
}
\renewbibmacro*{series+number}{%
@@ -431,7 +449,7 @@
{}
{\printnames[byeditor]{editor}%
\setunit{\addspace}%
- \printtext[parens]{\usebibmacro{editor+othersstrg}}% putting (ed.) or (eds.) after editors of books
+ \printtext[parens]{\usebibmacro{editor+othersstrg}}%
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}}
@@ -579,13 +597,24 @@
% FIELD FORMATS
%
-\DeclareFieldFormat[article,book,mvbook,inbook,collection,mvcollection,incollection,inproceedings,thesis,unpublished]{titlecase}{\MakeSentenceCase*{#1}}%
+% Sentence-case all variable (non-serial) English titles
+\DeclareFieldFormat[article,book,mvbook,collection,mvcollection,
+ inbook,incollection,inproceedings,
+ thesis,unpublished,online]{titlecase}{\MakeSentenceCase*{#1}}%
+
+% Thematic issue title is non-serial as well
+\DeclareFieldFormat[periodical]{issuetitle}{\MakeSentenceCase*{#1}}
-\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1}
+% Plain (recte) shape for these
+\DeclareFieldFormat[article,inbook,incollection,inproceedings,
+ patent,thesis,unpublished]{title}{#1}
+% Emphasize thesis title
\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}}
-\DeclareFieldFormat{pages}{#1} % no pp. prefix, took \mkpageprefix out [kvf]
+% no pp. prefix
+\DeclareFieldFormat{pages}{#1}
+
\DeclareFieldFormat{doi}{%
\ifhyperref
{\href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}}
@@ -594,9 +623,6 @@
\DeclareFieldFormat{volume:unified:proc-as-article}{#1}
-\DeclareFieldFormat[periodical]{issuetitle}{#1}
-
-
%
% DRIVERS
%
@@ -615,9 +641,8 @@
\newunit\newblock
\printfield{version}%
\newunit\newblock
-% \usebibmacro{in:}% We don't use "In: " before journal titles
\usebibmacro{journal+issuetitle+editor}%
- \newblock% \newblock ensures period before pages
+ \newblock%
\usebibmacro{note+pages}%
\newunit\newblock
\iftoggle{bbx:isbn}
@@ -659,7 +684,7 @@
{}%
\newunit
\printfield{volumes}%
- \setunit{\addspace}% crucial difference from standard.bbx: space and then (Series + number)
+ \setunit{\addspace}%
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
diff --git a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx
index 8f9720a39a..6939d0adaa 100644
--- a/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx
+++ b/macros/latex/contrib/univie-ling/biblatex-univie-ling/univie-ling.cbx
@@ -34,7 +34,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesFile{univie-ling.cbx}[2020/11/11 v1.13 biblatex citation style]
+\ProvidesFile{univie-ling.cbx}[2021/09/01 v1.14 biblatex citation style]
\RequireCitationStyle{authoryear}
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf
index 72a30b20f7..4cda010d9a 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex
index 03fbb262fb..db86a378ae 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-expose.tex
@@ -63,7 +63,7 @@
\author{\texorpdfstring{Jürgen Spitzmüller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jürgen Spitzmüller}}
-\date{Version 1.12, 2020/06/25}
+\date{Version 1.14, 2021/09/01}
\maketitle
@@ -319,6 +319,8 @@ Templates are provided as well:
\section{Release History}
\begin{description}
+ \item 2021/09/01 (v.\,1.14) No change to this class.
+ \item 2020/11/11 (v.\,1.13) No change to this class.
\item 2020/06/25 (v.\,1.12) No change to this class.
\item 2020/05/05 (v.\,1.11) New option \joption{polyglossia}.
\item 2020/05/01 (v.\,1.10) No change to this class.
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf
index 7410cc1b98..36e277eb0c 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex
index 596cf2b7e3..1526c3304a 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-paper.tex
@@ -59,7 +59,7 @@
\author{\texorpdfstring{Jürgen Spitzmüller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jürgen Spitzmüller}}
-\date{Version 1.12, 2020/06/25}
+\date{Version 1.14, 2021/09/01}
\maketitle
@@ -243,7 +243,7 @@ given that you have specified the following data in the preamble.
\joption{vo} (Vorlesung), \joption{ue} (\"Ubung), \joption{ko} (Kolloquium) or \joption{pv} (Privatissimum).
\item{\jcsmacro{semester\{<semester type>\}\{<year>\}}}: Type and year of the current semester. Type must be either \joption{ss} (summer term) or \joption{ws} (winter term).
\item{\jcsmacro{instructor\{<name>\}}}: Title and name of your instructor (\emph{Dozent}).
- \item{\jcsmacro{texttype\{<text type>\}}}: Text type (such as \emph{Forschungsbericht}). For \joption{ps} and \joption{se} course types, this is automatically set.
+ \item{\jcsmacro{texttype\{<text type>\}}}: Text type (such as \emph{Forschungsbericht}). For \joption{ps} and \joption{se} course types, this is automatically set (but can be overwritten with this macro).
\end{description}
\section{Declaration}
@@ -343,6 +343,8 @@ Templates are provided as well:
\section{Release History}
\begin{itemize}
+ \item 2021/09/01 (v.\,1.14) Do not overwrite \jmacro{texttype} set by user with default value.
+ \item 2020/11/11 (v.\,1.13) No change to this class.
\item 2020/06/25 (v.\,1.12) No change to this class.
\item 2020/05/05 (v.\,1.11) New option \joption{polyglossia}.
\item 2020/05/01 (v.\,1.10) No change to this class.
@@ -361,14 +363,8 @@ Templates are provided as well:
\item Switch default bibliography style (from APA to Unified).
\item Initial release to CTAN.
\end{itemize}
- \item 2016/09/07 (v.\,0.8)
- \begin{itemize}
- \item Improve \jcsmacro{makedeclaration} output.
- \end{itemize}
- \item 2016/05/05 (v.\,0.7)
- \begin{itemize}
- \item Fix comma after \emph{et al.} with \textsf{biblatex-apa}.
- \end{itemize}
+ \item 2016/09/07 (v.\,0.8) Improve \jcsmacro{makedeclaration} output.
+ \item 2016/05/05 (v.\,0.7) Fix comma after \emph{et al.} with \textsf{biblatex-apa}.
\item 2016/04/30 (v.\,0.6)
\begin{itemize}
\item Reset the alignment after declaration.
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf
index 5d8379f109..e734f2514b 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex
index 0b2e25f613..dec3028054 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-thesis.tex
@@ -59,7 +59,7 @@
\author{\texorpdfstring{Jürgen Spitzmüller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jürgen Spitzmüller}}
-\date{Version 1.12, 2020/06/25}
+\date{Version 1.14, 2021/09/01}
\maketitle
@@ -367,6 +367,8 @@ Templates are provided as well:
\section{Release History}
\begin{itemize}
+ \item 2021/09/01 (v.\,1.14) No change to this class.
+ \item 2020/11/11 (v.\,1.13) No change to this class.
\item 2020/06/25 (v.\,1.12) No change to this class.
\item 2020/05/05 (v.\,1.11)\begin{itemize}
\item New option \joption{polyglossia}.
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf
index 523eac6312..a4ea625bf3 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.pdf
Binary files differ
diff --git a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex
index 627a7fe84e..8bc27ee14e 100644
--- a/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex
+++ b/macros/latex/contrib/univie-ling/doc/univie-ling-wlg.tex
@@ -59,7 +59,7 @@
\author{\texorpdfstring{Jürgen Spitzmüller%
\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jürgen Spitzmüller}}
-\date{Version 1.13, 2020/11/11}
+\date{Version 1.14, 2021/09/01}
\maketitle
@@ -232,6 +232,7 @@ A template is provided as well: \url{https://github.com/jspitz/univie-ling/raw/m
\raggedright
\begin{itemize}
+ \item 2021/09/01 (v.\,1.14) Update editorial board.
\item 2020/11/11 (v.\,1.13)
\begin{itemize}
\item Use \textsf{totpages} package rather than \textsf{lastpage} in order to fix
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls
index d283f4f3d0..796f0f503c 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-expose.cls
@@ -31,7 +31,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{univie-ling-expose}[2020/11/11 v1.13 Univie Linguistic Exposes (JSp)]
+\ProvidesPackage{univie-ling-expose}[2021/09/01 v1.14 Univie Linguistic Exposes (JSp)]
\RequirePackage{xkeyval}
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls
index a9ad7ed788..a342dd5c4b 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls
@@ -31,7 +31,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{univie-ling-paper}[2020/11/11 v1.13 Univie Linguistic Papers (JSp)]
+\ProvidesPackage{univie-ling-paper}[2021/09/01 v1.14 Univie Linguistic Papers (JSp)]
\RequirePackage{xkeyval}
@@ -299,7 +299,7 @@ This includes all drawings, sketches, graphics and internet sources.}
}{}
\def\lectype{\csuse{lectype@#1}}%
\def\lectypeverb{\csuse{lectypeverb@#1}}%
- \def\@texttype{\csuse{texttype@#1}}
+ \iftoggle{customtexttype}{}{\def\@texttype{\csuse{texttype@#1}}}
}%
}
@@ -315,7 +315,8 @@ This includes all drawings, sketches, graphics and internet sources.}
}
\def\@texttype{Seminararbeit}
-\newcommand\texttype[1]{\def\@texttype{#1}}
+\newtoggle{customtexttype}
+\newcommand\texttype[1]{\def\@texttype{#1}\toggletrue{customtexttype}}
\def\@course{}
\newcommand\course[2]{\setkeys{lec}{lectype=#1}\def\@course{#2}}
\def\@instructor{}
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
index 364d8519a1..8fc0eab3aa 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-thesis.cls
@@ -31,7 +31,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{univie-ling-thesis}[2020/11/11 v1.13 Univie Linguistic Theses (JSp)]
+\ProvidesPackage{univie-ling-thesis}[2021/09/01 v1.14 Univie Linguistic Theses (JSp)]
\RequirePackage{xkeyval}
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cfg b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cfg
index 5e6bfc32a7..09e106800f 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cfg
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cfg
@@ -8,7 +8,7 @@
% General Linguistics
\edboardGL{Markus P\"ochtrager}
% Applied Linguistics
-\edboardAL{Mi-Cha Flubacher, Jonas Hassemer \& Sabine Lehner}%
+\edboardAL{Mi-Cha Flubacher \& Florian Grosser}%
% Historical Linguistics
\edboardHL{Stefan Schumacher}
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls
index c9b73cc905..972b527319 100644
--- a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls
+++ b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls
@@ -32,7 +32,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{univie-ling-wlg}[2020/11/11 v1.13 WLG journal layout (JSp)]
+\ProvidesPackage{univie-ling-wlg}[2021/09/01 v1.14 WLG journal layout (JSp)]
%% ============================================================