texlive[51126] Master: vtable (14may19)

commits+karl at tug.org commits+karl at tug.org
Tue May 14 23:41:53 CEST 2019


Revision: 51126
          http://tug.org/svn/texlive?view=revision&revision=51126
Author:   karl
Date:     2019-05-14 23:41:53 +0200 (Tue, 14 May 2019)
Log Message:
-----------
vtable (14may19)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/vtable/
    trunk/Master/texmf-dist/doc/latex/vtable/README
    trunk/Master/texmf-dist/doc/latex/vtable/vtable.pdf
    trunk/Master/texmf-dist/doc/latex/vtable/vtable.tex
    trunk/Master/texmf-dist/tex/latex/vtable/
    trunk/Master/texmf-dist/tex/latex/vtable/vtable.sty
    trunk/Master/tlpkg/tlpsrc/vtable.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/vtable/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/vtable/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/vtable/README	2019-05-14 21:41:53 UTC (rev 51126)
@@ -0,0 +1,12 @@
+Package vtable allow vertical alignement of table cell by providing:
+ * Z, L, C, R, J and I column types 
+ * \nextRow and \lb commands
+ * \setMultiColRow, \setMultiColumn, \setMultiRow and \tableFormatedCell commands
+for tabular and similar environment.
+
+Version 1.0 (2019-05-13): first public release
+
+
+Copyright (C) 2015-2019, Robert Ryszard Paciorek <rrp at opcode.eu.org>
+
+This is free software distributed under terms of The MIT License.


Property changes on: trunk/Master/texmf-dist/doc/latex/vtable/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/vtable/vtable.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/vtable/vtable.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/vtable/vtable.pdf	2019-05-14 21:41:19 UTC (rev 51125)
+++ trunk/Master/texmf-dist/doc/latex/vtable/vtable.pdf	2019-05-14 21:41:53 UTC (rev 51126)

Property changes on: trunk/Master/texmf-dist/doc/latex/vtable/vtable.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/vtable/vtable.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/vtable/vtable.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/vtable/vtable.tex	2019-05-14 21:41:53 UTC (rev 51126)
@@ -0,0 +1,240 @@
+% Copyright (c) 2015-2019 Robert Ryszard Paciorek <rrp at opcode.eu.org>
+% 
+% MIT License
+% 
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the "Software"), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+% 
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+% 
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+\documentclass[a4paper]{article}
+
+\usepackage{vtable,hhline,xcolor}
+\usepackage{fvextra,geometry,lipsum}
+\fvset{breaklines=true, breakafter={/\}\{}, breakaftersymbolpre={}, breakaftersymbolpost={\tiny\ensuremath{\ \hookrightarrow\ }}}
+\geometry{tmargin=20mm, bmargin=27mm, lmargin=21mm, rmargin=21mm}
+
+\begin{document}
+
+\title{The \texttt{vtable}  package}
+\author{Robert Ryszard Paciorek <rrp at opcode.eu.org>}
+\date{2019-05-13}
+\maketitle
+
+\section{Introduction}
+
+This package allow vertical alignement of table cell
+  by providing \texttt{Z}, \texttt{L}, \texttt{C}, \texttt{R}, \texttt{J} and \texttt{I} column types 
+  and \Verb$\nextRow$, \Verb$\lb$, \Verb$\setMultiColRow$, \Verb$\setMultiColumn$, \Verb$\setMultiRow$ and \Verb$\tableFormatedCell$ commands
+  for \texttt{tabular} and similar environment.
+
+\section{Column types}
+
+\subsection{\texttt{Z}}
+
+\texttt{Z} column type have 6 arguments:
+\begin{enumerate}
+  \item max width of cell
+  \item min width of cell (optional – can be empty)
+  \item horizontal align mode, supported values:
+    \begin{description}
+      \item[l] left
+      \item[c] center
+      \item[r] right
+      \item[j] justify
+    \end{description}
+  \item number of columns to span this cell
+  \item vertical align mode, supported values:
+    \begin{description}
+      \item[t] top
+      \item[m] middle
+      \item[b] bottom
+    \end{description}
+  \item number of rows to span this cell
+\end{enumerate}
+
+\subsection{\texttt{L}, \texttt{C}, \texttt{R} and \texttt{J}}
+
+\texttt{L}, \texttt{C}, \texttt{R} and \texttt{J} column types are shortcuts for Z column type and have 3 arguments:
+\begin{enumerate}
+  \item max width of cell
+  \item min width of cell (optional – can be empty)
+  \item vertical align mode, supported values:
+    \begin{description}
+      \item[t] top
+      \item[m] middle
+      \item[b] bottom
+    \end{description}
+\end{enumerate}
+\texttt{L} is left ragged column, \texttt{C} is center ragged column, \texttt{R} is right ragged column and \texttt{J} is justifying column.
+
+\subsection{\texttt{I}}
+
+\texttt{I} column type insert vertical frame line and have 3 arguments:
+\begin{enumerate}
+  \item formatting command (eg. \Verb$\color$)
+  \item line width, second argument of \Verb$\hdashrule$
+  \item line style, third argument of \Verb$\hdashrule$
+\end{enumerate}
+
+
+\section{Commands}
+
+\subsection{nextRow an lb}
+{\bfseries Each row (even last) MUST be ended with \Verb$\nextRow$ command} (insted of \Verb$\\$ or \Verb$\tabularnewline$).
+Line break in table cell can be do with \Verb$\lb$ (shortcut for \Verb$\linebreak$), \Verb$\linebreak$ or \Verb$\newline$.
+
+\subsection{setMultiColRow}
+\Verb$\setMultiColRow{col num}{row num}{max width}{min width}{hmode}{vmode}{left sep}{right sep}{text}$ command allow span cells on rows and columns create multi column at the same time.
+It have 9 arguments:
+\begin{description}
+  \item[col num] number of columns to span this cell
+  \item[row num] number of rows to span this cell
+  \item[max width] max width of cell
+  \item[min width] min width of cell (optional – can be empty)
+  \item[hmode] horizontal align mode, supported values:
+    \begin{description}
+      \item[l] left
+      \item[c] center
+      \item[r] right
+      \item[j] justify
+    \end{description}
+  \item[vmode] vertical align mode, supported values:
+    \begin{description}
+      \item[t] top
+      \item[m] middle
+      \item[b] bottom
+    \end{description}
+  \item[left sep]  left cell frame element
+  \item[right sep] right cell frame element
+  \item[text] cell content
+\end{description}
+
+\Verb$\setMultiColRow$ command MUST be repeated in each row of multirow set.
+Only first call CAN (and MUST) have not empty last argument (cell content).
+Every next call of \Verb$\setMultiColRow$ in single multirow set MUST have empty last argument (cell content).
+
+\subsection{setMultiColumn}
+\Verb$\setMultiColumn{col num}{max width}{min width}{hmode}{vmode}{left sep}{right sep}{text}$ command allow create multi column cell.
+It have 8 arguments meaningful as corresponding args in \Verb$\setMultiColRow$ command.
+
+\subsection{setMultiRow}
+\Verb$\setMultiRow{col num}[minimal height]{text}$ command allow create multi row cell.
+Next cells in multirow set should be empty.
+Horizontal lines between cells in multirow set should be manualy removed (via setting \Verb$\hhline$ parametrs).
+
+\subsection{tableFormatedCell}
+\Verb$\tableFormatedCell{max width}[min width]{hmode}{vmode}$ command allow change formatting for single cell.
+It have 4 arguments meaningful as corresponding args in \Verb$\setMultiColRow$ command.
+
+\subsection{forceRowHeight}
+\Verb$\forceRowHeight{value}$ enforce current row minimum height to value.
+
+
+\section{Examples}
+
+\begin{center}
+\begin{tabular}{
+    | C{2cm}{}{t} | C{2cm}{1.5cm}{m} | C{2cm}{}{b} | L{2cm}{}{m} |
+    R{2cm}{}{t} | J{2cm}{}{t} I{\color{red}}{1pt}{0.5mm 0.5mm 0.5mm 0mm}
+  }
+  \hline
+    top & middle & bottom & middle left & top right & top justify
+  \nextRow \hline
+    A \lb xxx \lb X & B & C &
+      \setMultiRow{3}{ -- \lipsum[1][1] -- \lb -- \lipsum[1][2] -- } &
+      q & q
+  \nextRow \hhline{---~--}
+    D \lb d & E \lb xxx xx \lb X \lb X & F \lb f & & q & q
+  \nextRow \hhline{---~--}
+    G & H & I \lb xxx \lb Xj & & q & q
+  \nextRow \hline
+    G &
+    \setMultiColumn{2}{4cm}{3cm}{c}{t}{}{|} {top, center: \lb \lipsum[1][3]} &
+    xx & q & q
+  \nextRow \hline
+    G &
+    \multicolumn{2}{Z{4cm}{3cm}{l}{2}{t}{1}|} {top, left: \lb \lb \lipsum[1][4]} &
+    LL LL\lb xxx\lb X\lb X & RR RR\lb xxx\lb X\lb X & BB BB\lb xxx\lb X\lb X
+  \nextRow \hline
+    G &
+    \tableFormatedCell{3.5cm}[3cm]{r}{b}I I \lb xxxxxxx \lb a a Xj &
+    y & \lipsum[1][1] & \lipsum[1][1] & \lipsum[1][1]
+  \nextRow \hline
+\end{tabular}
+\end{center}
+
+\begin{Verbatim}
+\begin{tabular}{
+    | C{2cm}{}{t} | C{2cm}{1.5cm}{m} | C{2cm}{}{b} | L{2cm}{}{m} |
+    R{2cm}{}{t} | J{2cm}{}{t} I{\color{red}}{1pt}{0.5mm 0.5mm 0.5mm 0mm}
+  }
+  \hline
+    top & middle & bottom & middle left & top right & top justify
+  \nextRow \hline
+    A \lb xxx \lb X & B & C &
+      \setMultiRow{3}{ -- \lipsum[1][1] -- \lb -- \lipsum[1][2] -- } &
+      q & q
+  \nextRow \hhline{---~--}
+    D \lb d & E \lb xxx xx \lb X \lb X & F \lb f & & q & q
+  \nextRow \hhline{---~--}
+    G & H & I \lb xxx \lb Xj & & q & q
+  \nextRow \hline
+    G &
+    \setMultiColumn{2}{4cm}{3cm}{c}{t}{}{|} {top, center: \lb \lipsum[1][3]} &
+    xx & q & q
+  \nextRow \hline
+    G &
+    \multicolumn{2}{Z{4cm}{3cm}{l}{2}{t}{1}|} {top, left: \lb \lb \lipsum[1][4]} &
+    LL LL\lb xxx\lb X\lb X & RR RR\lb xxx\lb X\lb X & BB BB\lb xxx\lb X\lb X
+  \nextRow \hline
+    G &
+    \tableFormatedCell{3.5cm}[3cm]{r}{b}I I \lb xxxxxxx \lb a a Xj &
+    y & \lipsum[1][1] & \lipsum[1][1] & \lipsum[1][1]
+  \nextRow \hline
+\end{tabular}
+\end{Verbatim}
+
+\subsection{multicolumn, multirow}
+
+\begin{center}
+\begin{tabular}{| C{2cm}{}{t} | C{2cm}{}{m} | C{2cm}{}{b} | L{2cm}{}{m} |}
+  \hline
+  \setMultiColRow{2}{3}{4cm}{3cm}{c}{m}{|}{|}{ multi multi multi multi multi multi multi multi multi } & c1 & d1
+  \nextRow\hhline{~~--}
+  \setMultiColRow{2}{3}{4cm}{3cm}{c}{m}{|}{|}{} & c2 & d2
+  \nextRow\hhline{~~--}
+  \setMultiColRow{2}{3}{4cm}{3cm}{c}{m}{|}{|}{} & c3 & d3
+  \nextRow\hline
+  a4 & b4 & c4 & d4
+  \nextRow\hline
+\end{tabular}
+\end{center}
+
+\begin{Verbatim}
+\begin{tabular}{| C{2cm}{}{t} | C{2cm}{}{m} | C{2cm}{}{b} | L{2cm}{}{m} |}
+  \hline
+  \setMultiColRow{2}{3}{4cm}{3cm}{c}{m}{|}{|}{ multi multi multi multi multi multi multi multi multi } & c1 & d1
+  \nextRow\hhline{~~--}
+  \setMultiColRow{2}{3}{4cm}{3cm}{c}{m}{|}{|}{} & c2 & d2
+  \nextRow\hhline{~~--}
+  \setMultiColRow{2}{3}{4cm}{3cm}{c}{m}{|}{|}{} & c3 & d3
+  \nextRow\hline
+  a4 & b4 & c4 & d4
+  \nextRow\hline
+\end{tabular}
+\end{Verbatim}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/vtable/vtable.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/vtable/vtable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/vtable/vtable.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/vtable/vtable.sty	2019-05-14 21:41:53 UTC (rev 51126)
@@ -0,0 +1,233 @@
+% Copyright (c) 2015-2019 Robert Ryszard Paciorek <rrp at opcode.eu.org>
+% 
+% MIT License
+% 
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the "Software"), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+% 
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+% 
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+% Version 1.0 (2019-05-13): first public release
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{vtable}
+
+\RequirePackage{array,varwidth}
+\RequirePackage{dashrule,graphicx} % for I type
+\RequirePackage{xparse,etoolbox,calc,forloop,alphalph}
+
+\newlength {\vtable at RowHeight}      % current height of row (can be increase in next cells)
+\newlength {\vtable at RowInitHeight}  % init height of row (loaded from aux file)
+\newlength {\vtable at RowForceHeight} % enforced value of row height
+\newlength {\vtable at RowTmpHeight}
+\newcounter{vtable at CurrRow}         % current row number (file global value)
+\newcounter{vtable at CurrColumn}      % current column number (reset on each new row)
+\newcounter{vtable at State}           % set to 1 when finish / start new row
+\newcounter{vtable at LastRow}         % set to non zero on last row of multirow cell in \vtable at PreRow, clear in \vtable at PostRow
+\newcounter{vtable at RowIter}         % temporary counter used in \vtable at PostRow
+\newsavebox{\vtable at CellBox}
+\newsavebox{\vtable at CellVBox}
+
+\setcounter{vtable at State}{1}
+
+\newcommand{\vtable at PreRow}{%
+	\stepcounter{vtable at CurrRow}%
+	\setcounter{vtable at CurrColumn}{1}%
+	\setcounter{vtable at State}{0}%
+	\typeout{BEGIN ROW : \the\value{vtable at CurrRow}}%
+	\global\vtable at RowHeight=0pt%
+	\global\vtable at RowForceHeight=0pt%
+	\ifcsname tabRowHeight@\AlphAlph{\value{vtable at CurrRow}}\endcsname%
+		\global\vtable at RowInitHeight=\csname tabRowHeight@\AlphAlph{\value{vtable at CurrRow}}\endcsname%
+	\else%
+		\global\vtable at RowInitHeight=0pt%
+	\fi%
+}
+\newcommand{\vtable at PostRow}{
+	\typeout{ do post row stuff }
+	\ifdim\vtable at RowForceHeight=0pt\else\vtable at RowHeight=\vtable at RowForceHeight\fi%
+	\csdimgdef{tabRowHeight@\AlphAlph{\value{vtable at CurrRow}}}{\vtable at RowHeight}%
+	\immediate\write\@auxout{%
+		\string\newdimen\string\tabRowHeight@\AlphAlph{\value{vtable at CurrRow}}%
+		\string\global\string\tabRowHeight@\AlphAlph{\value{vtable at CurrRow}}=\the\vtable at RowHeight%
+	}%
+}
+
+% START TABLE CELL
+% \vtable at PreCell{max width}{min width}{hmode}{col num}{vmode}
+%   hmode = l (left) c (center) r (right) j (justify)
+%   vmode = t (top) m (middle) b (bottom)
+\DeclareDocumentCommand{\vtable at PreCell}{m m m m m}{%
+  % if starting first cell in do pre row stuff
+  \ifnumcomp{\value{vtable at State}}{=}{1}{ \vtable at PreRow }{}%
+
+  \typeout{CELL(\the\value{vtable at CurrRow},\the\value{vtable at CurrColumn}):}
+  % start "varwidth" box in "lrbox" enviroment
+  \begin{lrbox}{\vtable at CellBox}\begin{varwidth}[b]{#1}%
+  % \\ will be always \nextRow
+  \let\\\nextRow%
+  \newcommand{\nextRow}{\typeout{ finish row}\setcounter{vtable at State}{1}\tabularnewline}
+  % \lb can be used for line break
+  \let\lb\linebreak%
+  % if provide minimal width
+  \ifstrequal{#2}{}{}{%
+    % add space (with this width) in hidden row
+    \settototalheight{\vtable at RowTmpHeight}{A}\hspace*{#2}\vspace{-\vtable at RowTmpHeight}\linebreak{}%
+  }%
+  % set ragged of varwidth content and vertical space before and after varwidth
+  \ifstrequal{#3}{l}{   \raggedright \gdef\vtableCell at HPre{0} \gdef\vtableCell at HPost{1}}{%
+   \ifstrequal{#3}{c}{  \centering   \gdef\vtableCell at HPre{1} \gdef\vtableCell at HPost{1}}{%
+    \ifstrequal{#3}{r}{ \raggedleft  \gdef\vtableCell at HPre{1} \gdef\vtableCell at HPost{0}}{%
+     \ifstrequal{#3}{j}{             \gdef\vtableCell at HPre{0} \gdef\vtableCell at HPost{1}}{%
+  }}}}%
+  \gdef\vtable at CellVMode{#5}
+  %
+  % if this is multirow cell
+  \ifcsname tabMultirowFirst@\the\value{vtable at CurrColumn}\endcsname%
+    % if it's last row of multirow
+    \typeout{ in multi row mode, end at \csname tabMultirowLast@\the\value{vtable at CurrColumn}\endcsname row }
+    \ifnumcomp{\value{vtable at CurrRow}}{=}{\csname tabMultirowLast@\the\value{vtable at CurrColumn}\endcsname}{%
+      \typeout{  last row of multirow cell}
+      \setcounter{vtable at LastRow}{\csname tabMultirowLast@\the\value{vtable at CurrColumn}\endcsname}
+      % print content in current cell and forgot it
+      \csname tabMultirowText@\the\value{vtable at CurrColumn}\endcsname%
+      \csundef{tabMultirowText@\the\value{vtable at CurrColumn}}%
+    }{}%
+    \csnumgdef{vtable at ColSpan@\the\value{vtable at CurrColumn}}{\csname tabMultirowColSpan@\the\value{vtable at CurrColumn}\endcsname}%
+  \else
+    % set colspan value for tablePostCell macro
+    \csnumgdef{vtable at ColSpan@\the\value{vtable at CurrColumn}}{#4}
+  \fi%
+  \typeout{ colspan: \csname vtable at ColSpan@\the\value{vtable at CurrColumn}\endcsname }
+}
+
+% FINISH TABLE CELL
+\DeclareDocumentCommand{\vtable at PostCell}{}{%
+  \@finalstrut\@arstrutbox\end{varwidth}\end{lrbox}%
+  % get height of current cell
+  \settototalheight{\vtable at RowTmpHeight}{\usebox{\vtable at CellBox}}%
+  \dimdef{\multirowHeight}{0pt}%
+  %
+  % if it's last row of multirow
+  \ifnumcomp{\value{vtable at LastRow}}{=}{0}{}{%
+      % calculate \multirowHeight
+      \forloop{vtable at RowIter}{\csname tabMultirowFirst@\the\value{vtable at CurrColumn}\endcsname}{\value{vtable at RowIter} < \value{vtable at LastRow}}{%
+        \dimdef{\multirowHeight}{\multirowHeight + \csname tabRowHeight@\AlphAlph{\value{vtable at RowIter}}\endcsname + 5pt}% TODO
+      }%
+      % remove declare of multirow
+      \csundef{tabMultirowFirst@\the\value{vtable at CurrColumn}}%
+      \csundef{tabMultirowLast@\the\value{vtable at CurrColumn}}%
+      \csundef{tabMultirowForceHeight@\the\value{vtable at CurrColumn}}%
+      \setcounter{vtable at LastRow}{0}%
+  }%
+  %
+  % calculate max height of cell in current row
+  \setlength{\vtable at RowHeight}{\maxof{\vtable at RowHeight}{\vtable at RowTmpHeight - \multirowHeight}}%
+  % this must be global
+  \global\vtable at RowHeight=\vtable at RowHeight%
+  % calculate height of placeholders in current run
+  \typeout{   max(\the\vtable at RowHeight, \the\vtable at RowInitHeight) + \multirowHeight{} - \the\vtable at RowTmpHeight}%
+  \setlength{\vtable at RowTmpHeight}{\maxof{\vtable at RowHeight}{\vtable at RowInitHeight} + \multirowHeight - \vtable at RowTmpHeight}%
+  % if vertical centering we need 1/2 \vtable at RowTmpHeight
+  \ifdefstring{\vtable at CellVMode}{m}{\setlength{\vtable at RowTmpHeight}{0.5\vtable at RowTmpHeight}}{}%
+  %
+  % prepare vbox with (erlier prepared) varwidth and vertical placeholder
+  \begin{lrbox}{\vtable at CellVBox}\vbox{%
+    % in b and c (but not t) mode add vspce before content
+    \ifdefstring{\vtable at CellVMode}{t}{}{\vspace*{\vtable at RowTmpHeight}}\vspace*{4pt}% TODO
+    \hbox{\usebox{\vtable at CellBox}}%
+    % in t and c (but not b) mode add vspce after content, \vspace*{0pt} is important
+    \ifdefstring{\vtable at CellVMode}{b}{\vspace*{0pt}}{\vspace*{\vtable at RowTmpHeight}}\vspace*{-4pt}% TODO
+  }\end{lrbox}%
+  % if this is multirow cell, update saved height of content
+  \ifdim\multirowHeight=0pt\else \ht\vtable at CellVBox=0pt \dp\vtable at CellVBox=0pt \fi
+  %
+  % filling space on left (varwidth alignment)
+  \hspace{\stretch{\vtableCell at HPre}}%
+  % print prepared vbox
+  \usebox{\vtable at CellVBox}
+  % filling space on right (varwidth alignment)
+  \hspace{\stretch{\vtableCell at HPost}}%
+  %
+  % increase column counter
+  \addtocounter{vtable at CurrColumn}{\csname vtable at ColSpan@\the\value{vtable at CurrColumn}\endcsname}
+  % if finishing last cell in row do post row stuff
+  \ifnumcomp{\value{vtable at State}}{=}{1}{ \vtable at PostRow }{}%
+}
+
+% we need j type for using as base column in Z-type, this is placeholder
+\newcolumntype{j}{l}
+
+% Z{max width}{min width}{hmode}{col num}{vmode}{rown num}
+%   hmode = l (left) c (center) r (right) j (justify)
+%   vmode = t (top) m (middle) b (bottom)
+% use hmode as base columnt type for correct working in multicolumn
+\newcolumntype{Z}[6]{>{\vtable at PreCell{#1}{#2}{#3}{#4}{#5}}#3<{\vtable at PostCell}}
+
+
+\newcolumntype{L}[3]{Z{#1}{#2}{l}{1}{#3}{1}}
+\newcolumntype{C}[3]{Z{#1}{#2}{c}{1}{#3}{1}}
+\newcolumntype{R}[3]{Z{#1}{#2}{r}{1}{#3}{1}}
+\newcolumntype{J}[3]{Z{#1}{#2}{j}{1}{#3}{1}}
+
+% force current row height
+\newcommand{\forceRowHeight}[1]{\global\vtable at RowForceHeight=#1}
+
+% \tableFormatedCell{max width}[min width]{hmode}{vmode}
+%   hmode = l (left) c (center) r (right) j (justify)
+%   vmode = t (top) m (middle) b (bottom)
+\DeclareDocumentCommand{\tableFormatedCell}{m O{} m m}{
+  \@finalstrut\@arstrutbox\end{varwidth}\end{lrbox}%
+  \vtable at PreCell{#1}{#2}{#3}{1}{#4}%
+}
+
+% \setMultiColumn{col num}{max width}{min width}{hmode}{vmode}{left sep}{right sep}{text}
+%   hmode = l (left) c (center) r (right) j (justify)
+%   vmode = t (top) m (middle) b (bottom)
+\newcommand{\setMultiColumn}[8]{\multicolumn{#1}{#6Z{#2}{#3}{#4}{#1}{#5}{1}#7}{#8}}
+
+% \setMultiRow{col num}[minimal height]{text}
+\DeclareDocumentCommand{\setMultiRow}{m O{0pt} m O{1}}{%
+  \typeout{multi row: #1 #2 #4 in column \the\value{vtable at CurrColumn} row \the\value{vtable at CurrRow}}%
+  \csnumgdef{tabMultirowFirst@\the\value{vtable at CurrColumn}}{\value{vtable at CurrRow}}%
+  \csnumgdef{tabMultirowLast@\the\value{vtable at CurrColumn}}{\value{vtable at CurrRow} + #1 - 1}%
+  \csdimgdef{tabMultirowForceHeight@\the\value{vtable at CurrColumn}}{#2}%
+  \csnumgdef{tabMultirowColSpan@\the\value{vtable at CurrColumn}}{#4}%
+  \csnumgdef{vtable at ColSpan@\the\value{vtable at CurrColumn}}{#4}%
+  \csgdef{tabMultirowText@\the\value{vtable at CurrColumn}}{#3}%
+}
+
+% \setMultiColRow{col num}{row num}{max width}{min width}{hmode}{vmode}{left sep}{right sep}{text}
+%   hmode = l (left) c (center) r (right) j (justify)
+%   vmode = t (top) m (middle) b (bottom)
+\newcommand{\setMultiColRow}[9]{
+	\multicolumn{#1}{#7Z{#3}{#4}{#5}{#1}{#6}{#2}#8}{%
+		\ifstrequal{#9}{}{}{\setMultiRow{#2}{#9}[#1]}%
+	}
+}
+
+
+% I-type column put vertical frame line using hdashrule
+\newcolumntype{I}[3]{!{%
+  \setlength{\vtable at RowTmpHeight}{\vtable at RowInitHeight + 5pt}% TODO
+  \begin{lrbox}{\vtable at CellVBox}%
+  \rotatebox{90}{\hspace*{-4pt}#1\hdashrule{\vtable at RowTmpHeight}{#2}{#3}}% TODO
+  \end{lrbox}%
+  \ht\vtable at CellVBox=0pt%
+  \dp\vtable at CellVBox=0pt%
+  \usebox{\vtable at CellVBox}%
+}}


Property changes on: trunk/Master/texmf-dist/tex/latex/vtable/vtable.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-05-14 21:41:19 UTC (rev 51125)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-05-14 21:41:53 UTC (rev 51126)
@@ -729,7 +729,7 @@
     vhistory visualfaq visualpstricks visualtikz
     vmargin vntex vocaltract volumes
     voss-mathcol
-    vpe vruler vwcol
+    vpe vruler vtable vwcol
   wadalab wallcalendar wallpaper warning warpcol
     was wasy wasy2-ps wasysym webguide webquiz
     widetable widows-and-orphans williams windycity withargs witharrows

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-05-14 21:41:19 UTC (rev 51125)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2019-05-14 21:41:53 UTC (rev 51126)
@@ -1194,6 +1194,7 @@
 depend volumes
 depend vpe
 depend vruler
+depend vtable
 depend vwcol
 depend wallcalendar
 depend wallpaper

Added: trunk/Master/tlpkg/tlpsrc/vtable.tlpsrc
===================================================================


More information about the tex-live-commits mailing list